Skip to content
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

Executing cxxdemo with verilator causing memory out of bound problem: #256

Open
SyedFahimuddinAlavi opened this issue Apr 3, 2024 · 0 comments

Comments

@SyedFahimuddinAlavi
Copy link

SyedFahimuddinAlavi commented Apr 3, 2024

iVerilog atleast 100 times slow than Verilator so I need verilator to run cxxdemo. Executing cxxdemo with verilator cause memory out of bound problem:

./testbench_verilator
Built with Verilator 4.210 2021-07-07.
Recommended: Verilator 4.0 or later.
%Error: firmware.hex:12296: $readmem file address beyond bounds of array
Aborting...
Aborted (core dumped)

Only important change is to add test_verilator in Makefile

test_verilator: testbench_verilator firmware32.hex
	./testbench_verilator

testbench_verilator: ../../testbench.v ../../picorv32.v ../../testbench.cc
	$(VERILATOR) --cc --exe -Wno-lint -trace --top-module picorv32_wrapper ../../testbench.v ../../picorv32.v ../../testbench.cc \
			$(subst C,-DCOMPRESSED_ISA,$(COMPRESSED_ISA)) --Mdir testbench_verilator_dir
	$(MAKE) -C testbench_verilator_dir -f Vpicorv32_wrapper.mk
	cp testbench_verilator_dir/Vpicorv32_wrapper testbench_verilator

My make file and .v changes are
image

While my memory requirements of crypto firmware looks quite fit within

   text	   data	    bss	    dec	    hex	filename
 107196	   1992	    860	 110048	  1ade0	../picorv32_forked/scripts/cxxdemo/firmware.elf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant