How can i make 2D integer array in Verilog? I have to store three variables in o
ID: 3844428 • Letter: H
Question
How can i make 2D integer array in Verilog?
I have to store three variables in one array
for example, if 3 people choose to take on the elevator on 4th floor and get off on 7th floor, I have to store '3' - which is the number of people- in a 2D array[4,7]
reg [10:0] array [10:0] <- does not work cuz i can only store 2 values.
If making 2D integer array is impossible in Verilog, please teach me how to track the 3 values.
I have to know how many people want to get on on Nth floor and get off on Mth floor.
Explanation / Answer
Answer to your question:
You can use multi-dimentional array instead of two dimentional array to repesent the given elevator problem for 3 people data you can store in multidimentioncal unpaced array.
See the below example for creation of two dimentonal array in verilog
Multidimentional Array :
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.