vickyuet
Member level 2
I had made a dual port BRAM (separate port for read / write ).I want to add an input that clear the BRAM when its high....
How can I do this for 256 x 8 Bram so that my code is synthesis able and could be modeled in hardware/Technology....one approach is to use for loop but requires more hardware and computation
// Approach 1
if ( clear_bram )
begin
for(i=0;i<RAM_WIDTH-1:0;i=i+1)
bram_init <= 0 ;
end
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Whats the alternative Is there any other possibility so that I can clear BRAM easily with clear input signal.I mean just like a resister when its reset...Similar to this though this piece give an error....Suggest plz...:idea:
if ( clear_bram )
bram_init <= 8'd0; //This does not works and gives error
REgards,:roll:
How can I do this for 256 x 8 Bram so that my code is synthesis able and could be modeled in hardware/Technology....one approach is to use for loop but requires more hardware and computation
// Approach 1
if ( clear_bram )
begin
for(i=0;i<RAM_WIDTH-1:0;i=i+1)
bram_init <= 0 ;
end
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Whats the alternative Is there any other possibility so that I can clear BRAM easily with clear input signal.I mean just like a resister when its reset...Similar to this though this piece give an error....Suggest plz...:idea:
if ( clear_bram )
bram_init <= 8'd0; //This does not works and gives error
REgards,:roll: