diff options
Diffstat (limited to 'part_2/ex9/add3_ge5.v')
-rw-r--r-- | part_2/ex9/add3_ge5.v | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/part_2/ex9/add3_ge5.v b/part_2/ex9/add3_ge5.v new file mode 100644 index 0000000..282dcac --- /dev/null +++ b/part_2/ex9/add3_ge5.v @@ -0,0 +1,11 @@ +module add3_ge5 (in,out);
+
+ input [3:0] in;
+ output reg [3:0] out;
+
+ always @ (in)
+ if (in >= 4'd5)
+ out <= in + 4'd3;
+ else
+ out <= in;
+endmodule
\ No newline at end of file |