Forum Discussion
5 Replies
- Altera_Forum
Honored Contributor
afaik, you cant. variables in Procedures only have scope to the procedure and only exist when the procedure is called. So cannot be seen on a waveform. You will have to debug them using console outputs.
- Altera_Forum
Honored Contributor
--- Quote Start --- You will have to debug them using console outputs. --- Quote End --- How can I do so? - Altera_Forum
Honored Contributor
Using textio, there is a default file called OUTPUT that allows you to write to the simulator console.
you can do it one of two ways. 1. Like normal textio, write to a line then write the line to the console:
or write drictly to output. Heres a nice little wrapper procedure for you.variable l : line; write(l, string'("This is some debug text")); writeline(OUTPUT, l);procedure echo (arg : in string := "") is begin std.textio.write(std.textio.output, arg); end procedure echo; --echos to console with a newline at the end procedure echol(arg : in string := "") is begin std.textio.write(std.textio.output, arg & LF); end procedure echol; - Altera_Forum
Honored Contributor
you can label your process and then add it to the waveform manually. To do this:
1- Generate a simple waveform without variables 2- save it with .do format. For example my_wave_1.do 3- Manually open the my_wave_1.do file in a text editor and add your variable to a line. You can copy/paste previous lines for simplicity. Then replace the signal name with your variable name: dut/my_process/v_variable 4- Save your edited .do file 5- now run in the console: do my_wave_1.do 6- Run Simulation - Altera_Forum
Honored Contributor
--- Quote Start --- you can label your process and then add it to the waveform manually. To do this: 1- Generate a simple waveform without variables 2- save it with .do format. For example my_wave_1.do 3- Manually open the my_wave_1.do file in a text editor and add your variable to a line. You can copy/paste previous lines for simplicity. Then replace the signal name with your variable name: dut/my_process/v_variable 4- Save your edited .do file 5- now run in the console: do my_wave_1.do 6- Run Simulation --- Quote End --- The OP asked for procedures not processes.