aboutsummaryrefslogtreecommitdiff
path: root/doc/sandbox.mdwn
diff options
context:
space:
mode:
authorhttps://www.google.com/accounts/o8/id?id=AItOawl5PovueK32TVJAFbJFLnOWbOkUH1C8-E4 <Christopher@web>2011-09-14 23:32:29 -0400
committeradmin <admin@branchable.com>2011-09-14 23:32:29 -0400
commit83168cfb6bf533db8e173d660ca4e6cdc926d9fc (patch)
tree9d168df16f0f9651683c16f1c6015a2cf6132d5b /doc/sandbox.mdwn
parente381184944cb951ca78123c301ee61f0c6ff50a4 (diff)
downloadikiwiki-83168cfb6bf533db8e173d660ca4e6cdc926d9fc.tar
ikiwiki-83168cfb6bf533db8e173d660ca4e6cdc926d9fc.tar.gz
Diffstat (limited to 'doc/sandbox.mdwn')
-rw-r--r--doc/sandbox.mdwn22
1 files changed, 18 insertions, 4 deletions
diff --git a/doc/sandbox.mdwn b/doc/sandbox.mdwn
index b1f1242eb..347f2e590 100644
--- a/doc/sandbox.mdwn
+++ b/doc/sandbox.mdwn
@@ -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
"""]]