diff options
Diffstat (limited to 'manual/CHAPTER_StateOfTheArt/always01.v')
-rw-r--r-- | manual/CHAPTER_StateOfTheArt/always01.v | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/manual/CHAPTER_StateOfTheArt/always01.v b/manual/CHAPTER_StateOfTheArt/always01.v new file mode 100644 index 000000000..4719ed47e --- /dev/null +++ b/manual/CHAPTER_StateOfTheArt/always01.v @@ -0,0 +1,12 @@ +module uut_always01(clock, reset, c3, c2, c1, c0); + +input clock, reset; +output c3, c2, c1, c0; +reg [3:0] count; + +assign {c3, c2, c1, c0} = count; + +always @(posedge clock) + count <= reset ? 0 : count + 1; + +endmodule |