stub.v

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

V
35
字号
// Test the reader's ability to handle undefined modules in the Verilog// input.  The reader should create "stub" references to these modules// using the union of all interfaces that are defined on the module.  Also test// the reader's ability to detect and detach empty modules which should be// created as black boxes.module empty(a, b, c);    input	    a;    input   [1:0]   b;    output	    c;endmodulemodule top();    wire            wireToA, wireToC, wireToX, wireToZ;    wire    [1:0]   busToB, busToY;    wire    [3:0]   wideBusToB, wideBusToY;        empty   designInst(.a(wireToA), .b(busToB), .c(wireToC));        stub    lowNames(.c(wireToC), .a(wireToA), .b(busToB)),            highNames(.y(busToY), .z(wireToZ), .x(wireToX));                stub    vectorInst[1:0](.y(wideBusToY), .z(wireToZ), .x(wireToX));    stub    scalarOrder(wireToA, busToB, wireToC,                         wireToX, busToY, wireToZ);                stub    vectorOrder[1:0](wireToA, wideBusToB, wireToC,                             wireToX, wideBusToY, wireToZ);   endmodule

⌨️ 快捷键说明

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