model XnorGate "XnorGate with multiple input"
import D = Modelica.Electrical.Digital;
extends D.Delay.DelayParams;
extends D.Interfaces.MISO;
D.Basic.Xnor G1(final n = n) annotation (Placement(transformation(extent = {
{-40, -20},
{0, 20}})));
D.Delay.InertialDelaySensitive G2(tLH = tLH, tHL = tHL, y0 = y0) annotation (Placement(transformation(extent = {
{20, -20},
{60, 20}})));
equation
connect(x,G1.x) annotation (Line(
points = {
{-60, 0},
{-32, 0}},
color = {127, 0, 127}));
connect(G1.y,G2.x) annotation (Line(
points = {
{0, 0},
{28, 0}},
color = {127, 0, 127}));
connect(G2.y,y) annotation (Line(
points = {
{60, 0},
{100, 0}},
color = {127, 0, 127}));
annotation (
Documentation(
info = "<html>\n<p>The XnorGate model has a multiple valued (n) input vector, and a single valued output. It is composed by a Basic Xnor and an InertialDelaySensitive. Its parameters are the delay parameters (rise and fall inertial delay time, and initial value).</p>\n</html>",
revisions = "<html>\n<ul>\n<li><em>September 15, 2004</em> vector approach used for all fixed numbers of inputs\n by Christoph Clauss<br>\n </li>\n<li><em>October 22, 2003</em>\n by Liane Jacobi<br>\n initially modelled.</li>\n</ul>\n</html>"),
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Text(
extent = {
{152, -160},
{-148, -100}},
lineColor = {0, 0, 255},
textString = "%name"),
Rectangle(
extent = {
{-50, 100},
{50, -100}},
lineThickness = 0.5,
fillColor = {213, 170, 255},
fillPattern = FillPattern.Solid),
Text(
extent = {
{-40, 80},
{40, 40}},
textString = "="),
Text(
extent = {
{-20, -60},
{20, -100}},
textString = "Gate")}));
end XnorGate;