help in verilog structure

Status
Not open for further replies.

mona:)

New Member
hi;
i have a tiny problem in writing a program , i want to define 8 , 8bit register and value them in a one line in a loop( for(i=1;i<8;i=i+1) Ri={Ri-1[6:0],Ri-1[7]}; ) how could i define them ?
putting number of register i "[]","{}","()", will be considered as error.

thanks in advance mona
 
hi,
I dont use Verilog, but does it have an ARRAY function.???
If yes, define an 8 byte array and Index them.

E
 
Thank you for reply , i found the answer . we should define it as a memory like this : [3:0] mem [127:0]. that means 128,4 bit register. i before only knew how to define a register e.g "[7:0] R " and if i wanted to use a bit of them , would call as R[4] for example ,now i have another problem ,how to call e.g third bit of 7th memory register?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…