Reply To: Riviera / MATLAB Cosim with OSVVM Scripting

Why OSVVM™? Forums OSVVM Riviera / MATLAB Cosim with OSVVM Scripting Reply To: Riviera / MATLAB Cosim with OSVVM Scripting

Brad Adam

Hey, I appreciate the insight and I actually worked my way to this action after noticing that the simulate command called vsim. I guess one more question to make sure I’m understanding these scripts correctly.

Currently, I know the following script will allow my to run my test and see the results:

SetCoverageSimulateEnable true

analyze $PATH_TO_TEST/testcase_file.vhd
vsim -dbg -t 0 -ieee_nowarn -dataset {$PATH_TO_SIM_DIR/sim} -datasetname {sim} -loadvhpi $aldec/bin/aldec_matlab_cosim.dll:ml2hdl work.testcase_file -acdb -acdb_cov sbm -cc_all

run -all

SetCoverageSimulateEnable false

I’ve generalized some of the path names and there is some setup scripted before such as building the osvvm profile and some test specific profiles. However, that above command set allows me to run the test and I can see coverage results in Riviera but no reports are generated by osvvm in the CodeCoverage directory.

If I change the above flow to the following I will encounter errors in trying to run the test:

SetExtendedSimulateOptions “-dbg -t 0 -ieee_nowarn -dataset {$PATH_TO_SIM_DIR/sim} -datasetname {sim} -loadvhpi $aldec/bin/aldec_matlab_cosim.dll:ml2hdl work.testcase_file -acdb -acdb_cov sbm -cc_all”

SetCoverageSimulateEnable true

RunTest $PATH_TO_TEST/testcase_file.vhd

SetCoverageSimulateEnable false

Is RunTest required for generation of the coverage report? Since the first option above runs the cosim and I can verify in Riviera that code coverage is highlighted in the code what I am most interested in here is how exactly the usual OSVVM scripted flow generates the output report.

Until now I’ve just always used RunTest so this is the first time I’ve needed to dig into the mechanisms behind the report generation.