一些很好的FPGA设计实例

源代码在线查看: add.vhd

软件大小: 21188 K
上传用户: cpu686
关键词: FPGA 设计实例
下载地址: 免注册下载 普通下载 VIP

相关代码

				----------方案1:in/out=signed-----------
				library ieee;
				use ieee.std_logic_1164.all;
				use ieee.std_logic_arith.all;
				-----------------------------------------
				entity add is
				  port (a,b clk: in signed (3 downto 0);
				      sum: out signed (4 downto 0));
				end add;
				-----------------------------------------
				architecture add1 of add is
				begin 
				sum 				end add1;
				-----------方案2:out=integer-------------
				library ieee;
				use ieee.std_logic_1164.all;
				use ieee.std_logic_arith.all;
				-----------------------------------
				entity add2 is
				  port (a,b clk: in signed (3 downto 0);
				      sum: out integer range -16 to 15 );
				end add2;
				------------------------------------
				architecture add3 of add2 is
				begin 
				sum 				end add3;			

相关资源