addsub.vhd

来自「design compile synthesis user guide」· VHDL 代码 · 共 26 行

VHD
26
字号
library work;use work.synopsys.all;use work.attributes.all;entity addsub isport	(arg1, arg2 : in signed(6 downto 1);	 add : in boolean;	 result : out signed(6 downto 1));end ;architecture BV of addsub isbegin  adsb : process(arg1,arg2,add)  constant r0 : resource := 0;  attribute map_to_module of r0 : constant is "DW01_addsub";  attribute implementation of r0 : constant is "rpl";  attribute ops of r0 : constant is "a1 a2";    begin    if add then      result <= arg1 + arg2; -- pragma label a1    else      result <= arg1 - arg2; -- pragma label a2    end if;  end process;end BV;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?