Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

storing first set of values in a register

Hi All,

I have an input (structure datatype) from an address mapper to my scheduling module.

typedef struct packed{

logic [row_address_width-1:0] ROW_ADDR;

logic [column_address_width-1:0] COL_ADDR;

logic [bank_address_width-1:0] BANK_ADDR;

logic [rank_address_width-1:0] RANK_ADDR;

logic [word_address_width-1:0] WORD_ADDR;

}mapper_to_sch ;

input mapper_to_sch mapper_sch

Now my question is I would want to store just the first values of mapper_sch into a registers as shown below.

bank_addr_buf = mapper_sch.BANK_ADDR;

row_addr_buf = mapper_sch.ROW_ADDR;

I cant do continuous assignments since it will assign all the values. I just want to store only the first bank and row address into a buffer.

Initial block also does not help in this case.

Could anyone suggest how should I do this.

Thanks & regards,

Leela
No RepliesBe the first to reply