InertialDelaySensitiveVector

model InertialDelaySensitiveVector "Delay of a vector of digital signals"
    import D = Modelica.Electrical.Digital;
    import L = Modelica.Electrical.Digital.Interfaces.Logic;
    import S = Modelica.Electrical.Digital.Interfaces.Strength;
    import T = Modelica.Electrical.Digital.Tables;

    parameter SI.Time tHL = 0 "High->Low delay";
    parameter SI.Time tLH = 0 "Low->High delay";
    parameter Integer n(min = 1) = 1 "Data width";
    D.Interfaces.DigitalInput x[n] annotation (Placement(
        transformation(extent = {
            {-100, -12}, 
            {-76, 12}}),
        iconTransformation(extent = {
            {-100, -15}, 
            {-72, 14}})));
    D.Interfaces.DigitalOutput y[n] annotation (Placement(
        transformation(extent = {
            {72, -14}, 
            {100, 14}}),
        iconTransformation(extent = {
            {72, -14}, 
            {100, 14}})));
    Digital.Delay.InertialDelaySensitive inertialDelaySensitive[n](each tLH = tLH, each tHL = tHL);
equation
    for i in 1:n loop
        connect(x[i],inertialDelaySensitive[i].x);
        connect(inertialDelaySensitive[i].y,y[i]);
    end for;

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Rectangle(
                    extent = {
                        {-50, 54}, 
                        {48, -54}},
                    lineColor = {127, 0, 127},
                    lineThickness = 0.5,
                    fillPattern = FillPattern.Solid,
                    fillColor = {255, 255, 255}), 
                Line(
                    points = {
                        {-80, 0}, 
                        {-50, 0}},
                    color = {127, 0, 127},
                    thickness = 1), 
                Line(
                    points = {
                        {48, 0}, 
                        {80, 0}},
                    color = {127, 0, 127},
                    thickness = 1), 
                Text(
                    extent = {
                        {-40, 52}, 
                        {38, -20}},
                    lineColor = {127, 33, 107},
                    textString = "DELAY"), 
                Text(
                    extent = {
                        {-26, 12}, 
                        {18, -32}},
                    lineColor = {127, 0, 127},
                    textString = "signal "), 
                Text(
                    extent = {
                        {-32, 0}, 
                        {28, -62}},
                    lineColor = {127, 0, 127},
                    textString = "sensitive")}),
        Documentation(
            info = "<html>\n\n<p>\nThe delay element <strong>Inertial Delay Sensitive</strong> is applied to a vector of n signals.\nThe parameters <em>tLH</em> and <em>tHL</em> are valid for each of the n signals.\n</p>\n</html>",
            revisions = "<html>\n<ul>\n<li><em>September 11, 2009</em> created by Ulrich Donath<br>\n       </li>\n</ul>\n</html>"));
end InertialDelaySensitiveVector;