Add a "sel" point for the selector to the multiplexers.
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 5 Oct 2009 11:32:27 +0000 (13:32 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Mon, 5 Oct 2009 11:32:27 +0000 (13:32 +0200)
Utils/Metapost.tex

index 590dfc57480418a997724a146bf45b3f9ba72c41..fd213853c371e59537f859d5780cbb5a7bf77a6d 100644 (file)
@@ -101,7 +101,7 @@ vardef newMux@# text options=
   assignObj(@#,"Mux");
   StandardInterface;
   % Add ports
   assignObj(@#,"Mux");
   StandardInterface;
   % Add ports
-  ObjPoint inpa, inpb, out;
+  ObjPoint inpa, inpb, out, sel;
  
   ObjCode MinimumStandardEquations,
     % Make it a parallel trapezium
  
   ObjCode MinimumStandardEquations,
     % Make it a parallel trapezium
@@ -115,7 +115,8 @@ vardef newMux@# text options=
     % And space the input ports evenly
     "@#inpa = midpoint(@#nw, @#w)",
     "@#inpb = midpoint(@#w, @#sw)",
     % And space the input ports evenly
     "@#inpa = midpoint(@#nw, @#w)",
     "@#inpb = midpoint(@#w, @#sw)",
-    "@#out = @#e"; 
+    "@#out = @#e", 
+    "@#sel = @#n"; 
 
   StandardTies;
 enddef;
 
   StandardTies;
 enddef;