part select memory

Guest
Hi

Does any tool so far support synthesizable "part select memory" like:

reg kkk [0:31];
.....
kkk [0:4] = 3;
kkk [5:16] =4;
.....
....etc.

synplify?

Thanks.
 
The exact way you wrote to get it synthesis Myself I'm not aware on
tool that do it.

However you have few alternatives -

First you can probably simple change it to be
reg [31:0] kkk ;
and than put the value assignemnt in always module and you get what you
want in easier way.

or even simple define this as wire.

Also not sure why you refer to this as part selected memorey, as once
you give to it a fix value it actualy a wires which are connected to
vcc's and gnd's.

but if you still want to keep the
reg kkk [0:31] structure than how about go though temp reglike :

reg kkk [0:31] ;
reg [31:0] kkk_tmp ;
integer ii ;

always begin
kkk_tmp[4:0] = 3 ;
kkk_tmp[16:5] = 4 ;
for(ii=0;ii<32;ii=ii+1)
kkk[ii] = kkk_tmp[ii] ;
end

or you can use loop and case inside.

have fun.
 

Welcome to EDABoard.com

Sponsor

Back
Top