Skip to content

Commit 63ed37c

Browse files
committed
fix: declare reg inside module header
1 parent 62b0273 commit 63ed37c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

ex04_4_input_multiplexer/mux_4.v

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
module mux_4 (
22
input a, b, c, d,
33
input [1:0] sel,
4-
output out
4+
output reg out
55
);
66

7-
reg out;
8-
97
always @(*) begin
108
case(sel)
119
2'b00: out = a;

ex04_4_input_multiplexer/mux_4_ifelse.v

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
module mux_4_ifelse (
22
input a, b, c, d,
33
input [1:0] sel,
4-
output out
4+
output reg out
55
);
66

7-
reg out;
8-
97
always @(*) begin
108
if (sel == 2'b00) begin
119
out = a;

0 commit comments

Comments
 (0)