detecttop.v

来自「openaccess与verilog互相转化时所用的源代码」· Verilog 代码 · 共 40 行

V
40
字号
// Test top module detection.  Both modules "candidateTop1" and "candidateTop2"// have no references to them in this design.  Both candidates have the same// hierarchical depth, and even share a module "shared".  The "candidateTop1"// module has more "width" than "candidateTop2" but "candidateTop2" appears// later in the Verilog input.  Neither candidate appears last in the file.// The expectation is that "candidateTop2" will be selected as the top module// and the modules "remove1" and "remove2" should be removed from the design.module remove1(inout io);endmodulemodule remove2(inout io);    remove1 I5(io);endmodulemodule keep2(inout io);    keep1   I3(io),            I4(io);endmodulemodule shared(inout io);endmodulemodule candidateTop1(inout io);    shared  I6(io);    remove2 I7(io),            I8(io),            I9(io),            I10(io),            I11(io);endmodulemodule  candidateTop2(inout io);    keep2   I1(io);    shared  I2(io);endmodulemodule keep1(inout io);endmodule

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?