model PXFERGATE "Transfergate with enable active low"
parameter SI.Time tHL = 0 "High->Low delay";
parameter SI.Time tLH = 0 "Low->High delay";
D.Interfaces.DigitalInput enable annotation (Placement(
transformation(extent = {
{-100, 60},
{-80, 80}}),
iconTransformation(extent = {
{-100, 60},
{-80, 80}})));
D.Interfaces.DigitalInput x annotation (Placement(
transformation(extent = {
{-100, -20},
{-80, 0}}),
iconTransformation(extent = {
{-100, -20},
{-80, 0}})));
D.Interfaces.DigitalOutput y annotation (Placement(
transformation(extent = {
{80, -20},
{100, 0}}),
iconTransformation(extent = {
{80, -20},
{100, 0}})));
protected
D.Interfaces.Logic nextstate(start = L.'U');
D.Interfaces.DigitalOutput yy(start = L.'U');
D.Delay.InertialDelaySensitive inertialDelaySensitive(tLH = tLH, tHL = tHL);
algorithm
nextstate := T.PXferTable[enable,x];
yy := nextstate;
equation
connect(yy,inertialDelaySensitive.x);
connect(inertialDelaySensitive.y,y);
annotation (
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Rectangle(
extent = {
{-60, 60},
{60, -20}},
lineColor = {127, 0, 127},
fillPattern = FillPattern.Solid,
fillColor = {213, 170, 255},
lineThickness = 0.5),
Line(
points = {
{-33, 16},
{31, 16}},
color = {127, 0, 127},
thickness = 1),
Line(
points = {
{-80, -10},
{-32, -10},
{-32, 10},
{30, 10},
{30, -10},
{80, -10}},
color = {127, 0, 127},
thickness = 1),
Text(
extent = {
{-7, 46},
{39, 18}},
lineColor = {127, 0, 127},
textString = "P"),
Line(
points = {
{-82, 70},
{0, 70},
{0, 16}},
color = {127, 0, 127},
thickness = 1),
Text(
extent = {
{-36, -24},
{38, -46}},
lineColor = {0, 0, 255},
textString = "%name")}),
Documentation(
revisions = "<html>\n<ul>\n<li><em>January 15, 2010</em> created by Ulrich Donath<br>\n </li>\n</ul>\n</html>",
info = "<html>\n<p>Description in VHDL is given by http://www.cs.sfu.ca/~ggbaker/reference/std_logic/src/std_logic_entities.vhd</p>\n<p><strong>Truth Table</strong></p>\n<table border=1 cellspacing=0 cellpadding=2>\n <tr><td><strong>DataIn</strong></td>\n <td><strong>Enable</strong></td>\n <td><strong>DataOut</strong></td>\n </tr>\n\n <tr><td>*</td> <td>U</td> <td>U</td></tr>\n <tr><td>*</td> <td>X</td> <td>UX</td></tr>\n <tr><td>*</td> <td>0</td> <td>DataIn</td></tr>\n <tr><td>*</td> <td>1</td> <td>Z</td></tr>\n <tr><td>*</td> <td>Z</td> <td>UX</td></tr>\n <tr><td>*</td> <td>W</td> <td>UX</td></tr>\n <tr><td>*</td> <td>L</td> <td>DataIn</td></tr>\n <tr><td>*</td> <td>H</td> <td>Z</td></tr>\n <tr><td>*</td> <td>-</td> <td>UX</td></tr>\n</table>\n\n<pre>\n UX: if dataIn == U then U else X\n</pre>\n</html>"));
end PXFERGATE;