Arrays
If you need to store multiple values of the same type, you can use an array. You can have arrays of reg
, logic
, integer
, and more. Array indices start from 0 in SystemVerilog.
Example:
module MyModule;
reg [7:0] byteArray; // 8-bit register
logic [3:0] nibbleArray [0:7]; // Array of 8 4-bit logic values
// Module contents go here
endmodule
Have a Question?
Feel free to ask your question in the comments below.
Please Login to ask a question.
Login Now