From 4b6e0102d20d9ab060ce930e4b846c8be446bb06 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Mon, 12 Dec 2016 21:51:10 +0000 Subject: public push --- part_3/mylib/add3_ge5.v | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 part_3/mylib/add3_ge5.v (limited to 'part_3/mylib/add3_ge5.v') diff --git a/part_3/mylib/add3_ge5.v b/part_3/mylib/add3_ge5.v new file mode 100644 index 0000000..282dcac --- /dev/null +++ b/part_3/mylib/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 -- cgit v1.2.3-54-g00ecf