mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 22:27:21 -04:00
[sw/common] added new makefile target "sim"
can be used for in-console simulation of current application using GHDL and the default processor testbench ("simple"/script-based testbench setup)
This commit is contained in:
parent
2c66af5cf1
commit
6246f0e8c0
3 changed files with 29 additions and 1 deletions
|
@ -1050,13 +1050,30 @@ the compiler's _USER_FLAGS_ variable (do not forget the `-D` suffix flag):
|
|||
sw/example/blink_led$ make USER_FLAGS+=-DUART0_SIM_MODE clean_all all
|
||||
----
|
||||
|
||||
The provided define will change the default UART0/UART1 setup function in order to set the simulation mode flag in the according UART's control register.
|
||||
The provided define will change the default UART0/UART1 setup function in order to set the simulation
|
||||
mode flag in the according UART's control register.
|
||||
|
||||
[NOTE]
|
||||
The UART simulation output (to file and to screen) outputs "complete lines" at once. A line is
|
||||
completed with a line feed (newline, ASCII `\n` = 10).
|
||||
|
||||
|
||||
:sectnums:
|
||||
=== In-Console Application Simulation
|
||||
|
||||
To directly compile and run a program in the console (using the default testbench and GHDL
|
||||
as simulator) you can use the `sim` makefile target. Make sure to use the UART simulation mode
|
||||
(`USER_FLAGS+=-DUART0_SIM_MODE` and/or `USER_FLAGS+=-DUART1_SIM_MODE`) to get
|
||||
faster / direct-to-console UART output.
|
||||
|
||||
[source, bash]
|
||||
----
|
||||
sw/example/blink_led$ make USER_FLAGS+=-DUART0_SIM_MODE clean_all sim
|
||||
[...]
|
||||
Blinking LED demo program
|
||||
----
|
||||
|
||||
|
||||
:sectnums:
|
||||
=== Simulation using GHDL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue