aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-11-07 14:44:39 +0000
committerYann Herklotz <ymherklotz@gmail.com>2018-11-07 14:44:39 +0000
commite7f7d1988ad9a161ba10e36859dc04a92422a4e0 (patch)
tree2583d3c8b2f99f6e36a614985668645f73216ea8
parent4b6d1dbe4d79641d93676a311baa849b659cd12f (diff)
downloadverismith-e7f7d1988ad9a161ba10e36859dc04a92422a4e0.tar.gz
verismith-e7f7d1988ad9a161ba10e36859dc04a92422a4e0.zip
Add simple verilog AND gate
-rw-r--r--src/Main.hs2
-rw-r--r--test/simple.v23
2 files changed, 24 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 6aff865..bc80b49 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -34,5 +34,5 @@ main :: IO FilePath
--main = sample (arbitrary :: Gen (Circuit Input))
main = do
gen <- withSystemRandom . asGenIO $ return
- gr <- wattsStrogatzGraph gen 50 3 0.6
+ gr <- wattsStrogatzGraph gen 100 2 0.6
runGraphviz (graphToDot nonClusteredParams (graphInfoToUGr gr)) Png "output.png"
diff --git a/test/simple.v b/test/simple.v
new file mode 100644
index 0000000..5198d3d
--- /dev/null
+++ b/test/simple.v
@@ -0,0 +1,23 @@
+module and_comb(in1, in2, out);
+ input in1;
+ input in2;
+ output out;
+
+ assign out = in1 & in2;
+endmodule
+
+module main;
+ reg a, b;
+ wire c;
+
+ and_comb gate(.in1(a), .in2(b), .out(c));
+
+ initial
+ begin
+ a = 1'b1;
+ b = 1'b1;
+ #1
+ $display("%d & %d = %d", a, b, c);
+ $finish;
+ end
+endmodule