modelAdder

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

TypeNameDefaultDescription
Integern2Number of single adders

Connectors

TypeNameDefaultDescription
Modelica.Electrical.Digital.Interfaces.DigitalInput[n]a
Modelica.Electrical.Digital.Interfaces.DigitalInput[n]b
Modelica.Electrical.Digital.Interfaces.DigitalInputc_in
Modelica.Electrical.Digital.Interfaces.DigitalOutput[n]s
Modelica.Electrical.Digital.Interfaces.DigitalOutputc_out

Components

TypeNameDefaultDescription
Modelica.Electrical.Digital.Examples.Utilities.FullAdder[n]Adder