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

Comparescan User Guide

Writing Comparescan Rules

threshold

threshold thresholdMapName \ digitalValue1(analogValue1) \ [digitalValue2(analogValue2) \ digitalValueN(analogValueN)]

The threshold command maps an analog value to a single bit. Once you have defined this mapping using the threshold command, you can use the mapping in a comparison by using the -threshold option to the compare command.

threshold Command Syntax

The syntax of the threshold command maps an analog value to a single bit. The bit is named first, followed by the analog value in parentheses. The analog value can be either a single value or a range of values. To define a range of values, use <, >, =, or : symbols, as shown in the examples below.

It is an error to redefine a threshold map, so it is an error to use the same thresholdMapName with more than one threshold command in one Comparescan comparison.

threshold Command Examples

The following example maps any real value from 0 to 2.0 to 0, maps any real value from 3.0 to 5.0 to St1, and maps the value 2.5 to SuX.

threshold XXX \

0(0:2.0) \

St1(3.0:5.0) \

SuX(2.5)

// INCORRECT. Repeated threshold table. Results in error message.

threshold XXX 0(0:3.0)

The following example maps any real value less than 2.5 to 0, maps any real value greater than 3.0 to St1, and maps the value 2.5 to Sux.

threshold YYY \

0(<2.5) \

St1(>3.0) \

Sux(2.5)

December 2000

89

Product Version 1.9

Comparescan User Guide

Writing Comparescan Rules

threshold Example in a Rules File

datafile1 analog.trn datafile2 digital.trn threshold HH \

0(0:2.0) \ St1(3.0:5.0) \ Sux(2.5)

threshold ZZZ \ 0(<=2.5) \ St1(>3.0)

// Width mismatch.

compare top.real_signal1 top.digital_signal1 -threshold HH compare top.real_signal2 top.digital_signal2 \

-threshold1 HH \

-threshold2 ZZZ

December 2000

90

Product Version 1.9

Comparescan User Guide

Writing Comparescan Rules

report

report {-r1 | -r2} [-values] [filename]

The report command generates a summary report (-r1) or a full report (-r2) and then outputs that report either to a file or to the standard output. If you do not specify a filename,

Comparescan prints the report to the standard output.

A summary report contains the number and type of compare errors that occur during the comparison, along with the first maxerrors errors, sorted by time.

A full report contains the number and type of compare errors that occur during the comparison, along with a complete listing of every error in the database, sorted by time.

Use the -values option to include the value of in the report.

report Command Examples

To generate a summary report on the standard output, use the -r1 option as follows:

report -r1

To write a full report to a file, specify a filename with the -r2 option as follows:

report -r2 full.rpt

To write both a summary report and a full report to one file, specify a filename with both the -r1 and the -r2 options on one report command as follows:

report -r1 -r2 all.rpt

Note: Multiple report commands are not allowed in the rules file.

To write a report that includes the actual values of mismatched variables, specify the -values option, as follows:

report -r2 -values test.rpt

This produces report entries in the following style:

:"eprom_array(0)":addr value = UUUUUUUUUUUUUUUU: Signal compare mismatch with :"eprom_array(0)":addr value = 0000000000000000, between 10ns and 20ns

:"eprom_array(0)":ce value = 0: Signal compare mismatch with :"eprom_array(0)":ce value = 1, between 20ns and 70ns

December 2000

91

Product Version 1.9

Comparescan User Guide

Writing Comparescan Rules

savedata

savedata filename

The savedata command saves a Comparescan error database to a file for later viewing.

savedata test1.csd

savedata design1.csd

Note: To ensure that you can always view the results of any comparison that you perform, you should use the savedata command in each rules file that you create.

savedata Command Example

When you perform a comparison in batch mode that you want to examine at a later time, you can use a rules file similar to the following to save the resulting error database file:

datafile1 golden.trn

datafile2 test.trn

compare .

savedata c1.csd

Later, you can view the database file that results from the above comparison by using the File—Open menu command in the GUI, or by specifying the database file on the command line:

comparescan c1.csd

You can also view a database file by using the loaddata command in a rules file:

loaddata c1.csd

December 2000

92

Product Version 1.9

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