Загружается...
 

Входное значения является первичным фактором для определения состояния. Для определения входного значения используется таблица истенности. Входных значений достаточно для сосовления описания множества состояний.
Входные состояния обявляются как gate и записыватся в теле описания. В обявление входа включается имя и список непосредственно входных сигналов. Пример обявления смотри ниже.

Format:
gate name(signal1, signal2, signal3, ... signalN)
Example:
gate nor2(in1, in2, out)

gate and3(a, b, c, output)
Количество входных сигналов не ограничено. Если при обявлении входных сигналов не хвотаетстроки, то просто продолжети список на другой строке.

i: и o: формулировки (Вход\Выход)
Объекты i: и o: используются при создании таблицы истонности для приметивов. Имя сигнала и логическое утверждение следующие за символом i: представляют собой одно из возможных состояний входа. Если входные состояния узла определяются условиями(прим. на вход пришел сигнал и ничего тут не попишешь), то список выходных состояний, обявленных как o:, составляется симулятором. Ниже приведена таблица истенности для элемента AND с двумя входами.

gate and2(in1, in2, output)
i: in1=H in2=H o: output=H
i: in1=L o: output=L
i: in2=L o: output=L
i: o: output=X
Последняя строчка таблицы отображает дефолтовое состояние, в случае если никокое из описанных выше состояний не выполняется. Важно отметить, что симулятор обрабатывает состояния в той последовательности в которой они были описаны в таблице истенности. В процессе симуляции, если на вход приходит верное значение(прим. верным считается значение определенное в таблице истенности), симулятор сразуже выстовляет на выходе соответствующие значение.

Добавочная информация о входном сигнале

Помимо непосредственного определения величины сигнала, мы при аргументе I: можем задавать определенное условие, при выполнении кторого дальнейшая обработка актуальна. (см. пример ниже)

Format:
signal <operator> state_value
or:
signal <operator> other_signal
Operators:
= Test if equal

Test if not equal


< Test if less than

> Test if greater than
Example:
node1 = H

input1 ! input2

node3 < 16

Добавочная информация о выходном сигнале

При аргументе o: можно задавать некотоые математические операции. Если можно установить сигнал в определенное логическое состояние, то возможно и дальнейщее преобразование. (см. пример)

Format:
signal [ <operator> operand @ <strength> ]
Operators:
= equate signal to value of operand

+ increment signal by value of operand


- decrement signal by value of operand

  • multiply signal by value of operand


/ divide signal by value of operand

% modulo signal by value of operand
Strengths:
0 off

1 node

2 gate

3 VDD
Example:
qbar = H@3

out1 + 3

out + out1@4

node1 % modulus_node
Важно отметить, что логическое состояние операнда может быть определенно как явно (H, 3), так и не явно, через имя сигнала (out1, modulus_node). В неявном способе адресации, величена сигнала, определяется как операнд с использованием матиматических вычислений. Указание мощьности является дополнение, если не указать вообще ничего, то по дефолту мощьность затвора 2 и она будет соотносится с выходным сигналом.

Аргумент t (Time Delay(время задержки))
Время распространения задержки затвора можно указать при аргументи t:. Формат записи приведен ниже:

Format:
t: <mode> = value { + <mode> = value ... }
Mode:
delta: fixed time delay in seconds

linear: random time delay with uniform distribution

random: probability function with values between 0 and 1.0
Example:
t: delta=5.0e-9

t: delta=1.0e-9 + random=0.2
Можно объдинить многократное распределении выбора времени, использавав операнд +. Такое может произойти, если затвор управляется сигналом единичного заряда(например входом минемальных размеров инвертора).
При аргументе t устанавливается параметр выбора времени для каждого столбца табдицы истенности (аргументя i: и o: , соответственно формируют эту таблицу), который укажыватся в описании gate. При использованни нескольких аргументов t, можно задать повышенное и пониженное время распростронения. Предположим, что у элемента NAND выход имеет аргумент при t(lh) = 1.0 наносекунд, тогда описание выхода в этом случае будет выглядет:
gate nand2(in1, in2, output)
t: delta=3.0e-9
i: in1=H in2=H o: output=L
t: delta=1.0e-9
i: in1=L o: output=H
i: in2=L o: output=H
Пример показывает, что когда на двух входах 1, выход упадет до 0 после жадержки в 3.0 наносекунды, и что если на входе был 0, то он поднимется до 1, после задержки в 1.0 наносекунду.

определение Дельта времени задержки при аргументе t:
Дельта используется для указания фиксированного времени. Формат Дельта времент приведен ниже:

Format:
delta = value
Example:
delta = 1.0

delta = 2.5e-9
Значение приведенное с Дельта, является неподвижной задержкой времени в секундах.

Линейное распределение задержки при аргументе t: Statement
под линейным распространением понемается случайный период времени который имеет однородное распределение вероятности. Формат такой записи приведен ниже:

Format:
linear = value
Example:
linear = 1.0

linear = 2.0e-9
Значение приведенное с линейным представлением являеся средним значением времени задержки в секундах для однородного распределения. Из примера, очевидно,что есть одинаковая вероятность того, что время задержки будет где-нибудь между 0 и 2 наносекунд.

The Random Probability Function of the t: Statement
The random probability function enables the user to model things which occur on a percentage basis (e.g. bit error rate, packet routing). The format for random probability declaration is shown below:

Format:
random = value
Example:
random = 0.75

random = 0.25
The value associated with random declaration must be in the range 0.0 <= value <= 1.0. This value represents the percentage of the time that the event is intended to occur.
A gate which uses the random probability feature must be operated in parallel with another gate which has a common event driving input. Both these gates should have the same timing distributions associated with them. When the common input changes state, a probability trial is performed. If the probability value is less than or equal to the value specified in the random declaration, the gate containing the random declaration will have its priority temporarily upgraded and its outputs will change state before the outputs of the other gate. This feature gives the user some level of control (on a percentage basis) over which gate will process the input data first.
As an example, a system which models a communication channel that corrupts 1% of the data bytes that pass through it is shown below:

model main(in, out)
trans1: good(in, out)
trans2: bad(in, out)

gate good(in, out)
t: delta=1.0e-6
i: in>0x00 o: out=in in=0x00

gate bad(in, out)
t: delta=1.0e-6 + random=0.01
i: in>0x00 o: out=0xFF in=0x00
The netlist describes a system where ASCII characters are represented by 0x01-0x7F. The value 0x00 indicates there is no data in the channel and the value 0xFF indicates a corrupted character. It is assumed that there is an external data source which supplies characters to the channel input. It should be noted that the random declaration is placed on only one of the two gate descriptions rather than both of them. Unpredictable events occur if the random declaration is placed on both gate descriptions.

The Fanout Statement

The fanout statement is used to selectively enable/disable fanout calculations for a gate when the database is being compiled. The format for a fanout statement is shown below:

Format:
fanout = on
or:
fanout = off
When fanout calculation is enabled (the default setting for all gates), the simulator scans the database and determines the total load that the gate is driving. It then multiplies the gate timing parameters by an amount proportional to the load. If an inverter gate was found to have a propagation delay time of 1 nanosecond when driving a single inverter input, an instance of that gate would have a propagation delay time of 3 nanoseconds if it was driving a load equivalent to 3 inverter inputs.
If fanout calculation is turned off for a gate primitive, fanout calculations for all instances of that gate will be ignored. This feature allows the user to force switching times to a particular value and not have them modified by the simulator at run time.

The Load Statement

The load statement is used to set the relative loading (capacitance) for an input or output signal. The format of a load statement is shown below:

Format:
load signal1 = value { signal2 = value ... }
Example:
load in1=2.0 in2=1.5 in3=1.95

load sa=2.5
The value associated with the signal represents the relative capacitance of the simulation node. When the timing parameters are specified for a gate description, it is assumed that they are chosen for the situation where the gate is driving a single (1.0) unit load such as a minimum size inverter input. The load command tells the simulator that some input structures are smaller or larger (more capacitive) than the reference standard. The simulator, by default, assumes that all signals associated with gate primitives have a load rating of 1.0 (unit load) unless they are overridden by a load statement.

The Priority Statement

The priority statement is used to establish the scheduling priority for a gate primitive. The format for a priority statement is shown below:

Format:
priority = level
Example:
priority = 1

priority = 7
In the event that two gates are scheduled to update their outputs at exactly the same time, the gate with lowest priority level will be processed first. All gate primitives are assigned a default priority of 1 unless they contain random timing declarations in the gate description. In this case the primitive is assigned a default priority of 2. This base priority can be temporarily upgraded to a value of -1 if a random trial is successful during the course of a simulation run. The user is advised to leave the priority settings at their default values unless there is a specific requirement which demands priority readjustment.

The Set Statement
The set statement is used to initialize signals to specific logic states before the simulation run takes place. The format for the set statement is shown below:

Format:
set signal1 = <state> @ { <strength> }

signal2 = <state> @ { <strength> }
Example:
set input1=H@2 input2=L input3=X@0

set count=4 multiplier=5 divisor=7@2
If the user does not specify a strength value, the signal will be assigned a default logic strength of 3 (VDD). This default setting will override any gate output (because the default strength of 2 is used for gate outputs).
The user will find this feature useful in situations where some of the inputs to a logic gate need to be set to a fixed state for the entire duration of the simulation run. For example, the set and reset inputs of a flip flop should be tied low if these inputs are not being driven by any logic circuitry. All instances of a gate entity which contains a set statement will have their corresponding simulation nodes set to the desired state.


Последние изменения страницы суббота апрель 23, 2011 17:34:38 MSK
Яндекс.Метрика