Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
68
Добавлен:
06.06.2017
Размер:
3.31 Mб
Скачать

Format definitions

BOOLEAN:

Marks the start of a group of one or more <boolean assignments> used as temporary variables in subsequent <delay assignments>. A <boolean assignment> is one of the following forms:

<boolean variable> = {<boolean expression>} <boolean variable> = any valid variable name

<boolean expression>

This is a C-like, infix-notation expression which generates one of the two boolean states, TRUE or FALSE. The expression must be enclosed in curly braces {...}. The <boolean expression> may use the continuation character (+) to span more than one line. Boolean expression operators and their precedence are as follows:

Operator

Definition

Precedence

 

 

 

~

Unary negation

1

 

 

 

= =

Equality

2

 

 

 

!=

Inequality

3

 

 

 

&

AND

4

 

 

 

^

Exclusive OR

5

 

 

 

|

OR

6

 

 

 

Table 23-20 Boolean expression operators

Operands are one of the following:

Previously assigned <boolean variables> Reference functions

Transition functions

<boolean constants> (TRUE or FALSE)

Logic levels ,('0, '1, 'R, 'F, 'X) may be used as operands for the '==' and '!=' operators only. This lets the boolean logic examine input states as in, "START={COUNT=='R & RESET=='0}". Note that the mandatory single quote (') is a part of the constant name.

557

Reference functions

Reference functions provide the means to detect logic level transitions on <reference nodes> and <input nodes>. They return boolean values and may be used within any <boolean expressions>. The functions are:

CHANGED(<node>,<reference time>)

CHANGED_LH(<node>,<reference time>)

CHANGED_HL(<node>,<reference time>)

The CHANGED function returns TRUE if <node> has made a transition in the last <reference time> seconds, relative to the current time.

The CHANGED_LH function returns TRUE if <node> has made a low to high transition in the last <reference time> seconds, relative to the current time.

The CHANGED_HL function returns TRUE if <node> has made a high to low transition in the last <reference time> seconds, relative to the current time.

Reference functions consider only the last or current transition. They do not consider all transitions within the last <reference time> seconds.

<reference time> may be zero, in which case only current transitions at the evaluation time are considered.

Transition functions

These functions let you detect changes on the <output nodes> for which the <delay expression> is being evaluated. They return boolean values. They take no arguments, and refer implicitly to the changes on the <output nodes> at the current time. The functions are of the format:

TRN_pc...where p refers to the prior state and c refers to the current state.

State values are chosen from the set {L, H, Z, $}. The '$' state refers to the 'don't care' state. Thus TRN_L$ returns TRUE for a transition from the low state to any other state. Note that the states p and c must be different. There is no TRN_HH function, for instance. The complete list of functions is:

TRN_HL TRN_LH TRN_ZL TRN_$H

TRN_HZ TRN_LZ TRN_ZH TRN_$L

TRN_H$ TRN_L$ TRN_Z$ TRN_$Z

558 Chapter 23: Digital Devices

Transition functions using the Z state should be used only within TRISTATE sections. Open collector transitions should be modeled with the TRN_LH and TRN_HL functions.

PINDLY:

Marks the start of a group of one or more <delay assignments> used to assign path delays to the PINDLY input / output channels. A <delay assignment> is of the following form:

<output node>* = { <delay expression> }

<output node>

One or more of the PINDLY <output node> names mentioned in the list, <first digital output node>...<last digital output node>. Several outputs may share the same rules by including them on the left side separated by spaces or commas.

<delay expression>

An expression which returns a set of three delay values (min,typ,max) for use on the specified output delay channel. There are two forms:

DELAY(<min>,<typ>,<max>)

This form simply specifies the delays directly. For example:

...

+PINDLY: OUT1 , OUT2 = { DELAY(10ns, -1, 20ns) }

...

Note the use of -1 causes the system to calculate the value using the unspecified propagation delay rules.

The second form uses a more complex CASE statement. Its form is:

CASE(<boolean expression_1>,<delay expression_1>, ;rule 1 <boolean expression_2>,<delay expression_2>, ;rule 2

...

<boolean expression_n>,<delay expression_n>, ;rule n <default delay expression> )

The CASE statement is comprised of a set of one or more rules. Each rule has a <boolean expression> and a <delay expression> and is evaluated in the order listed in the CASE statement. The first <boolean expression> that returns TRUE causes the <delay expression> to be assigned to the <output nodes>. If no <delay expression> returns TRUE, the <default delay expression> is assigned to the

559

<output nodes>. Since this situation can easily occur, the <default delay expression> is mandatory.

Example

+BOOLEAN:

+DATA = { CHANGED(DI1,0) | CHANGED(DI2,0) |

+CHANGED(DI3,0) | CHANGED(DI4,0)}

+SELECT = {CHANGED(S1BAR,0) | CHANGED(S2,0)}

+CLEAR = {CHANGED_HL(CLRBAR,0)}

+STROBE = {CHANGED_HL(STB,0)}

+PINDLY:

+B1 B2 B3 B4 = {

+CASE(

+DATA & STROBE & TRN_HL, DELAY(-1,16ns,25ns),

+CLEAR, DELAY(-1,14ns,22ns),

+SELECT & TRN_LH, DELAY(-1,12ns,20ns),

+DELAY(-1,17ns,26ns))}

This example describes the delays on the four outputs B1...B4. They share four delay rules.

Rule 1: DATA & STROBE & TRN_HL, DELAY(-1,16ns,25ns) Meaning: If DATA is TRUE (if any of the inputs DI1...DI4 have changed )

and STROBE is TRUE (STB made a high to low transition), then the delay is (-1, 16ns, 25ns) for any output (B1...B4) making a high to low transition.

Rule 2: CLEAR, DELAY(-1,14ns,22ns)

Meaning: If CLEAR is TRUE (if CLRBAR has made a high to low transition), then the delay is (-1, 14ns, 25ns) for any of the outputs (B1...B4) making any transition.

Rule 3: SELECT & TRN_LH, DELAY(-1,12ns,20ns)

Meaning: If SELECT is TRUE (if either S1BAR or S2 has changed ), then the delay is (-1, 12ns, 20ns) for any output (B1...B4) making a low to high transition.

Rule 4: DELAY(-1,17ns,26ns)

Meaning: If rules 1, 2, and 3 fails, then the delay is (-1, 17ns, 26ns) for any of the outputs (B1...B4) making any transition.

560 Chapter 23: Digital Devices

TRISTATE:

Marks the start of a group of one or more tri-state <delay assignments> used to assign path delays to tri-state input / output channels. Unlike a PINDLY, a TRISTATE is controlled by an <enable node>.

Following the TRISTATE: keyword, an <enable node> and its polarity are specified. The polarity is specified by choosing one of two keywords:

ENABLE LO

means low state is the enabled state

ENABLE HI

means high state is the enabled state

The <enable node> controls all <output nodes> in the current TRISTATE section.

The <delay expressions> in a TRISTATE section may employ the Z-state transition functions.

Simulation behavior

The PINDLY statement is evaluated when any input, enable, or output pin changes state. Each <input node> is associated with a corresponding <output node> in the same order of occurrence on the line. The BOOLEAN sections are evaluated first, then the PINDLY and TRISTATE sections are evaluated and the delays for changing <output nodes> calculated. Changing <output nodes> are then scheduled for a state change to the new <input node> state after the appropriate delay.

Example

This example shows a mixture of BOOLEAN, PINDLY, and TRISTATE sections:

U4DLY PINDLY(9,1,13) DPWR DGND

+Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 INTBAR_O

+OE

+STB M S1BAR S2 CLRBAR DI1 DI2 DI3 DI4 DI5 DI6 DI7 DI8

+DO1 DO2 DO3 DO4 DO5 DO6 DO7 DO8 INTBAR

+IO_S MNTYMXDLY={MNTYMXDLY} IO_LEVEL={IO_LEVEL}

+

+BOOLEAN:

+DATA = {CHANGED(DI1,0) | CHANGED(DI2,0) |

+CHANGED(DI3,0) | CHANGED(DI4,0) |

+CHANGED(DI5,0) | CHANGED(DI6,0) |

561

+CHANGED(DI7,0) | CHANGED(DI8,0)}

+SELECT = {CHANGED(S1BAR,0) | CHANGED(S2,0)}

+MODE = {CHANGED(M,0)}

+CLEAR = {CHANGED_HL(CLRBAR,0)}

+STROBE = {CHANGED(STB,0)}

+

+TRISTATE:

+ENABLE HI=OE

+DO1 DO2 DO3 DO4 DO5 DO6 DO7 DO8 = {

+CASE(

+CLEAR & TRN_HL, DELAY(-1,18ns,27ns),

+(STROBE | SELECT) & TRN_LH, DELAY(-1,18ns,27ns),

+(STROBE | SELECT) & TRN_HL, DELAY(-1,15ns,25ns),

+DATA & TRN_LH, DELAY(-1,12ns,20ns),

+DATA & TRN_HL, DELAY(-1,10ns,20ns),

+TRN_ZH, DELAY(-1,21ns,35ns),

+TRN_ZL, DELAY(-1,25ns,40ns),

+TRN_HZ, DELAY(-1,9ns,20ns),

+TRN_LZ, DELAY(-1,12ns,20ns),

+DELAY(-1,26ns,41ns))}

+

+PINDLY:

+INTBAR = {

+CASE(

+STROBE & TRN_HL, DELAY(-1,16ns,25ns),

+SELECT & TRN_LH, DELAY(-1,12ns,20ns),

+DELAY(-1,17ns,26ns))}

562 Chapter 23: Digital Devices

Constraint checker

The CONSTRAINT primitive provides a way of checking complex conditional timing parameters. It lets you check setup and hold time, pulse width and frequency, and includes a general user-defined check to model unique requirements. Constraints usually accept as inputs the part or subcircuit inputs and typically work in concert with logic expressions, pin-to-pin delays, and other digital primitives. Constraints are passive warning devices. They create timing violation messages and place them in the Numeric Output window. They normally do not affect simulation results. The I/O model attribute is required only to handle the case of an accidental connection of a Constraint digital node to an analog node.

SPICE format

U<name> CONSTRAINT(<no. of inputs>) +<digital power node> <digital ground node> +<first digital input node>...<last digital input node> +<I/O model name>

+[IO_LEVEL=<interface subckt select value>] +[BOOLEAN:<boolean assignments>] +[SETUP_HOLD:<setup_hold specifications>] +[WIDTH:<width specifications>] +[FREQ:<freq specifications>] +[GENERAL:<general specifications>]

Schematic format

Constraints are usually found in the text file libraries. They aren't often used directly as schematic components, although they can be. For this reason, only a few sample constraint components are to be found in the Component library.

PART attribute <name>

Example

C20

CONSTRAINT attribute [BOOLEAN:<boolean assignments>] +[SETUP_HOLD:<setup_hold specifications>] +[WIDTH:<width specifications>] +[FREQ:<freq specifications>] +[GENERAL:<general specifications>]

563

This attribute is a full CONSTRAINT statement or, more commonly, the name of a CONSTRAINT statement defined with a .define statement in the text area.

Examples

C381_STD ;defined in the text area

WIDTH: NODE = MRBAR MIN_LO = 5n

FREQ: NODE = CP MAXFREQ = 130MEG

I/O MODEL attribute <I/O model name>

Example

IO_STD

IO_LEVEL attribute <interface subckt select value>

Example 0

POWER NODE attribute <digital power node>

Example

$G_DPWR

GROUND NODE attribute <digital ground node>

Example

$G_DGND

Special Component editor pin fields

Inputs <inputs>

The Component editor has a special 'Inputs' field for CONSTRAINTs. You don't edit these fields directly. Instead, you click in the Shape/Pin Display and add an input pin. This lets you define the names and pin locations of the input pins used by the constraint device.

Constraint devices are used mainly for modeling commercial parts, and are found principally in subcircuits in the Digital Library text files. Because they can have a large number of input pins, and since a component in the Component Library re-

564 Chapter 23: Digital Devices

quires the input pin placements, including all possible constraint devices in the library is not feasible. Only a few such devices are to be found in the library, and they are mainly for illustration. These devices are really targeted for use in text file subcircuits. While you can use them directly in schematics, their real power issues from their use in the models of commercial digital parts.

Format definitions

BOOLEAN:

Marks the start of a group of one or more <boolean assignments> used as temporary variables in subsequent <specifications>. A <boolean assignment> is of the following form:

<boolean variable> = {<boolean expression>}

<boolean expression>

This is the same as in the PINDLY, with the singular exception that the transition functions (TRN_pc) are not available.

SETUP_HOLD:

Marks the start of a <setup_hold specification>. The format is as follows:

+SETUP_HOLD:

+CLOCK <assertion edge> = <input node>

+DATA(<no. of data inputs>) = <first input node>...<last input node> +[SETUPTIME=<time value>]

+[HOLDTIME=<time value>] +[WHEN=<boolean expression>] +[MESSAGE="<extra message text>"] +[ERRORLIMIT=<limit value>]

The CLOCK argument <input node> defines the input node that serves as a reference for the setup/hold specification. The CLOCK <assertion edge> is one of the following:

LH This specifies that the clock low to high edge is the assertion edge. HL This specifies that the clock high to low edge is the assertion edge.

The DATA arguments <first input node>...<last input node> specify one or more input nodes whose setup or hold time is to be measured. There must be at least one input node. The arguments must be separated by a space or a comma.

The SETUPTIME argument <time value> specifies the minimum time that all

565

DATA <input nodes> must be stable prior to the <assertion edge> of the clock. The <time value> must be positive or zero. If an <input node> has a setup time that depends upon whether the data is LO or HI, then you can use one of these specialized forms:

SETUPTIME_LO=<time value>

This is the setup time for a low data state prior to the clock <assertion edge>.

SETUPTIME_HI=<time value>

This is the setup time for a high data state prior to the clock <assertion edge>.

If either of these setup time specifications is zero, MC7 will skip its check.

The HOLDTIME argument <time value> specifies the minimum time that all DATA <input nodes> must be stable after the <assertion edge> of the clock. The <time value> must be positive or zero. If an <input node> has a hold time that depends upon whether the data is LO or HI, then you can use one of these:

HOLDTIME_LO=<time value>

This is the hold time for a low data state after the clock <assertion edge>.

HOLDTIME_HI=<time value>

This is the hold time for a high data state after the clock <assertion edge>.

How it works

The evaluation begins when the specified Clock node experiences the specified <assertion edge>. The WHEN <boolean expression> is evaluated and if TRUE, all SETUPTIME and HOLDTIME blocks with nonzero values are checked during this clock cycle. If the WHEN evaluates to FALSE, then no checks are done for this clock cycle. The WHEN function disables checking when it is inappropriate, as for example, during a RESET or PRESET operation.

Setup time checks occur at the CLOCK <assertion edge>. If the specified hold time is zero, simultaneous CLOCK and DATA transitions are allowed, but the previous DATA transition is checked for setup time. If the hold time is not zero, simultaneous CLOCK and DATA transitions are reported as errors. Hold time checks are done on any DATA input that changes after the CLOCK <assertion edge>. If the setup time is zero, simultaneous CLOCK and DATA transitions are allowed, but the next DATA transition occurring before the non-asserting edge is checked for hold time. If the setup time is not zero, simultaneous CLOCK and DATA transitions are reported as errors.

566 Chapter 23: Digital Devices

Соседние файлы в папке Micro-Cap v7.1.6
  • #
    06.06.20171.32 Кб60model.CNT
  • #
    06.06.201776.72 Кб62MODEL.HLP
  • #
    06.06.20173.72 Кб60NETHASP.INI
  • #
    06.06.2017450 б59os.dat
  • #
    06.06.2017545 б63READ.ME
  • #
    06.06.20173.31 Mб68RM.PDF
  • #
    06.06.2017226.69 Кб61setup.bmp
  • #
    06.06.201795 б59SETUP.INI
  • #
  • #
    06.06.201749 б60setup.lid
  • #
    06.06.20172.04 Mб60Standard.cmp