aboutsummaryrefslogtreecommitdiffstats
path: root/examples/mimas2/example.v
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-24 10:51:03 -0700
committerGitHub <noreply@github.com>2019-07-24 10:51:03 -0700
commitd6a289d3e3a09d1f11ec1588a4b4e9d6846517e8 (patch)
tree0303e68642bb955029a71788beb1efabc7437c7e /examples/mimas2/example.v
parenta66f17b6a78af8f6989235f0c72d5548b0560a58 (diff)
parent173c97589471b5f4312acac4e396a250ee7158c1 (diff)
downloadyosys-d6a289d3e3a09d1f11ec1588a4b4e9d6846517e8.tar.gz
yosys-d6a289d3e3a09d1f11ec1588a4b4e9d6846517e8.tar.bz2
yosys-d6a289d3e3a09d1f11ec1588a4b4e9d6846517e8.zip
Merge pull request #1222 from koriakin/s6-example
Add a simple example for Spartan 6
Diffstat (limited to 'examples/mimas2/example.v')
-rw-r--r--examples/mimas2/example.v14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/mimas2/example.v b/examples/mimas2/example.v
new file mode 100644
index 000000000..2a9117393
--- /dev/null
+++ b/examples/mimas2/example.v
@@ -0,0 +1,14 @@
+module example(
+ input wire CLK,
+ output wire [7:0] LED
+);
+
+reg [27:0] ctr;
+initial ctr = 0;
+
+always @(posedge CLK)
+ ctr <= ctr + 1;
+
+assign LED = ctr[27:20];
+
+endmodule