38use ieee.std_logic_1164.
all;
63 report "assert(DWIDTH>=3): only 3 bit or larger supported"
66 proc_regs:
process (
CLK)
69 if rising_edge(CLK) then
78 end process proc_regs;
81 variable r : slv(DWIDTH-1 downto 0) := (others=>'0');
82 variable n : slv(DWIDTH-1 downto 0) := (others=>'0');
83 variable s : slbit := '0';
93 for i in 1 to DWIDTH-2 loop
94 if s='1' and r(i-1)='1' then
97 s := s and not r(i-1);
106 end process proc_next;
slv( DWIDTH- 1 downto 0) :=( others => '0') N_DATA
slv( DWIDTH- 1 downto 0) :=( others => '0') R_DATA
out DATA slv( DWIDTH- 1 downto 0)