Author Topic: VHDL: How to print out variables' value?  (Read 672 times)

0 Members and 1 Guest are viewing this topic.

Offline notoothTopic starter

  • Contributor
  • Posts: 20
  • Country: vn
VHDL: How to print out variables' value?
« on: August 18, 2024, 03:22:46 pm »
Can anyone guide me print out value of an VHDL signed/unsigned variable to the screen in Vivado?
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2812
  • Country: nz
Re: VHDL: How to print out variables' value?
« Reply #1 on: August 19, 2024, 08:28:49 am »
Assuming you mean in simulation:

Code: [Select]
            report "Sync count is " & integer'image(to_integer(sync_count));

Gives:


Note: Sync count is 106


If you want to write a value to the serial port let me know, and I'll paste some code here.
« Last Edit: August 19, 2024, 08:30:47 am by hamster_nz »
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline Daixiwen

  • Frequent Contributor
  • **
  • Posts: 365
  • Country: no
Re: VHDL: How to print out variables' value?
« Reply #2 on: August 19, 2024, 10:18:58 am »
And if it is when running the code in an FPGA, you can use in-system debugging as explained in chapter 10 and over of this document
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf