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

Comparescan User Guide

Application Examples

clkdef c5 2::top.clockgen.clk3 -posedge

clkdef c6 2::top.clockgen.clk3 -negedge

clkdef c7 2::top.clockgen.clk3 -bothedge

The following rule defines a clock named c8 with a setup time of 100 units, a hold time of 120 units, and a shift of 400 units. A clock comparison triggers only on the positive edge of c8 and only at times when the expression inside the quotation marks is true in datafile1.

clkdef c8 top.clockgen.clk4 -setup 100 \

-hold 120 -shift 400 -posedge \

when "data[0:7] == 8’xaa"

Making Clocked Comparisons

This section contains example code for rules that use the clkcompare command. See “clkcompare” on page 78 for more information on this command.

Using One Clock and Two Simulation Files

In the following rules, the value of signalA in datafile1 is compared with the value of signalA in datafile2 when both signals are on the edge of clock clk1 from datafile1.

// The following rules are equivalent:

clkcompare clk1 signalA

clkcompare clk1 signalA signalA

In all of the following rules, the value of signalA in datafile1 is compared with the value of signalB in datafile2 when both signalA and signalB are on the edge of clock clk1 from datafile1.

// The following rules are

equivalent:

clkcompare clk1

signalA

signalB

clkcompare clk1 1::signalA

signalB

clkcompare

clk1

signalA

2::signalB

clkcompare

clk1 1::signalA

2::signalB

Using One Clock and One Simulation File

In the following rules, the value of top.sig1 in test.trn is compared with the value of top.sig2 in test.trn when both signals are on the edge of clock top.clk from test.trn.

datafile1 test.trn

clkcompare top.clk top.sig1 top.sig2

December 2000

49

Product Version 1.9

Comparescan User Guide

Application Examples

// OR

datafile1 golden.trn

datafile2 test.trn

clkcompare 2::top.clk 2::top.sig1 2::top.sig2

Using Two Clocks and Two Simulation Files

In the following rule, the value of top.sig1 in golden.trn is compared with the value of top.sig1 in test.trn when both signals are on the edge of clock top.clk from golden.trn.

datafile1 golden.trn

datafile2 test.trn

clkcompare top.clk top.sig1

In all of the following rules, the value of signalA in datafile1 is compared with the value of signalB in datafile2 when signalA is on the edge of clock clk1 from datafile1 and signalB is on the edge of clock clk2 from datafile2.

// The following rules are

equivalent:

clkcompare clk1

signalA

clk2

signalB

clkcompare clk1 1::signalA

clk2

signalB

clkcompare

clk1

signalA

clk2 2::signalB

clkcompare

clk1 1::signalA

clk2 2::signalB

Using Two Clocks and One Simulation File

In the following rule, the value of top.sig1 in test.trn is compared with the value of top.sig2 in test.trn when top.sig1 is on the edge of clock top.clk1 from test.trn and top.sig2 is on the edge of clock top.clk2 from test.trn.

datafile1 test.trn

clkcompare top.clk1 top.sig1 top.clk2 top.sig2

Performing a Clock Compare with Timing Checks

The following rule compares the value of signalA with the value of signalB when both signals are on the edge of clock c1, using a setup time of 100 units and a hold time of 50 units for c1 when finding the value of signalA, and using a setup time of 1200 units and a hold time of 300 units for c1 when finding the value of signalB.

clkcompare c1 signalA signalB \

-setup1 100 -hold1 50 \

-setup2 1200 -hold2 300

December 2000

50

Product Version 1.9

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