[an error occurred while processing this directive]
|
This is an example of the use of partial select expressions:
reg [31:0] down_vect;
reg [0:31] up_vect;
reg [0:7] big_vect [7:0][0:7];
wire [7:0] out;
wire [5:0] index;
assign index = 1;
assign out = down_vect[index-:8]; // resolves to [8:1];
.
.
assign out = up_vect[index+:8]; // resolves to [1:8]
.
.
.
assign index = 0;
assign out = big_vect[1][2][index+:8]; // resolves to big_vect[1][2][0:7];
.
.
assign index = 2;
assign out = big_vect[1][2][index+:8]; // resolves to big_vect[1][2][2:7];
E-mail: info@telesys.ru