verilog constant part-select and indexed part-select
A range of contiguous bits can be selected and is known as part-select. There are two types of part-selects, one with a constant part-select and another with an indexed part-select
1 | reg [31:0] addr; |
Having a variable part-select allows it to be used effectively in loops to select parts of the vector. Although the starting bit can be varied, the width has to be constant.
[<start_bit +:
] // part-select increments from start-bit [<start_bit -:
] // part-select decrements from start-bit
Example
1 | logic [31: 0] a_vect; |
ref