aboutsummaryrefslogtreecommitdiff
path: root/src/TopSim.bs
diff options
context:
space:
mode:
Diffstat (limited to 'src/TopSim.bs')
-rw-r--r--src/TopSim.bs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/TopSim.bs b/src/TopSim.bs
new file mode 100644
index 0000000..5ba7232
--- /dev/null
+++ b/src/TopSim.bs
@@ -0,0 +1,16 @@
+package TopSim where
+
+import Top
+
+mkTopSim :: Module Empty
+mkTopSim =
+ module
+ timer :: Reg (Bit 8) <- mkReg 0
+
+ rules
+ when True ==> do
+ timer := timer + 1
+ when (timer == 0xff) ==> do
+ $finish
+
+-- vim: set ft=haskell :