不少人在编写VHDL时常常分不清信号与变量有什么不同。正确使用信号与变量是完成设计的必要环节,这里有一个程序大家看一下。library
IEEE;use IEEE.STD_LOGIC_1164.ALL;use IEEE.STD_LOGIC_ARITH.ALL;use
IEEE.STD_LOGIC_UNSIGNED.ALL; ---- Uncomment the following
library declaration if instantiating---- any Xilinx primitives in
this code.--library UNISIM;--use UNISIM.VComponents.all;
entity sig_vari isport(reset,clk:in
std_logic; aout,bout,cout:out integer range 0 to
127 ); end ...
阅读全文>>