K
krby_xtrm
Guest
how can this code snippet be a synthesizable material
....
generic ( size : integer := 32 -- or any from 4,8,16,32, & 64
size2 : integer := 8) -- for data_out
port ( data_in ((size - 1) downto 0);
data_out((size-1) downto 0))
)
....
variable cnt : integer range 0 to 3:=0; -- to cut data into 4
....
data_out <= data_in((size-1)+cnt downto (size-1)*cnt)
cnt := cnt + 1; -- increment
*what i want in this code is that everytime the clock arrives data_out
gets a part of the divided by 4 data_in
like 1st clock part_1_of_4 ... last clk part_4_of_4
with this, we can illiminate typing of the downto's from 0 to 64 or any
range, w/c is a very hard task...
.... or is ther another way to do this?
-krby_xtrm
....
generic ( size : integer := 32 -- or any from 4,8,16,32, & 64
size2 : integer := 8) -- for data_out
port ( data_in ((size - 1) downto 0);
data_out((size-1) downto 0))
)
....
variable cnt : integer range 0 to 3:=0; -- to cut data into 4
....
data_out <= data_in((size-1)+cnt downto (size-1)*cnt)
cnt := cnt + 1; -- increment
*what i want in this code is that everytime the clock arrives data_out
gets a part of the divided by 4 data_in
like 1st clock part_1_of_4 ... last clk part_4_of_4
with this, we can illiminate typing of the downto's from 0 to 64 or any
range, w/c is a very hard task...
.... or is ther another way to do this?
-krby_xtrm