-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sim] rework default testbench #1119
Conversation
1- Should we give path of the hex files to 2- Both of Instructions and data are merged into one hex file after compilation, so dmem initialization is done by processor through copying data from imem to dmem. Is it true? |
Sure! First of all, compile a program using the neorv32/sw/example/hello_world$ make USER_FLAGS+=-DUART0_SIM_MODE clean hex
../../../sw/lib/source/neorv32_uart.c: In function 'neorv32_uart_setup':
../../../sw/lib/source/neorv32_uart.c:109:2: warning: #warning UART0_SIM_MODE (primary UART) enabled! Sending all UART0.TX data to text.io simulation output instead of real UART0 transmitter. Use this for simulation only! [-Wcpp]
109 | #warning UART0_SIM_MODE (primary UART) enabled! Sending all UART0.TX data to text.io simulation output instead of real UART0 transmitter. Use this for simulation only!
| ^~~~~~~
Memory utilization:
text data bss dec hex filename
5532 0 116 5648 1610 main.elf
Generating neorv32_raw_exe.hex (I am using Then you can pass For the GHDL configuration you can do all the genric configuration within the command line: neorv32/sw/example/hello_world$ make GHDL_RUN_FLAGS+="-gBOOT_MODE_SELECT=1 -gMEM_INT_IMEM_EN=false -gEXT_MEM_A_EN=true -gEXT_MEM_A_SIZE=8192 -gEXT_MEM_A_FILE=../sw/example/hello_world/neorv32_raw_exe.hex" sim
Generating neorv32_application_image.vhd
Installing application image to ../../../rtl/core/neorv32_application_image.vhd
Simulating processor using default testbench...
[TIP] Compile application with USER_FLAGS+=-DUART[0/1]_SIM_MODE to enable UART[0/1]'s simulation mode (redirect UART output to simulator console).
GHDL simulation run parameters: -gBOOT_MODE_SELECT=1 -gMEM_INT_IMEM_EN=false -gEXT_MEM_A_EN=true -gEXT_MEM_A_SIZE=8192 -gEXT_MEM_A_FILE=../sw/example/hello_world/neorv32_raw_exe.hex
../rtl/core/neorv32_top.vhd:343:5:@0ms:(assertion note): [NEORV32] The NEORV32 RISC-V Processor (v1.10.7.2), github.com/stnolting/neorv32
../rtl/core/neorv32_top.vhd:349:5:@0ms:(assertion note): [NEORV32] Processor Configuration: CPU DMEM I-CACHE D-CACHE XBUS XBUS-CACHE XIP XIP-CACHE GPIO MTIME UART0 UART1 SPI SDI TWI PWM WDT TRNG CFS NEOLED XIRQ GPTMR ONEWIRE DMA SLINK CRC SYSINFO OCD-AUTH
../rtl/core/neorv32_top.vhd:401:5:@0ms:(assertion note): [NEORV32] BOOT_MODE_SELECT = 1: booting from custom address
../rtl/core/neorv32_clockgate.vhd:38:3:@0ms:(assertion warning): [NEORV32] Clock gating enabled (using default/generic clock switch).
../rtl/core/neorv32_cpu.vhd:136:3:@0ms:(assertion note): [NEORV32] CPU ISA: rv32ibmux_zalrsc_zba_zbb_zbkb_zbkc_zbkx_zbs_zicntr_zicond_zicsr_zifencei_zihpm_zfinx_zkn_zknd_zkne_zknh_zks_zksed_zksh_zkt_zmmul_zxcfu_sdext_sdtrig_smpmp
../rtl/core/neorv32_cpu.vhd:172:3:@0ms:(assertion note): [NEORV32] CPU tuning options: fast_mul fast_shift rf_hw_rst
../rtl/core/neorv32_cpu.vhd:179:3:@0ms:(assertion warning): [NEORV32] Assuming this is a simulation.
../rtl/core/neorv32_trng.vhd:295:3:@0ms:(assertion note): [neoTRNG] The neoTRNG (v3.2) - A Tiny and Platform-Independent True Random Number Generator, https://github.com/stnolting/neoTRNG
../rtl/core/neorv32_trng.vhd:302:3:@0ms:(assertion warning): [neoTRNG] Simulation-mode enabled (NO TRUE/PHYSICAL RANDOM)!
../rtl/core/neorv32_debug_auth.vhd:48:3:@0ms:(assertion warning): [NEORV32] using DEFAULT on-chip debugger authenticator. Replace by custom module.
## ## ## ##
## ## ######### ######## ######## ## ## ######## ######## ## ################
#### ## ## ## ## ## ## ## ## ## ## ## ## ## #### ####
## ## ## ## ## ## ## ## ## ## ## ## ## ## ###### ##
## ## ## ######### ## ## ######### ## ## ##### ## ## #### ###### ####
## ## ## ## ## ## ## ## ## ## ## ## ## ## ###### ##
## #### ## ## ## ## ## ## ## ## ## ## ## #### ####
## ## ######### ######## ## ## ## ######## ########## ## ################
## ## ## ##
Hello world! :) Here, I am using the external memory A. Make sure to adjust the size according to the compilation outputs.
Yes, at least if you compile an executable. But you could also generate a HEX file that contains only some data, put that into one of the external memories and use that from another HEX file that includes the actual executable. |
Triggered by @mahdi259 in #1115 this PR adds new generics to the default testbench that control implementation (and initialization) of two processor-external memories.