Hey,
Hope you're well. I spent much of today attempting to bootstrap simulation for chipyard on questa. I was able to get quite far, but the various dependencies required in simulation cause me some issues. I was able to simulate up to a few thousand cycles before a call to tsi_t::tsi_t() breaks the sim because it isnt found.
My issue comes down to the fact that vsim attempts to use the compiler in chipyard/.conda-env/bin/g++, which I assume is correct, but for some reason runs into a slew of very strange errors, for instance:
When I force questa to use my system's actual compiler, I can simulate the design as mentioned by I eventually run into
# [UART] UART0 is here (stdin/stdout).
# ** Fatal: (vsim-12005) Undefined function 'tsi_t::tsi_t(int, char**)' introduced from '/tmp/hakam@hakam-MS-7D46_dpi_395222/linux_x86_64_gcc-13/vsim_auto_compile.so' is being called. Exiting ...
# End time: 03:35:58 on Dec 23,2024, Elapsed time: 0:00:09
# Errors: 1, Warnings: 3
and the simulation dies.
tsi_t lives in riscv_tools/riscv-isa-sim/fesvr, which I honestly have no idea how to inform the simulator about. I assume including the entire fesvr is not the right approach.
The important parts of my make script is the following:
compile_questa: $(sim_common_files) $(dramsim_lib) $(EXTRA_SIM_REQS)
rm -rf $(model_dir)
rm -rf work
mkdir -p $(model_dir)
$(VLIB) work
$(VLOG) -dpicpppath /usr/bin/g++ $(QUESTA_VLOG_OPTS) $(QUESTA_CC_OPTS)
$(sim): compile_questa
@echo "Creating $(sim) launch script..."
#$(VSIM) $(TB) $(QUESTA_VSIM_OPTS) $(EXTRA_SIM_SOURCES)
#-ldflags $(QUESTA_LDFLAGS)
run_simulation: $(sim)
@echo "Running Questa simulation..."
@echo "$(QUESTA_LDFLAGS)"
$(VSIM) -c -voptargs=+acc -dpicpppath /usr/bin/g++ work.$(TB) -do run_questa.do
With that, I have 3 questions:
1) Should I be using my systems actual c++ compiler or should I be using chipyards?
2) How do I inform questa about fesvr? Its unclear to me how this was one in the other simulator examples
3) Is there already a vsim/questa simulation build somewhere?
Please let me know. Thank you!