In System Verilog, all the net/variables are static type. They exist throughout the
simulation. In System Verilog, dynamic type is a new type along with static type. Class,
Queue, and Associative Array are some examples of dynamic type.
Unlike static type variables (int a; wire [7:0] b;), dynamic type variables do not have a fixed size throughout the simulation. Variables keep changing during run-time. Through Object window, you can view the value of a dynamic type variable during the simulation.
- Click Restart button
- From the Scope window, select scope generic_tb present under the top module.
- Maximize the Objects window. As the simulation is yet to start, observe the
Queue and Class dynamic type in the Data Type column. The Value for Queue
appears empty while for class it appears null.
- On Scope window, double-click generic_tb to see the text file.
- On the text editor window, click the circle on line
number 64 to add a break point.
- Click Run All button, the simulation
will stop at line number 64. On the Object window
master_monitor_transaction_queue
value appears empty.
- On the Vivado® simulator toolbar menu, click the Step button . It executes the current statement that is on line number 64 where the simulation is currently waiting. At this statement, you are pushing an element after the execution. Your queue will be populated with a single element.
- In the Object window, the
master_monitor_transaction_queue
value is populated. This way you can view the value of any dynamic type on the Object window.