--TODO: bei CBITS-1 gibts einen overflow :/
subtype cinteger is integer range -(2**(CBITS-2)) to ((2**(CBITS-2))-1);
function find_msb(a : csigned) return natural;
+ procedure icwait(signal clk_i : IN std_logic; cycles: Natural);
end package gen_pkg;
package body gen_pkg is
end loop;
return (CBITS - r);
end function find_msb;
+
+ procedure icwait(signal clk_i : IN std_logic; cycles: Natural) is
+ begin
+ for i in 1 to cycles loop
+ wait until clk_i= '0' and clk_i'event;
+ end loop;
+ end;
end package body gen_pkg;