Forum Discussion
6 Replies
- Altera_Forum
Honored Contributor
Using the command-line version of vsim, you can redirect the output to a file. Eg., something like
Cheers Davevsim -c testbench -do "run -a; q" &> testbench.log - Altera_Forum
Honored Contributor
Hi, thanks for answer,
But vsim command doesn't like &> mymacro.log. It would like to take this as an entity. So solution not found yet...vsim -c myentity -do mymacro.do &> mymacro.log - Altera_Forum
Honored Contributor
I found a workaround : write the transcript window to a file
write transcript myfile.log - Altera_Forum
Honored Contributor
--- Quote Start ---
But vsim command doesn't like &> mymacro.log. It would like to take this as an entity. --- Quote End --- Were you trying this from a bash shell? I commented that this format was for the command-line version of vsim, not the GUI version. I use this method in Makefiles to generate logfiles from failing testbenches. Cheers, Davevsim -c myentity -do mymacro.do &> mymacro.log - Altera_Forum
Honored Contributor
Hi, thanks, I will cogitate.
- Altera_Forum
Honored Contributor
Here's the Makefile section:
# -----------------------------------------------------------------# Check target# -----------------------------------------------------------------# # Change into the control_test build directory so that the# exitstatus and log files are generated in the control_test# directory. 'make clean' will then remove that directory.# # The logic to test the exit code could be transformed into# a bash script that takes the executable as the argument.# Eg. check_exit_status $testbench# # Each testbench should have the generic makecheck, with a default# of 0. The makefile sets the parameter to 1. The exitstatus file# will not be created when makecheck = 0.# .PHONY: check check: $(CONTROL_TEST_LIB_DONE) @cd $(CONTROL_TEST_DIR); rm -f exitstatus; for check in $(control_test_CHECKS); do echo -n "TEST: $$check"; $(VSIM) $(VSIM_ARGS) -c control_test.$$check -gmakecheck=1 -do "run -a; q" &> $$check.log; if ; then if ; then echo -e "\rFAIL: $$check (see $$check.log)"; rm exitstatus; exit 1; else echo -e "\rPASS: $$check"; rm exitstatus; fi; else echo -e "\rFAIL: $$check. `pwd`/exitstatus file not found. Check the testbench."; exit 1; fi; done