summaryrefslogtreecommitdiff
path: root/manual/CHAPTER_StateOfTheArt/always02_pub.v
diff options
context:
space:
mode:
Diffstat (limited to 'manual/CHAPTER_StateOfTheArt/always02_pub.v')
-rw-r--r--manual/CHAPTER_StateOfTheArt/always02_pub.v14
1 files changed, 14 insertions, 0 deletions
diff --git a/manual/CHAPTER_StateOfTheArt/always02_pub.v b/manual/CHAPTER_StateOfTheArt/always02_pub.v
new file mode 100644
index 00000000..91f1ca16
--- /dev/null
+++ b/manual/CHAPTER_StateOfTheArt/always02_pub.v
@@ -0,0 +1,14 @@
+module uut_always02(clock,
+ reset, count);
+
+input clock, reset;
+output [3:0] count;
+reg [3:0] count;
+
+always @(posedge clock) begin
+ count <= count + 1;
+ if (reset)
+ count <= 0;
+end
+
+endmodule