Complete the code to declare a 1-bit input port named clk.
module example_module([1] clk);
endmoduleThe keyword input declares a port as an input signal to the module.
Complete the code to declare a 4-bit output port named data_out.
module example_module(output [1] [3:0] data_out); endmodule
By default, output ports are wires unless declared as reg. Here, wire is used to declare a 4-bit output port.
Fix the error in the port declaration to correctly declare a bidirectional port named data_bus.
module example_module([1] [7:0] data_bus); endmodule
The inout keyword declares a bidirectional port that can act as input or output.
Fill both blanks to declare a 2-bit input port named addr and a 1-bit output port named ready.
module example_module([1] [1:0] addr, [2] ready); endmodule
input declares the addr port as input, and output declares ready as output.
Fill all three blanks to declare a 1-bit input clk, a 1-bit inout data, and a 3-bit output status.
module example_module([1] clk, [2] data, [3] [2:0] status); endmodule
input for clk, inout for bidirectional data, and output for status port.
