|
|
|
Unit hierarchy ASCII text report from specman.
- In this site hierarchy scripts were discussed regrading a verilog, VHDL or mixed design.
Please see example: script
- For the HDL it usually possible to obtain a list of all loaded files easily. Sometimes it -for HDL- requires a non affordable effort. For example in cases such as you become part of great project and there is no single list. For those cases I used the ncls utility.
Please see example: ncls
-
For the hdl hierarchy finder, I had a perl script that extracts hierarchy. While it is fairly easy to obtain the list of files loaded into specman e_list , I decided for a different approach.
I count entirely on the specman tool to generate the required information and than parse it with a perl script.
- First I added this e-code to the test.
//Suggested by my friend :Author of Specman Verification
extend any_unit {
post_generate() is also {
outf("dbg pini path A\n");
print me;
outf("dbg pini path B\n");
};
};
//Note: this code may not work on encrypted code.
- Now you can run the script and obtain a nice report of the specman units involved:
perl ~/bin/e_tree.pl specman.elog.The report looks like:
----------------------------------------
message_logger-@1:
message_logger
e_path:sys.logger
hdl_path:
----------------------------------------
----------------------------------------
pm_37_clkgen_seed_generator_u-@2:
pm_37_clkgen_seed_generator_u
e_path:sys.pm_37_clkgen_seed_generator
hdl_path:
----------------------------------------
----------------------------------------
virtual_driver_u-@3:
virtual_driver_u
e_path:sys.pm_tb_env.virtual_driver
hdl_path:~/pm_tb
----------------------------------------
...
----------------------------------------
pm_tb_env_u-@6:
pm_tb_env_u
e_path:sys.pm_tb_env
hdl_path:~/pm_tb
----------------------------------------
----------------------------------------
sys-@0:
sys
e_path:sys
hdl_path:
----------------------------------------
- This script can be improved to output a better report doing the following:
The output is not sorted. The way specman prints it to the log file is the one printed to the report.
The specman e-log contains much more information than the unit tree, which is reported presently by the script. All kind of ports are listed: such as event, bit and method ports.
- go to the script e_tree script
- Note that the HDL path of each unit is shown in the report. Also note that the HDL path can be printed per each unit, using the following:p sys.env.full_hdl_path()
-
I have an improved version of the
script.
From the very same info I colloect:
unit name, e path, hdl path, driver type and enclosing unit. The last
two are for sequence drivers. The data is sorted in a complex way. First it is
sorted by the hierarchy depth. Next for same level of hierarchy units, e path
based sort is used.
if($ARGV[0] eq "c") {
#complex sort
#unit e_path hdl_path driver_type enclosing_env
@as = sort {
&hier_level($a, $a_level);
&hier_level($b, $b_level);
if ($a_level > $b_level) {return 1;}
elsif($a_level < $b_level) {return -1;}
else {
return $a cmp $b;
}
} @a;
print("\n\ntree report\n");
print("===========================================================\n");
foreach $j ( @as ) {
...
|
... |
|
I would be happy to offer my services. Call ASAP !
|
Search This Site
Feedback This Site
new pages on this site
|
|