Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12603 Discussions

NIOS 2 Modelsim simulation debugging

Altera_Forum
Honored Contributor II
1,035 Views

May i know how do i add a debug message, i.e. like $display() in verilog, in the NIOS C program and display it in modelsim simulation environment?

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
312 Views

See AN351 https://www.altera.com/support/support-resources/design-examples/intellectual-property/embedded/nios-ii/exm-simulating-niosii.html 

 

Use a JTAG UART with a BSP configured to use that UART as STDOUT, and then just use printf() from your application software. 

The JTAG UART will use $write() to output your characters.
0 Kudos
Reply