- 6
- 0
- 约1.12千字
- 约 8页
- 2017-01-01 发布于重庆
- 举报
8051指令系统和程序设计 第7章 宏功能模块 资源再利用 本章内容 7.1 宏功能模块概述 7.2 宏功能模块的应用 7.1 宏功能模块概述 Altera提供的宏功能模块和LPM有: 算术类:累加、加法、乘法、LPM函数 门电路类:74系列 I/O组件:PLL 存储器类:ROM、RAM、移位寄存器等 7.2 宏功能模块的应用 例:正弦波信号发生器的设计。 地址发生器的设计 Port(clk:in std_logic; addr:out std_logic_vector(5 downto 0)); Architecture one of addr_gen is signal addr_count:std_logic_vector(5 downto 0); begin process(clk) begin if clk’event and clk=‘1’ then addr_count=addr_count+1; end if; addr=addr_count; end process; End one; 正弦波ROM设计 1、设计正弦波数据文件 2、利用MegaWizard Plug-in Manager生成ROM 正弦波顶层文件设计(调用两个元件) Port(clk:in std_logic; dout:out std_logic_vector(5 downto 0)); Architecture dacc of singt is signal addr_tmp:std_logic_vector(5 downto 0); component addr_gen port(clk:in std_logic; addr:out std_logic_vector(5 downto 0)); end component; component data_rom port(inclk:in std_logic; address:in std_logic_vector(5 downto 0)); q:out std_logic_vector(7 downto 0)); end component; begin U1: addr_gen port map(clk=clk,addr=addr_tmp); U2: data_rom port map(inclock=clk,address=addr_tmp,q=dout); End dacc; 总结 学会利用宏功能块和LPM生成自己的电路 * * * * *
原创力文档

文档评论(0)