Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
dsd1-10 / dsd-07=Verilog / comparescan.pdf
Скачиваний:
95
Добавлен:
05.06.2015
Размер:
760.57 Кб
Скачать

Comparescan User Guide

Writing Comparescan Rules

loaddata

loaddata filename

The loaddata command opens a Comparescan binary error database file that was previously saved with the -save command-line option, the savedata rules file command, or the File—Save or File—Save as GUI menu command.

Note: You rarely need to use the loaddata command. Most often, you choose File—Open from the Comparescan menu to load a previously saved database from within Comparescan, or use a command such as the following at the operating system command line, where error_data.csd is a Comparescan error database:

comparescan error_data.csd

loaddata Command Example

To load the error database that was saved to file test1.csd, use the following command in a rules file:

loaddata test1.csd

December 2000

93

Product Version 1.9

Comparescan User Guide

Writing Comparescan Rules

translate

translate [-f] input_filename [SST2_output_filename]

The translate command translates a simulation results database file into SST2 database format.

If you do not specify the SST2_output_filename, Comparescan generates a filename automatically, based on the input_filename that you specify. The automatically generated SST2 output filenames are the same as the input_filename, after removing any extension and adding the .trn and .dsn extensions.

For example, the following command:

translate /simresults/cpu1/test1.dump

generates files named:

/simresults/cpu1/test1.trn

/simresults/cpu1/test1.dsn

You can also use the translate command to give the new file any name and location you wish, as follows:

translate /tmp/xyz.dump ~/designs/cpu1/SST2/xyz

If the file SST2_output_filename is newer than the file input_filename, Comparescan does not generate the output files.

If the file SST2_output_filename already exists, Comparescan does not overwrite the existing output files unless you specify the -f option with the translate command. The -f option forces Comparescan to write to the specified output files, even if they already exist.

For example, the following command translates the VCD file test1.vcd into SST2 format and writes it to the files mydesign.trn and mydesign.dsn:

translate /simresults/cpu1/test1.vcd mydesign

The following command translates the VCD file test2.vcd into SST2 format and overwrites the SST2 files that the previous command created:

translate -f /simresults/cpu1/test2.vcd mydesign

Generally, the translate command supports all of the formats that are supported by Signalscan Waves, including VCD format.

Note: Normally, you do not need to use the translate command. You can specify a file in any supported simulation results format with the datafile1 and datafile2 commands in the rules file, on the command line, or in the GUI options settings. If Comparescan finds a file

December 2000

94

Product Version 1.9

Comparescan User Guide

Writing Comparescan Rules

that is not in SST2 format, Comparescan automatically translates that file into SST2 format.

The comparison then proceeds, using the generated SST2 files.

For example, the following rules file specification:

datafile1 golden.vcd

datafile2 test.vcd

compare . -maxerrors 20

is equivalent to the following:

translate golden.vcd

translate test.vcd

datafile1 golden.trn

datafile2 test.trn

compare . -maxerrors 20

Translating Large Files

When you need to translate large simulation files, you may want to create a rules file that translates the simulation files and another rules file that runs the comparison. Using two different rules files gives you more flexibility in deciding how Comparescan generates your files.

For example, you can create a rules file similar to the following to translate your simulation files:

translate xyz.vcd /tmp/bigspace/xyz.trn

translate abc.vcd /tmp/bigspace/abc.trn

You can then create a second rules file similar to the following to compare your translated files:

datafile1 /tmp/bigspace/xyz.trn

datafile2 /tmp/bigspace/abc.trn

compare .

Then you can run Comparescan twice, once to translate the files and once to compare the files, as follows:

%comparescan -batch xlat.rules

%comparescan -run comp.rules

Translating Files Without Using the translate Command

You can translate your files and compare them using a single rules file. There are two ways to do this. First, you can issue the translate command within your rules file and then

December 2000

95

Product Version 1.9

Comparescan User Guide

Writing Comparescan Rules

specify your comparison commands. Or you can let the datafile1 and datafile2 commands translate your files automatically (without using a translate command).

Using a translate command is convenient because you can choose where your output

files are located.

Letting datafile1 and datafile2 translate your simulation results has the following features:

Comparescan always generates the output files (the SST2 Database) in the same directory as the input file, and the output file always has the same base filename as the input file.

If the output files already exist, Comparescan checks their timestamp against the timestamp of the input file. If the existing SST2 database file is newer, Comparescan does not perform a translation.

For example, the datafile commands in the following rules file automatically translate the specified VCD files into SST2 format before comparing the two files:

datafile1 xyz.vcd

datafile2 abc.vcd

compare .

December 2000

96

Product Version 1.9

Соседние файлы в папке dsd-07=Verilog