]> sipb.mit.edu Git - ikiwiki.git/commitdiff
(no commit message)
authorhttps://www.google.com/accounts/o8/id?id=AItOawl5PovueK32TVJAFbJFLnOWbOkUH1C8-E4 <Christopher@web>
Thu, 15 Sep 2011 03:32:29 +0000 (23:32 -0400)
committeradmin <admin@branchable.com>
Thu, 15 Sep 2011 03:32:29 +0000 (23:32 -0400)
doc/sandbox.mdwn

index b1f1242ebf75aeeaf26b723dd7803482e55feec1..347f2e590e8381962e6a84e8edb2f5416e1be19a 100644 (file)
@@ -135,10 +135,24 @@ This **SandBox** is also a [[blog]]! xxx
 
 [[!inline pages="sandbox/* and !*/Discussion" rootpage="sandbox" show="4" archive="yes"]]a
 
-[[!format  c """
-void main () {
-    printf("hello, world!");
-}
+[[!format  verilog """
+module vc_Mux2 #( parameter W = 1 )
+(
+  input      [W-1:0] in0, in1,
+  input              sel,
+  output reg [W-1:0] out
+);
+
+  always @(*)
+  begin
+    case ( sel )
+      1'd0 : out = in0;
+      1'd1 : out = in1;
+      default : out = {W{1'bx}};
+    endcase
+  end
+
+endmodule
 """]]