Modelica.Electrical.Digital.Examples.Utilities

Utility components used by package Examples

Information

This package contains utility components used by package Examples. Each component is built up hierarchically by components of the Gates package. In this way the Gates components were tested, and their usage is demonstrated.

Extends from Modelica.Icons.UtilitiesPackage (Icon for utility packages).

Package Content

Name Description
Modelica.Electrical.Digital.Examples.Utilities.MUX4 MUX4 4 to 1 Bit Multiplexer
Modelica.Electrical.Digital.Examples.Utilities.RS RS Unclocked RS FlipFlop
Modelica.Electrical.Digital.Examples.Utilities.RSFF RSFF Unclocked RS FlipFlop
Modelica.Electrical.Digital.Examples.Utilities.DFF DFF D FlipFlop
Modelica.Electrical.Digital.Examples.Utilities.JKFF JKFF JK FlipFlop
Modelica.Electrical.Digital.Examples.Utilities.HalfAdder HalfAdder Half adder
Modelica.Electrical.Digital.Examples.Utilities.FullAdder FullAdder Adding circuit for binary numbers with input carry bit
Modelica.Electrical.Digital.Examples.Utilities.Adder Adder Generic N Bit Adder
Modelica.Electrical.Digital.Examples.Utilities.Counter3 Counter3 3 Bit Counter
Modelica.Electrical.Digital.Examples.Utilities.Counter Counter Generic N Bit Counter

Modelica.Electrical.Digital.Examples.Utilities.MUX4 Modelica.Electrical.Digital.Examples.Utilities.MUX4

4 to 1 Bit Multiplexer

Information

MUX4 is a four bit multiplexer which is built up by And, Not, and Or gates according to the schematic.

The parameters delayTime and q0 are prepared but not yet used in the component. The MUX4 component uses standard values in its components.

Parameters

NameDescription
delayTimeDelay time [s]
q0Initial value

Connectors

NameDescription
d0 
d1 
d2 
d3 
a0 
a1 
d 

Modelica.Electrical.Digital.Examples.Utilities.RS Modelica.Electrical.Digital.Examples.Utilities.RS

Unclocked RS FlipFlop

Information

RS is a basic component for e.g., the RS (set-reset) flipflop, which is built up by Nor gates according to the schematic. To avoid a numerical loop a small transport delay is inserted which delay time is a parameter of the RS component. Also its initial value can be set by parameter.

Parameters

NameDescription
delayTimeDelay time [s]
q0Initial value of output

Connectors

NameDescription
s 
r 
q 
qn 

Modelica.Electrical.Digital.Examples.Utilities.RSFF Modelica.Electrical.Digital.Examples.Utilities.RSFF

Unclocked RS FlipFlop

Information

Basing on the RS component RSFF is a RS (set-reset) flipflop composed according the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.

Parameters

NameDescription
delayTimeDelay time [s]
q0Initial value

Connectors

NameDescription
s 
r 
q 
qnnot Q
clk 

Modelica.Electrical.Digital.Examples.Utilities.DFF Modelica.Electrical.Digital.Examples.Utilities.DFF

D FlipFlop

Information

Basing on the RS component DFF is a D flipflop composed according the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.

Parameters

NameDescription
TdelDelay time [s]
QInitInitial value

Connectors

NameDescription
d 
q 
qnnot Q
clk 

Modelica.Electrical.Digital.Examples.Utilities.JKFF Modelica.Electrical.Digital.Examples.Utilities.JKFF

JK FlipFlop

Information

Basing on the RS component JKFF is a J-K-flipflop composed according the schematic. Its parameter delayTime is the delay time of the RS component transport delay, q0 is the initial value of that delay.

Parameters

NameDescription
delayTimeDelay time [s]
q0Initial value

Connectors

NameDescription
j 
q 
qnnot Q
clk 
k 

Modelica.Electrical.Digital.Examples.Utilities.HalfAdder Modelica.Electrical.Digital.Examples.Utilities.HalfAdder

Half adder

Information

HalfAdder is a two bit adder which is composed by Gates components.

Its logic behavior is like this:

HalfAdder behavior

input a

input b

sum s

carry c

0

0

0

0

1

0

1

0

0

1

1

0

1

1

0

1

The parameter delayTime is the delay time (tLH=tHL) of both the components.

Parameters

NameDescription
delayTimeDelay time

Connectors

NameDescription
b 
s 
a 
c 

Modelica.Electrical.Digital.Examples.Utilities.FullAdder Modelica.Electrical.Digital.Examples.Utilities.FullAdder

Adding circuit for binary numbers with input carry bit

Information

FullAdder is a two bit adder with additional carry in bit which is composed by Gates components.

Its logic behavior is like this:

FullAdder behavior

input a

input b

input carry c_in

sum s

output carry c_out

0

0

0

0

0

1

0

0

1

0

0

1

0

1

0

1

1

0

0

1

0

0

1

0

1

1

0

1

0

1

0

1

1

0

1

1

1

1

1

1

Connectors

NameDescription
a 
b 
c_in 
s 
c_out 

Modelica.Electrical.Digital.Examples.Utilities.Adder Modelica.Electrical.Digital.Examples.Utilities.Adder

Generic N Bit Adder

Information

The Adder is a generic n bit adder which is composed as a chain of FullAdder components. n can be chosen by the user, a and b are the n bit input vectors, s is the sum vector, and c_out is the carry bit of the "highest" FullAdder. All components are built up by Gate components.

Parameters

NameDescription
nNumber of single adders

Connectors

NameDescription
a[n] 
b[n] 
c_in 
s[n] 
c_out 

Modelica.Electrical.Digital.Examples.Utilities.Counter3 Modelica.Electrical.Digital.Examples.Utilities.Counter3

3 Bit Counter

Information

The Counter3 counts the high-low slopes of the count signal, if the enable signal is set to be true. It is composed by three JK flipflops. q0, q1, and q2 are the bits of the resulting number, where q0 is the lowest, and q2 the highest bit.

Connectors

NameDescription
enable 
q2 
count 
q1 
q0 

Modelica.Electrical.Digital.Examples.Utilities.Counter Modelica.Electrical.Digital.Examples.Utilities.Counter

Generic N Bit Counter

Information

The Counter is a generic component, which counts the high-low slopes of the count signal, if the enable signal is set to be true. It is composed by n JK flipflops. q is the resulting number, where q[0] is the lowest, and q[n] the highest bit.

Parameters

NameDescription
nNumber of bits
delayTimeDelay of each JKFF [s]
q0Initial value

Connectors

NameDescription
enable 
count 
q[n] 
Automatically generated Thu Oct 1 16:07:39 2020.