fp_utils.vhd

来自「DLX CPU VHDL CODE UNIVERSITY」· VHDL 代码 · 共 38 行

VHD
38
字号
use work.dp32_types.all;entity fp_is_zero is   generic(width: positive);   port ( fp: in bit_vector(width-1 downto 0);	  r: out bit);end fp_is_zero;architecture behaviour of fp_is_zero isbeginmain : process (fp)variable count : natural:=0;beginfor i in width-1 downto 0 loopif (fp(i)='0') then  count:=count+1;end if;if (count=width) then r<='1';else r<='0';end if;end loop;end process;end behaviour;

⌨️ 快捷键说明

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