Languages

CommunityCategory: XMODELDumping the waveforms of selected signals only
SA Support Team Staff asked 4 years ago

The $xmodel_dumpvars() command dumps the waveforms of all the signals in the design hierarchy. When the design size is large and simulation time is long, the waveform file can become too large to handle. To reduce the size of the waveform file, can I dump the waveforms of specific signals or signals contained in specific instances only?

1 Answers
Best Answer
SA Support Team Staff answered 4 years ago

Yes! You can specify a variety of options to the $xmodel_dumpvars() command to limit the scope of the waveforms to be recorded, such as the depth of the design hierarchy, types of the signals, start/stop times of recording, etc. In general, the $xmodel_dumpvars() command has the following syntax:

$xmodel_dumpvars( [option spec]*, [module or variable name]* );

where […] denotes optional arguments and the asterisk (*) indicates that an arbitrary number of arguments can be supplied. However, all the option spec arguments must precede the module or variable name arguments. Each option spec argument can be either a single string of "arg=value" or a pair of "arg=" and value arguments. Each module or variable name argument is either the local or global name of the module instance or signal. For the complete information of the available options and their descriptions, please refer to the XMODEL User Guide, Section 5.6.

Here are some quick examples for illustration. First, to dump the signals in the current hierarchy only (i.e. the hierarchy where the $xmodel_dumpvars() command is used), you can use the 'level' option to specify the level of monitoring depth:

$xmodel_dumpvars ("level=1");

To dump the selected signals located in the current hierarchy, you can list their names as below:

$xmodel_dumpvars (sig1, sig2, sig3);

It is also possible to dump the signals located in other hierarchy levels, using the hierarchical names of the signals:

$xmodel_dumpvars (INST_A.sig1, INST_B.sig2, INST_C.INST_D.sig3);

To dump the signals contained in a selected module instance and its own hierarchies below, you can list the names of the module instances:

$xmodel_dumpvars (INST_A, INST_B, INST_C);

It is also possible to combine multiple options together. For instance, the example below dumps the signals contained in the highest hierarchy of the instances INST_A, INST_B, and INST_C only:

$xmodel_dumpvars ("level=", 1, INST_A, INST_B, INST_C);

This another example dumps the xreal-type signals contained in the instances INST_A and INST_B and their hierarchies below:

$xmodel_dumpvars ("type=xreal", INST_A, INST_B);

The 'dump' primitive symbol available in GLISTER provides the equivalent interface to specify these options. For example, a 'dump' primitive with the options set as shown below would produce the following statements in the XMODEL netlist.

SA Support Team Staff asked 4 years ago

$xmodel_dumpvars() 명령은 모델 계층에 포함된 모든 신호들의 파형을 덤프합니다. 그런데, 모델 크기가 커지고 시뮬레이션 시간이 길어지면, 파형을 저장하는 파일의 사이즈가 너무 커져서 다루기 힘든 경우들이 있습니다. 파형 파일의 크기를 제한하기 위해서, 내가 원하는 신호 또는 원하는 모듈 인스턴스에 포함된 신호들만 덤프하는 방법이 있을까요?

1 Answers
Best Answer
SA Support Team Staff answered 4 years ago

Yes! You can specify a variety of options to the $xmodel_dumpvars() command to limit the scope of the waveforms to be recorded, such as the depth of the design hierarchy, types of the signals, start/stop times of recording, etc. In general, the $xmodel_dumpvars() command has the following syntax:

$xmodel_dumpvars( [option spec]*, [module or variable name]* );

where […] denotes optional arguments and the asterisk (*) indicates that an arbitrary number of arguments can be supplied. However, all the option spec arguments must precede the module or variable name arguments. Each option spec argument can be either a single string of "arg=value" or a pair of "arg=" and value arguments. Each module or variable name argument is either the local or global name of the module instance or signal. For the complete information of the available options and their descriptions, please refer to the XMODEL User Guide, Section 5.6.

Here are some quick examples for illustration. First, to dump the signals in the current hierarchy only (i.e. the hierarchy where the $xmodel_dumpvars() command is used), you can use the 'level' option to specify the level of monitoring depth:

$xmodel_dumpvars ("level=1");

To dump the selected signals located in the current hierarchy, you can list their names as below:

$xmodel_dumpvars (sig1, sig2, sig3);

It is also possible to dump the signals located in other hierarchy levels, using the hierarchical names of the signals:

$xmodel_dumpvars (INST_A.sig1, INST_B.sig2, INST_C.INST_D.sig3);

To dump the signals contained in a selected module instance and its own hierarchies below, you can list the names of the module instances:

$xmodel_dumpvars (INST_A, INST_B, INST_C);

It is also possible to combine multiple options together. For instance, the example below dumps the signals contained in the highest hierarchy of the instances INST_A, INST_B, and INST_C only:

$xmodel_dumpvars ("level=", 1, INST_A, INST_B, INST_C);

This another example dumps the xreal-type signals contained in the instances INST_A and INST_B and their hierarchies below:

$xmodel_dumpvars ("type=xreal", INST_A, INST_B);

The 'dump' primitive symbol available in GLISTER provides the equivalent interface to specify these options. For example, a 'dump' primitive with the options set as shown below would produce the following statements in the XMODEL netlist.