- UID
- 118699
- 性别
- 男
|
library ieee;--正弦信号发生器实验书P11
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity sinp is
port(clk:in std_logic;
doutut std_logic_vector(7 downto 0));--8位波形数据输出
end sinp;
architecture art of sinp is
component r
port(address:in std_logic_vector(5 downto 0);
inclock:in std_logic;
qut std_logic_vector(7 downto 0));
end component;
signal q1:std_logic_vector(5 downto 0);--设定内部节点为地址计数器
begin
process(clk) is --lpm-rom地址发生程序进程
begin
if clk'event and clk='1' then q1<=q1+1; end if;
end process;
u1: r port map(address=>q1,q=>dout,inclock=>clk);--例化
end; |
|