Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17054 Discussions

Modelsim sim force ariables in a two-dimensional array

Allen0204
Beginner
176 Views
How to use modelsim force variables in a two-dimensional array
0 Kudos
3 Replies
Kenny_Tan
Moderator
124 Views

You may find the answer below:

For Verilog:

If you have a two-dimensional array like this:

reg [7:0] mem [0:3]; // 4x8-bit array


For a multi-bit element inside an array:

reg [3:0] mem [0:3][0:1]; // 4x2 array of 4-bit registers


For VHDL:

If you have a two-dimensional array:

type mem_array is array (0 to 3, 0 to 1) of std_logic_vector(3 downto 0);

signal mem : mem_array;


0 Kudos
Kenny_Tan
Moderator
100 Views

Is there any further question?


0 Kudos
Kenny_Tan
Moderator
51 Views

As we do not receive any response from you on the previous answer that we have provided. Please login to ‘https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.



0 Kudos
Reply