cadence IMC vmanager
- Details
- Last Updated: Wednesday, 01 May 2019 13:54
- Published: Wednesday, 01 May 2019 13:54
- Hits: 1679
Cadence IMC tool info:
---------------------------
IMC = Incisive Metrics Center. It is metrics anlysis tool for coverage (code, FSM and functional) analysis. It can analyze data generated from ICC (Incisive Comprehensive coverage) which is generated when irun is run with -coverage. Coverage file is generated in test_name/coverage/tests/*.ucd and *.ucm file
3 kinds of coverage:
1. Code coverage: consists of block, expresssion and toggle coverage
2. FSM coverage: coverage of all possible states and transitions in state machine.
3. Functional coverage: generated by inserting PSL, SystemVerilog assertions, or SystemVerilog covergroup statements into the code and simulating the design.
IMC reads metrics data from run dir which has all coverage database from single run. By default, metrics data is stored in:
cov_work/scope/*.ucm => model file. 8 digit hex is the checksum of design hier and code coverage metrics
cov_work/scope/test/*.ucd => data file. 8 digit hex is the checksum of design hier and func coverage metrics
By using option "irun -covworkdir coverage -covdesign tests -covtest <TEST1>", we set cov_work=coverage, scope=tests, test=TEST1. So, final coverage results stored in this dir:
coverage/tests/*.ucm
coverage/tests/TEST1/*.ucd
If we have multiple tests, we need to merge coverage results of all tests. To do this we run imc
imc -15.10-incisiv -batch -init imc_merge => -batch starts imc in cmd line interactive mode (otherwise it starts in gui mode)
imc_merge has these 2 lines:
merge test_*/coverage/tests/* -overwrite -out result
exit
This takes coverage results for all tests from "test_*/coverage/tests/*.ucm and <test_name>/*.ucd" and puts results in "cov_work/scope/result/*.ucm, *.ucd" (as specified in -out dir specified above).
Then run imc with the same version to look at coverage results:
imc -15.10-incisiv
imc window:
----------
on imc window, look in module interested in, and see "overall covered" results. This needs to be 100%. It's divided under 3 coverage: Code coverage (Block, Expression, Toggle), FSM coverage and Functional coverage.
Code coverage:
-------------
Block coverage:
Expresssion coverage:
Toggle coverage:
Expression coverage:
------
It shows terms T1, T2, etc. It looks for all possible 0/1 values of T1,T2,etc to see if everything is covered. tool should have entered that line in sim, by exercising whatever cond is needed to get there.
ex: state <= sel ? STATE1 : STATE0; It shows T1=sel, T2=STATE1, T3=STATE0. It looks for 8 possible combo of T1,T2,T3 from 000 to 111. If it says, it's looking for term T2=1, it means it's looking for STATE1 values of 0 and 1. STATE1 might be encoded as 001 => STATE1 is always 1. If STATE0 is encoded as 000 => STATE0 is always 0. Tool is smart to figure out that STATE1 can never be 0 and STATE0 can never be 1. So, it will automatically exclude these cond (shows as red with white line in b/w, reads "exclusion rule type = simulation time)
Exclusions:
-----------
We can apply exclude to whole block by clicking "Exclude" button on top after selecting amodule (shows up as red dot on LHS of that block).
We can save exclusions in *.vRefine file by clicking on Analysis->Save Refine. Then we can load it back when opening new session of imc. That way we won't have to type exclusions again.
Exclusions rule types can be 2 types:
1. Analysis time:
2. simulation time:
--------------
Vmanager:
-------------
vmanager is verification tool suite. It used to be emanager, but now it's all combined as vmanager.
It lets automate the process of verification planning, regression, collecting results and displaying them in tabular format. Vmanager provides capability to launch IMC from vPlan window for detailed coverage reports
emanager:
--------
regresssion:
--------
To run regression, do this:
emanager & => once emanager is up, click setup, then start and then open one of *.vsif file that has regression script in it. On clciking ok, it starts regression. It will show the session window that shows tests run (and how many pass, fail, run, wait, timeout(or dropped from lsf queue)
top vsif file to run is veridian_regress.vsif. It has parameters and calls another vsif file which has list of tests.
veridian_regress.vsif:
----------------
session veridian_regression {
top_dir: $ENV(MY_REGRESSION_AREA)/top_dir; => dir to run sims
master_submission_policy : execute_locally;
drm : lsf;
default_dispatch_parameters: <text>-q regress -We 00:30 -R "select[ws60 && CCASE && mem>2000]" -o /dev/null -e /dev/null -u /dev/null</text>; => lsf parameters
max_runs_in_parallel : 1000;
queuing_policy : round_robin;
};
group smoke { //there can be multiple groups with each group having separate tests to run
runs_dispatch_parameters:<text>-q regress -We 04:00 -R "select[ws60 && CCASE && mem>2000]" -o /dev/null -e /dev/null -u /dev/null </text>;
sve_name : "$ENV(DVWORK)/software/rtl_sim/regress.sve";
run_script: "$ENV(DVWORK)/software/rtl_sim/run_regress.csh"; => calls this run script which has irun cmd
scan_script: "vm_scan.pl `vm_root -home`/bin/ius.flt `vm_root -home`/bin/uvm.flt"; //this is scan script that scans for errors (*E) in log files, and reports them. provided by cadence. To have your own filtering for errors, provide your own filter file, i.e custom.flt which has these lines:
add_filter ("error", 5, "ERROR:",failure(1,"ICS", "FAILED", "FAILED", "$ENV{BRUN_TEST_NAME} FAILED due to 'ERROR' in logs")); //This si to filter out ERROR from log file
sv_seed: gen_random; //use random seed for svseed parameter on irun
timeout : 200000; //timeout a test after 200K sec
count : 1;
#include "veridian_tests.vsif" => has a lit of tests (doesn't need to be vsif file). #include is needed (C pgm syntax for including files)
};
-----------------
Above file calls "run_regress.csh" which is the run script which has irun cmd. This script has "$BRUN_TEST_NAME" in place of testcase name in irun cmd line, so that test names get picked up from *_tests.vsif file
It also has include file for other vsif file which has list of tests with args:
veridian_tests.vsif:
------
test efuse_t1 { count: 5 }; => test to be run 5 times with 5 random seed (and no additional args)
test efuse_jtag {
sim_args : ahb_bfm;
test_dir : efuse;
test_def : DISABLE_DAP_SW_BFM;
};
test pwr_smoke {
sim_args : ahb_bfm;
test_dir : pwr_if;
};
#include "veridian_other_tests.vsif" => can include other vsif files too
---------------
top vsif file is called by emanager and starts running regression. It saves results in *.vsof file, which can be loaded later to see the results of regression. This is helpful when we want to reopen the window later.
#to run regression from cmd line, do this:
emanager -c "start_session -vsif /vobs/../veridian_regress.vsif
--------
vPlan:
-------
To create/update vplan, click on vPlan icon (right before Config icon). That will bring new vPlan window.
To create new vplan, click on "New", while to read existing vPlan click on "Read".
vplan file looks like xml file. It is easy to read it in emanager, but difficult to read text.
For new vPlan, on the new window, edit Plan name on vplan editor on left to something meaningful like "refsys dv". Then goto specs on right, and "add a spec". As as many spec files (im pdf) that you want. Highlight the section, that you want to be added, right click and choose "New section (sibling or child=> child will create sub section within that test, i.e 1.1->1.1.1)". Put a name, and then it shows that item on vplan editor on left. Now if you click on "Plan" (by side of spec), then it shows attributes for each testcase that you added (if you click on that testcase). You can add "implementation notes" here to show what the testcase does. Once done, save file by going to File->Save as "refsys.vPlan".
---------------