Hello,
I have the following code :
width = 128
architecture bhv of yy is function Stop_Sense ( IsSigCell, StopNextCells : std_ulogic_vector(Width-1 downto 0); CurrentCell : natural range 0 to Width-1; LookAheadDepth : natural range 1 to 16 ) return std_ulogic is begin L1:for i in 1 to LookAheadDepth - 1 loop if (CurrentCell - i) >= 0 then if StopNextCells(CurrentCell - i) = '1' then return '1'; else if IsSigCell(CurrentCell - i) = '1' then exit; end if; end if; end if; end loop; return '0'; end;
signal StopNextCells : std_ulogic_vector (Width-1 downto 0); signal StopCell : std_ulogic_vector (Width-1 downto 0); signal IsBoundaryCell : std_ulogic_vector (Width-1 downto 0);
begin . .
StopCells: for i in 0 to Width-1 generate StopCell(i)