概述
1.fsdbreport可以将fsdb的某个信号值抽出
该功能在波形比较的时候有大用。举例:
这个命令是将psel==1&penable==1&pwrite==0&pready==1时对应的prdata数据写到tmp_prdata.txt文件中,可以不加-exp条件,直接写出prdata数据,注意这个数据只在跳变的时候写出 -w 32是指定prdata的位宽
-bt :begin time
-et:end time
以上可以设置dump的开始结束时间,有时我们只需要某个时刻的值
-cn:设置显示列数, 0 表示所有满足的信号以一列形式显示
-s:后面可跟多个信号或信号范围,可带通配符 " * "
显示结果如下:满足i_*,和o_*的信号按列显示在time=1000ns=1000000000fs的信号值
还有其他很多用法可以在Synopsys官网上找到。下面贴出官网的手册
2.fsdbreport manual
fsdbreport is a utility to generate an ASCII text file of value change lists for specified signals from an FSDB dump file.
NOTE: fsdbreport supports FSDB files with transaction-type signals with the following exceptions:
1) Transaction type signals cannot be used with -strobe or
-levelstrobe options. Otherwise, error messages similar to the following are printed to the console:
*WARN* Transaction type signal </BusTop/MyAHB_1/AhbTransaction> cannot be used with -strobe!
*WARN* Report stop!
*WARN* Transaction type signal </BusTop/MyAHB_1/AhbTransaction> cannot be used with -levelstrobe!
*WARN* Report stop!
2) To accommodate the long and variable length of transaction type value changes, fsdbreport automatically uses a non-table format report (that is, -cn 0) whenever a transaction type signal exists in the signal list. The output format looks like the following:
Time:0
SystemC/HRESP 00
SystemC/HADDR 00000000000000000000000000000000
SystemC/HWRITE 0
Time:60000
/BusTop/MyAHB_1/AhbTransaction
*** single read (0 60000)-(0 140000) ***
Command=single read
Master='d 2
Slave='d 2
StartAddress='d 14526
Data="00000000000000000000000010101010"
Response=split
BurstType=single
BeatCount='d 1
SizePerBeat=1 byte
3) The -of and -af options do not change the output format of a transaction's attribute value.
Usage:
fsdbreport fsdb_filename [-f config_file] [-bt time[unit]] [-et time[unit]]
[-nocase] [-w column_width] [-of output_format] [-verilog | -vhdl] -s {signal [-level level_depth] [-a name] [-w column_width] [-af alias_file]
[-of [b|o|d|u|h]] [-verilog|-vhdl] [-precision precision_value]}[-strobe [signal=="value"] [-a name] [-w column_width] [-verilog|-vhdl]]
[-levelstrobe "expression"] [-a name] [-w column_width] [-verilog|-vhdl]]
[-shift shift_time | -shiftneg shiftneg_time] [-period period_time]
[-cn column_number] [-log filename] [-o reported_filename]
[-pt time_precision] [-csv] [-find_forces [-no_value] [-no_fdr_glitch]] [-ignore_2G][-first_force]
Options
Explanation
-a alias_name
Defines the alias for the output signal.
-af alias_file
Specifies an nWave waveform alias file.
NOTE: Specifies the -af option must be specified for each signal. For example:
-s
/tb/chip/lbu/core/dmac/haddr -a haddr -af novas.alias
/tb/chip/lbu/core/dmac/hwdata -a hwdata -af novas.aliafsdbs
-bt time[unit]
Specifies the begin time of the report. If omitted, the begin time of the FSDB file is used. The time unit is Ms, Ks, s, ms, us, ns, ps, or fs. The default time unit is ns.
-cn column_number
Defines the number of columns for the report, including the time column. Column number is set to be 0 or an integer larger than 1. When setting to 0, the signal name and its value are not printed in the format of a table, but line by line.
NOTE: This option is ignored if the -csv option is also specified.
-csv
Saves the output report file in the CSV format. If this option is specified with -cn and -w, these options are ignored.
NOTE: If the selected signals contain stream, coverage, or SVA type signals, the -csv option is ignored and non-csv format is output.
-et time[unit]
Specifies the end time of the report. If omitted, the end time of the FSDB is used. The time unit is Ms, Ks, s, ms, us, ns, ps, or fs. The default time unit is ns.
-exclude_scope "scope1" ["scope2" … "scopeN"]
Excludes signals under the specified scopes. Each scope is enclosed with double quotes. To exclude subscopes of the specified scopes, the wildcard character "*" is appended at the end of the scopes.
Example:
-find_forces -exclude_scope "/system/cpu/*" "/system/s1"
NOTE:
1) Use this option with the -find_forces option.
2) The -exclude_scope option has higher priority than the -s option.
-exp expression
Reports values when the expression changes to true (==1). The expression syntax is the same as the Logical Operation command under the Signal menu in nWave.
Example: fsdbreport verilog.fsdb -s system/data -exp "/system/addr=='h30 & /system/clock==1"
-f config_file
Specifies a text file which defines all the options except -h and -f. The pound (#) sign isadded to the beginning of a line as a comment line.
Example:
fsdbreport example.fsdb -f config_file -o output.txt
-find_forces
Shows signals with force, release, or deposit events and the signal values.
-h | -help
Prints the help message.
-level level_depth
Specifies the number of levels to be dumped under the specified scope. Use this option with the -s option.
When set to 0, all signals below the specified scope is dumped.
-levelstrobe "expression"
Dumps values when the expression holds true (level sampling). If the expression is not true, the time point and value are not dumped. The expression can consist of one strobe signal (for example, "a==1") or multiple strobe signals (for example, "a==1 && b==1"). The -strobe and -levelstrobe options cannot be used together.
Example:
fsdbreport verilog.fsdb -levelstrobe "/system/clock==1 && /system/sig==1" -s /system/data /system/addr
-log filename
Specifies the output log file name. The default file name is err.log.
-nolog
Disables generation of the fsdbreportLog log directory.
-nocase
When included, the mapping of signal names is not case-sensitive. The default is case-sensitive.
-no_fdr_glitch
Shows the stable value for force, release, and deposit events.
NOTE: This option is optional and is used with the -find_forces option; otherwise, it is ignored.
-no_value
Disables value display of force, release, and deposit events.
NOTE: This option is optional and is used with the -find_forces option; otherwise, it is ignored.
-o reported_file_name
Specifies the output report file name. If the -o option is not specified, the default is report.txt.
-of [b|o|d|u|h]
Defines the output display format as binary, octal, decimal, unsigned decimal, or hexadecimal. Its default value is binary. When this option is specified before the -s option, it is applied globally. When this option is specified after a signal, it is applied locally.
-period period_time
Dumps values at each specified time.
-precision precision_value
Defines the precision (the number of decimal places to include) of output values for analog signal types. This option is ignored for digital signal types.
Example:
- Original output without the -precision option:
> fsdbreport test.tr0.fsdb -s "I(vcc"
Time(1.0) I(vcc
========== ==========
0.000000e+00 -10.0pA
5.000000e-11 23.4nA
1.000000e-10 25.0nA
3.000000e-10 30.4nA
1.100000e-09 41.0nA
2.100000e-09 43.3nA
3.100000e-09 43.4nA
- Report with the -precision 7 option:
> fsdbreport test.tr0.fsdb -s "I(vcc" -precision 7 -w 20
-o report_with_precision_5.txt
Time(1.0) I(vcc
========== ====================
0.000000e+00 -1.0000000e-11A
5.000000e-11 2.3453000e-08A
1.000000e-10 2.5039000e-08A
3.000000e-10 3.0451002e-08A
1.100000e-09 4.1056001e-08A
2.100000e-09 4.3309001e-08A
3.100000e-09 4.3463999e-08A
4.100000e-09 4.3423999e-08A
5.100000e-09 4.3402000e-08A
6.100000e-09 4.3387999e-08A
7.100000e-09 4.3374001e-08A
-pt time_precision
Defines the time precision (the number of decimal places to include) of the output value for analog signal types. This option is ignored for digital signal types.
Example:
fsdbreport hspice.fsdb -s "/v(_be0" -pt 5 -o 1.txt
-s {signal_name [options]}
Specifies the signals or scopes to be reported. When specifying a scope name, the wildcard character "*" is appended to the end with double quotes. At least one -s must be included.
NOTE: For system tasks or system functions, when a scope or signal name begins with '$' (for example, $root), it denotes a variable in the Unix shell, and gives a warning that the variable root value is not obtained. To avoid this error usage, use single quotes (') to replace double quotes ("). For example:
fsdbreport test.fsdb -s '/$root/En_a' -o test_report.txt
NOTE: If the output format needs to be specified for multiple signals, the output specification must immediately follow each of the desired signals. For example:
fsdbreport test_fsdb.fsdb -o multi_scope.txt
-s "/U_core_top*" -precision 5 -w 17
"/U_pad_ring*" -precision 6 -w 20 -bt 555 -et 555
-precision 5 -w 17 belongs to the "/U_core_top*" signal
-precision 6 -w 20 belongs to the "/U_pad_ring*" signal
If the following are specified, the -precision 6 -w 20 only belongs to /U_pad_ring:
fsdbreport test_fsdb.fsdb -o multi_scope.txt
-s "/U_core_top*" "/U_pad_ring*" -precision 6 -w 20
-bt 555 -et 555 -cn 20
-shift | -shiftneg
Specifies to shift (plus) or shiftneg (minus) the report time when the strobe signal matches the specified value. Use this option with the -strobe option.
Example: fsdbreport verilog.fsdb -shift 10
-s "system/VMA" -strobe "system/clock==1" -o 1
Samples the value for VMA 10 time units after the clock becomes 1.
fsdbreport verilog.fsdb -shiftneg 300ps -s "system/VMA"
-strobe "system/clock==1" -o 1
Samples the value for VMA 300ps before clock becomes 1.
-strobe "expression"
Reports values when the value of the strobe signal changes to the specified value (edge sampling). The strobe is in the format of “signal==value”. For multi-bit signals, the value is in binary without leading zeros.
-verilog | -vhdl
Specifies the output format as Verilog or VHDL format. When this option is specified before the -s option, it is applied globally. When this option is specified after a signal, it is applied locally.
-w column_width
Defines the width of the signal column. When this option is specified before the -s option, it is applied globally. When this option is specified after a signal, it is applied locally. The default column width is 10. If the width of the signal or value is greater than the specified column, then '*' is used in the signal or value. For example, if /system/addr is an 8-bit bus:
> fsdbreport verilog.fsdb -w 5 -s /system/addr
*addr is reported with values, such as, *0000 in report.txt.
For the strobe, level_strobe or expression signal, if the width is less than the maximum time width, the width is automatically expanded to the maximum time width.
NOTE: This option is ignored if the -csv option is also specified.
-ignore_2G
Reports FSDB if the signal count of input FSDB is over 2G.
Reporting fails if the count of user interested signal is over 2G.
-first_force
Only shows the first force event for signal. This option works only with the -find_forces option.
Examples:
1. Assign the begin time (1000ps) and end time (2000ps) for the report. The value of the end time must be greater than the value of the begin time; otherwise, no output is generated.
> fsdbreport verilog.fsdb -s /system/addr -bt 1000ps -et 2000ps
2. Report multiple signals. Only one -s option takes effect. If two or more are specified, only the last -s takes effect. For example, the following commands lead to the same result with addr being reported only:
> fsdbreport verilog.fsdb -s /system/clock -s /system/addr
> fsdbreport verilog.fsdb -s /system/addr
However, both clock and addr are reported with the following command:
> fsdbreport verilog.fsdb -s /system/clock /system/addr
3. Report a slice of a bus signal. The MSB and LSB of the partial bus must match the original bus. For example, if there is the addr[7:0] bus, bits 7, 6, 5, and 4 are extracted with the following command:
> fsdbreport verilog.fsdb -s "/system/addr[7:4]"
If the following command is executed, nothing is extracted:
> fsdbreport verilog.fsdb -s "/system/addr[4:7]"
4. Report signals in the signal list using different formats.
> fsdbreport fsdb/vhdl_typecase.fsdb -nocase -s top/SIMPLE_REC.FIELD3
-a simple.field3 -w 15 TOP/COMPLEX_REC.F1.FIELD3 -a complex.f1.field3
-w 20 top/a_std_logic_vector -af sean2.alias -of a -o output.txt
-bt 1000 -et 2000
simple.field3 is reported as the alias for the top/SIMPLE_REC.FIELD3 signal, complex.fl.field3 is reported as the alias for the TOP/COMPLEX_REC.F1.FIELD3 signal, and the alias values in sean2.alias are reported for the top/a_std_logic_vector signal.
5. Report signals using different output formats. For example, the formats are applied globally with the following command:
> fsdbreport verilog.fsdb -w 15 -of d
-s /system/addr /system/clock
The column width is 15 and the radix is decimal for both /system/addr and /system/clock.
The following command applies column width of 12 and radix of 16 (hexadecimal) locally to /system/addr.
> fsdbreport verilog.fsdb -w 15 -of d -s /system/addr -w 12
-of h /system/clock
However, column width of 15 and radix of 10 (decimal) are applied globally to /system/clock.
6. Report a scope and its descendants. Multiple scopes may be specified.
> fsdbreport rtl.dump.fsdb -bt 10 -et 100
-s "/system/i_cpu/*" -level 3 /system/i_pram/clock -cn 0
Up to 3 levels of scopes below /system/i_cpu and the /system/i_pram/clock signal between 10-100ns are reported. The results are printed line by line.
7. Report the results for the specified strobe point using -strobe.
> fsdbreport verilog.fsdb -strobe "/system/clock==1" -s /system/data /system/addr
Only when the value of the /system/clock signal is 1, the values of the
/system/data and /system/addr signals are reported.
8. Specify a configuration file. In the configuration file, all the command options (except -h or -f) are specified in a single line or multiple lines. The fsdbreport utility reads them in order. For example, the following three files generate the same extracted results:
File1:
-w 12 -s /system/addr /system/clock
-w 15 -et 1200
File2:
-w 12
-s /system/addr /system/clock -w 15 -et 12000
File3:
-w 12
-s /system/addr
/system/clock
-w 15 -et 12000
> fsdbreport verilog.fsdb -f File1
> fsdbreport verilog.fsdb -f File2
> fsdbreport verilog.fsdb -f File3
9. Report the results when the expression value changes to true.
> fsdbreport verilog.fsdb -exp "/system/addr=='h30 & /system/clock==1"
-s /system/data
When the value of the /system/addr signal is 'h30, and the value of the
/system/clock signal is 1, the expression is TRUE. The value of the
/system/data signal is reported when the expression is TRUE.
10. Report the force, release or deposit information of the specified signals using -find_forces.
> fsdbreport rtl.fsdb -find_forces -s "/system/i_cpu/*" -level 2 -o report.txt
When the specified signals meet the following conditions, the signal information is reported:
• Signals with force, release, or deposit events
• Signals under the /system/i_cpu scope
• Signals located two levels under the specified scope. If the level is more than 2, the signals are ignored.
11. Report the force of the specified signals using -find_forces and -exclude_scope.
> fsdbreport rtl.fsdb -find_forces -s "/system/i_cpu/*" -exclude_scope "/system/i_cpu/s1/*" "/system/i_cpu/s2" -o report.txt
12. Exclude a specific scope without excluding its subscopes.
> fsdbreport test.fsdb –exclude_scope "/top/system" –o out.txt
13. Specify a scope and exclude the specified scope and its subscopes.
> fsdbreport test.fsdb –exclude_scope "/top/system/*" –o out.txt
14. Exclude multiple scopes.
> fsdbreport test.fsdb –exclude_scope "/top/system/*" "/top/S1" "/top/S2/" –o out.txt
3.其他使用工具
1)波形类型转换类:fsdb2saif,fsdb2vcd,
log2fsdb(只能增加某些周期性信号,从log txt直接产生fsdb波形,适合于siloti的某些分析)
xml2fsdb
vpd2fsdb,vcd2fsdb;
2)fsdb的波形合并与抽取:fsdbextract,fsdbmerge;
3)fsdb波形文件的修改,主要是scope:fsdbedit;
4)由fsdb生成force等信息的报告,fsdbreport;
由fsdb拿到file的依赖关系,gencom;
由kdb db中抽出filelist,kdb_extract_source;
5)使用工具:bacom,直接进行behavior analysis;(比普通的load,driver的分析,更加具体)
arm的gdb debug库,分为elf和非elf两种;
sdfin,对sdf进行编译;
vdCov,直接打开verdi的coverage功能;
剩下的:1)vericom,编译verilog;
2)vhdlcom,编译vhdl;
3)nWave,只打开fsdb;
4)siloti,打开siloti;(波形文件大小会比fsdb小很多,只记录真正的驱动点,
很多propgate的驱动不会记录,方便rtl波形反标netlist波形)
————————————————
版权声明:本文为CSDN博主「cy413026」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/cy413026/article/details/97162566
个人记录:
1、将fsdb的某个信号值抽出为可读文件
fsdbreport xxx.fsdb -bt 100 -et 200 -s "tb_top/dut/output[63:0]" -w 64 -of h
-o output.log
2、波形截取
仿真波形截取_秋予川-CSDN博客_fsdbextract
最后
以上就是明亮哑铃为你收集整理的【转载】verdi方法fsdbreport将fsdb的某个信号值抽出为可读文件 及波形转换,合并,修改工具的全部内容,希望文章能够帮你解决【转载】verdi方法fsdbreport将fsdb的某个信号值抽出为可读文件 及波形转换,合并,修改工具所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复