Created
October 3, 2020 02:15
-
-
Save sgherbst/93f256d0facbdfb5f9b8e3aa2bc1aeb1 to your computer and use it in GitHub Desktop.
top.sv generate example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// top.sv | |
module my_module ( | |
input i_clk, | |
output o_clk | |
); | |
endmodule | |
module top ( | |
input logic i_clk, | |
output logic [1:0] o_clks | |
); | |
genvar i; | |
generate | |
for (i=0; i<2; i++) begin : generate_test | |
my_module my_module_inst ( | |
.i_clk(i_clk), | |
.o_clk(o_clks[i]) | |
); | |
end : generate_test | |
endgenerate | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment