Engee documentation

S-R Latch

Dynamic (or behavioral) S-R latch model.

blockType: AcausalElectricPowerSystems.IntegratedCircuits.Logic.SetResetLatch

Path in the library:

/Physical Modeling/Electrical/Integrated Circuits/Logic/S-R Latch

Description

Block S-R Latch It is an abstract behavioral model of a latch with installation and reset. It does not simulate internal individual MOSFET devices (for more information, see [assumptions-limits]). Therefore, the block runs fast during simulation, while maintaining correct I/O behavior.

If the gate voltage is greater than the threshold voltage , then the input signal is 1 (HIGH). Otherwise — 0 (LOW). Gate threshold voltage it is located in the middle between the parameters Low level input voltage ( ) and High level input voltage ( ).

The output logic level of the block can be either HIGH, or LOW according to the gate input logic levels and the S-R latch truth table.

S R Qn

0

0

Qn−1

0

1

0

1

0

1

1

1

0

The block models the shutter as follows.

  • The gate inputs have infinite resistance and finite or zero capacitance.

  • The shutter output offers a choice of two models.: Linear and Quadratic. Use the parameter Output current-voltage relationship to set the output model.

  • You can specify the signal propagation delay for both output models. To exit Linear the unit sets the value of the gate output capacitor so that the time constant of the capacitor resistor is equal to the value of the parameter Propagation delay. To exit Quadratic The signal at the gate input is delayed to approach the parameter value. Propagation delay.

The initial conditions of the block depend on the selected output model:

  • for the model Linear the high initial condition corresponds to the value of the parameter High level output voltage ( ), and the low initial condition corresponds to the value of the parameter Low level output voltage ( );

  • for the model Quadratic a high initial condition is a value close to the value of the parameter Supply voltage ( ), and the low initial condition is a value close to 0.

The output voltage of the unit depends on the selected output model:

  • for the model Linear The high output voltage level corresponds to the value of the parameter High level output voltage, and the low output voltage level corresponds to the value of the parameter Low level output voltage;

  • for the model Quadratic output voltage for states High and Low It is a function of the output current. At zero load current, the high output voltage level corresponds to (parameter value Supply voltage), and the low output voltage is zero volts.

Plotting input and output signals

You can plot the input and output signals of the block. S-R Latch without creating a complete model. Use graphs to study the effect of the selected parameters on the device characteristics.

  • If you are parameterizing a block based on a data table, you can compare your graphs with the data table to make sure that the parameterization is correct.

  • If you have a complete working model, but you don’t know which manufactured part to use, you can compare your graphs with the data tables to make a decision.

Assumptions and limitations

The unit does not simulate the internal individual MOSFET devices that make up the gate (with the exception of the last pair of MOSFETs, if for the parameter Output current-voltage relationship the value is set Quadratic). This restriction has the following consequences.

  • The behavior of this block is abstract. In particular, the response to input noise and input signals close to the logical threshold voltage may be inaccurate. In addition, the dynamic response is approximate.

  • The linear drop in the output voltage as a function of the output current is an approximation to the behavior of a MOSFET device or a bipolar output signal.

  • The simulation of the output signal as a controlled voltage source corresponds to a circuit with a totem pole or a push-pull output cascade. For modeling an open collector device:

    1. Connect the output pin to the base of the unit PNP Bipolar Transistor;

    2. Set the appropriate value for the parameter Output resistance.

Ports

Conserving

# S — installation contact
electricity

Details

A non-directional port connected to the S-R latch mounting pin.

Program usage name

input_pin_a

# R — reset contact
electricity

Details

A non-directional port connected to the reset pin of the S-R latch.

Program usage name

input_pin_b

# Q — output contact
electricity

Details

A non-directional port connected to the S-R latch output pin.

Program usage name

output_pin

Parameters

Inputs

# Low level input voltage — lower threshold input voltage
V | uV | mV | kV | MV

Details

The value of the voltage below which the unit interprets the input voltage as logical LOW.

Units

V | uV | mV | kV | MV

Default value

2.0 V

Program usage name

V_IL

Evaluatable

Yes

# High level input voltage — upper threshold input voltage
V | uV | mV | kV | MV

Details

The value of the voltage, when exceeded, the unit interprets the input voltage as a logical one. HIGH.

Units

V | uV | mV | kV | MV

Default value

3.0 V

Program usage name

V_IH

Evaluatable

Yes

# Average input capacitance — average input capacity
F | pF | nF | uF | mF

Details

A fixed capacitance that approximately corresponds to the input capacitance for the MOSFET gate. This value can usually be found in the manufacturer’s technical data sheet.

Setting the value for this parameter 0 This can lead to faster simulation time.
Units

F | pF | nF | uF | mF

Default value

5.0 pF

Program usage name

C_input

Evaluatable

Yes

Outputs

# Output current-voltage relationship — the relationship between output current and voltage
Linear | Quadratic

Details

The model of the output signal. The following values are possible:

  • Linear;

  • Quadratic.

Values

Linear | Quadratic

Default value

Linear

Program usage name

output_type

Evaluatable

No

# Low level output voltage — lower threshold output voltage
V | uV | mV | kV | MV

Details

The value of the output voltage at the lower logic level LOW.

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Linear.

Units

V | uV | mV | kV | MV

Default value

0.0 V

Program usage name

V_OL

Evaluatable

Yes

# High level output voltage — upper threshold output voltage
V | uV | mV | kV | MV

Details

The value of the output voltage at the upper logic level HIGH.

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Linear.

Units

V | uV | mV | kV | MV

Default value

5.0 V

Program usage name

V_OH

Evaluatable

Yes

# Output resistance — output resistance
Ohm | mOhm | kOhm | MOhm | GOhm

Details

The value of the resistance of the serial output resistor, which is used to simulate the drop in output voltage caused by the output current. You can get this value from the product data sheet or the technical specifications catalog by dividing the high-level output voltage by the maximum low-level output current.

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Linear.

Units

Ohm | mOhm | kOhm | MOhm | GOhm

Default value

25.0 Ohm

Program usage name

R_output

Evaluatable

Yes

# Propagation delay — signal propagation delay
s | ns | us | ms | min | hr | d

Details

Signal transition time from level LOW before HIGH or from the level HIGH before LOW after changing the input logic levels.

Units

s | ns | us | ms | min | hr | d

Default value

25.0 ns

Program usage name

delay

Evaluatable

Yes

# Supply voltage — power supply voltage
V | uV | mV | kV | MV

Details

The value of the power supply voltage applied to the gate in your circuit.

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.

Units

V | uV | mV | kV | MV

Default value

5.0 V

Program usage name

V_supply

Evaluatable

Yes

# Measurement voltage — signal voltage
V | uV | mV | kV | MV

Details

The gate supply voltage, for which the output resistances and reference currents are determined.

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.

Units

V | uV | mV | kV | MV

Default value

5.0 V

Program usage name

V_measurement

Evaluatable

Yes

# Logic HIGH output resistance at zero current and at I_OH — output resistance under condition HIGH at the gate at zero current and at current
Ohm | mOhm | kOhm | MOhm | GOhm

Details

Vector , containing two resistance values:

  • — the gradient of the dependence of the output voltage on the current when the gate is in a logical state HIGH and there is no output current;

  • — the gradient of the dependence of the output voltage on the current when the gate is in a logical state HIGH and the output current is .

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.

Units

Ohm | mOhm | kOhm | MOhm | GOhm

Default value

[25.0, 250.0] Ohm

Program usage name

R_OH_vector

Evaluatable

Yes

# Logic HIGH output current I_OH when shorted to ground — Output current in case of an earth fault
A | pA | nA | uA | mA | kA | MA

Details

The amount of current when the gate is in a logical state HIGH and the load causes the output voltage to tend to zero.

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.

Units

A | pA | nA | uA | mA | kA | MA

Default value

63.0 mA

Program usage name

I_OH

Evaluatable

Yes

# Logic LOW output resistance at zero current and at I_OL — output resistance under condition LOW at the gate at zero current and at current
Ohm | mOhm | kOhm | MOhm | GOhm

Details

Vector , containing two resistance values:

  • — the gradient of the dependence of the output voltage on the current when the gate is in a logical state LOW and there is no output current;

  • — the gradient of the dependence of the output voltage on the current when the gate is in a logical state LOW and the output current is .

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.

Units

Ohm | mOhm | kOhm | MOhm | GOhm

Default value

[30.0, 800.0] Ohm

Program usage name

R_OL_vector

Evaluatable

Yes

# Logic LOW output current I_OL when shorted to Vcc — output current under the condition LOW on the gate when closing on
A | pA | nA | uA | mA | kA | MA

Details

The amount of current when the gate is in a logical state LOW but the load causes the output voltage to reach the supply voltage .

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.

Units

A | pA | nA | uA | mA | kA | MA

Default value

-45.0 mA

Program usage name

I_OL

Evaluatable

Yes

# Protection diode on resistance — resistance of an open protective diode
Ohm | mOhm | kOhm | MOhm | GOhm

Details

The voltage-current gradient for forward-biased protective diodes.

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.

Units

Ohm | mOhm | kOhm | MOhm | GOhm

Default value

5.0 Ohm

Program usage name

R_on_diode

Evaluatable

Yes

# Protection diode forward voltage — forward voltage of the protective diode
V | uV | mV | kV | MV

Details

The voltage at which the protective diode opens when exceeded.

Dependencies

To use this parameter, set for the parameter Output current-voltage relationship meaning Quadratic.

Units

V | uV | mV | kV | MV

Default value

0.6 V

Program usage name

V_forward_diode

Evaluatable

Yes

Initial Conditions

# Output initial state — initial exit status
Low | High

Details

Specify the initial state of the block output as High or Low.

This parameter is used for both linear and quadratic output models, provided that the parameter Propagation delay more than zero, and in the block Solver Configuration The Start simulation from steady state checkbox is unchecked.

Values

Low | High

Default value

Low

Program usage name

output_initial_state

Evaluatable

No