集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 5337|回复: 3

vhdl中用altera_mf库的问题

[复制链接]
shaoxian1985 发表于 2010-6-4 15:02:28 | 显示全部楼层 |阅读模式
本帖最后由 fpgaw 于 2010-11-22 15:52 编辑

LIBRARY ieee;
USE ieee.std_logic_1164.all;

LIBRARY altera_mf;
USE altera_mf.all;

ENTITY sin_tab IS
        PORT
        (
                address                : IN STD_LOGIC_VECTOR (9 DOWNTO 0);
                clock                : IN STD_LOGIC ;
                q                : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
        );
END sin_tab;


ARCHITECTURE SYN OF sin_tab IS

        SIGNAL sub_wire0        : STD_LOGIC_VECTOR (7 DOWNTO 0);



        COMPONENT altsyncram
        GENERIC (
                address_aclr_a                : STRING;
                clock_enable_input_a                : STRING;
                clock_enable_output_a                : STRING;
                init_file                : STRING;
                intended_device_family                : STRING;
                lpm_hint                : STRING;
                lpm_type                : STRING;
                numwords_a                : NATURAL;
                operation_mode                : STRING;
                outdata_aclr_a                : STRING;
                outdata_reg_a                : STRING;
                widthad_a                : NATURAL;
                width_a                : NATURAL;
                width_byteena_a                : NATURAL
        );
        PORT (
                        clock0        : IN STD_LOGIC ;
                        address_a        : IN STD_LOGIC_VECTOR (9 DOWNTO 0);
                        q_a        : OUT STD_LOGIC_VECTOR (7 DOWNTO 0)
        );
        END COMPONENT;

BEGIN
        q    <= sub_wire0(7 DOWNTO 0);

        altsyncram_component : altsyncram
        GENERIC MAP (
                address_aclr_a => "NONE",
                clock_enable_input_a => "BYPASS",
                clock_enable_output_a => "BYPASS",
                init_file => "sin.mif",
                intended_device_family => "Cyclone III",
                lpm_hint => "ENABLE_RUNTIME_MOD=NO",
                lpm_type => "altsyncram",
                numwords_a => 1024,
                operation_mode => "ROM",
                outdata_aclr_a => "NONE",
                outdata_reg_a => "CLOCK0",
                widthad_a => 10,
                width_a => 8,
                width_byteena_a => 1
        )
        PORT MAP (
                clock0 => clock,
                address_a => address,
                q_a => sub_wire0
        );



END SYN;
请问altsyncram 这个有什么用呢  他的         GENERIC  里面的参数有什么意义呢
fpgaw 发表于 2010-6-7 19:28:25 | 显示全部楼层
学习
 楼主| shaoxian1985 发表于 2010-6-8 16:50:25 | 显示全部楼层
谢谢斑竹  主要是我不知道看什么了  哪儿有讲altera的常用库函数啊  连带着讲函数的意义的
Sunlife 发表于 2015-5-20 10:39:58 | 显示全部楼层
主要是我不知道看什么了  哪儿有讲altera的常用库函数啊  连带着讲函数的意义的
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2025-5-6 23:11 , Processed in 0.081131 second(s), 24 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表