|  | 
 
| 
×
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册  
 
    
        复制代码
 library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity save is
port(
        frame:in std_logic;                --高电平时,存储
        wrsig:in std_logic;                --上升沿时,到来一个字节的数据
        datain:in std_logic_vector(7 downto 0)
);
end entity save;
architecture behav of save is
        constant N:integer:=51;
        subtype byts is std_logic_vector(7 downto 0);
        type  memory is array(0 to N-1) of byts;
        
        signal        data_mem:memory;
        
        begin
        process (frame,wrsig)
           variable cnt:integer range 0 to 50;
          begin
                if frame='0' then
                        cnt:=0;
                elsif rising_edge(wrsig) then
                        if cnt<51 then
                         data_mem(cnt)<=data_in;
                        end if;
                end if;
        end process;
end behav;
 为什么综合时总是提示说Input is unused,三个输入都是unused
 | 
 |