Forum Discussion
Altera_Forum
Honored Contributor
11 years ago --- Quote Start --- Hey Bob, One more piece of advice that you can take-or-leave, I've never used a testbench created by Altera's tools. For my Qsys designs, I use the Generate pull-down to create a simulation/ folder, and use msim_setup.tcl to figure out what libraries need to be built, but then I take it from there. Its likely that had you taken the same approach, all the BFM errors you were seeing, would all disappear :) Cheers, Dave --- Quote End --- At the risk of muddying the waters with another anecdote that can also be taken or left, I've never created my own testbench or scripts that do the heavy lifting and rely largely upon the Qsys generated files. The top level TCL consists of "source msim_setup.tcl" then compiling my additional test program .sv files after executing the 'com' that Qsys generated. This is basically the flow described in the Altera tutorial in section VII of http://www.altera.com/literature/ug/ug_avalon_verification_ip.pdf e.g. here is one of my top TCL scripts.
set TOP_LEVEL_NAME "test_top"
set SYSTEM_INSTANCE_NAME "tb"
set QSYS_SIMDIR "./../foo_core_tb/simulation"
# # new 'mycom' command executes the main compile and also adds our
# # local testbench files.
alias mycom {
# # Execute the 'com' defined by the Qsys-generated msim_setup.tcl
com
echo "\ mycom"
vlog -sv "../../../../../v/altera/vip/av_st_video_classes.sv"
vlog -sv "./test_top.sv"
vlog -sv "./foo_test_program_vip.sv"
}
# Source Qsys-generated script and set up alias commands used below
source $QSYS_SIMDIR/mentor/msim_setup.tcl