- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Modelsim Altera Starter Edition,
Is there a way to redirect output stream of a macro file to a file ? I use "mymacro.do" to display what_i_want_in_the_console. I would like to parse the ouput stream to a file. My searches in document, alteraforum and web didn't give anything.Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using the command-line version of vsim, you can redirect the output to a file. Eg., something like
vsim -c testbench -do "run -a; q" &> testbench.log
Cheers Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thanks for answer,
vsim -c myentity -do mymacro.do &> mymacro.log
But vsim command doesn't like &> mymacro.log. It would like to take this as an entity. So solution not found yet...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I found a workaround : write the transcript window to a file
write transcript myfile.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start ---
vsim -c myentity -do mymacro.do &> mymacro.log
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, Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, thanks, I will cogitate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page