Telboy99
Newbie
I have a buffer that is 256 bit in length and I am using the picoblaze to read/write data to it.
I can only read/write in 8 bit chunks which is acceptable. So with CPU_Addr = 0 to 31 I want the 8 bit block to be read/written
The problem is if I enable the writing line, the number of used slices grows from 310 to 1292 and I can not understand why ?
I can only read/write in 8 bit chunks which is acceptable. So with CPU_Addr = 0 to 31 I want the 8 bit block to be read/written
The problem is if I enable the writing line, the number of used slices grows from 310 to 1292 and I can not understand why ?
Code:
signal buffer : std_logic_vector(255 downto 0);
process (clk)
variable ptrStart : integer range 0 to 255 := 0;
variable tmpAddr : integer range 0 to 255 := 0;
begin
If falling_edge(clk) Then
tmpaddr := to_integer(unsigned(CPU_Addr)) ;
ptrStart := tmpaddr * 8;
if write_strobe = '1' then
buffer(ptrStart + 7 downto ptrStart) <= data_in; -- problem with this line !!
else
data_out <= buffer(ptrStart +7 downto ptrStart);
end if;
end if;
end process;