- 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
此帖出自
小平头技术问答
一周热门 更多>