Forum Discussion
Altera_Forum
Honored Contributor
12 years agoQuestion...
Hello, please advise me. Imagine I have 4 registers: regA, regB, regC and regD, all defined as "reg [7:0] regA;". In addition to addressing these registers separately, I need to "assemble" them...
Altera_Forum
Honored Contributor
12 years agoCris, can you please give me example...
reg [7:0] regA; reg [7:0] regB; reg [7:0] regC; reg [7:0] regD; what I need is to address different sets or regs with the same "name"... how to explain... some variable regArr, an array (packed or unpacked - not sure), 3 elements, at different circumstances, should contain links to let's say {regA, regB, regC} or {regB, regC, regD}, and the same "code" do the following regArr[1] <= 8'h44; in first example regB will be assigned, in second - regC. Is it achievable using simple (re-)assignments?