Ciro Santilli OurBigBook.com  Sponsor 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
verilog/two_modules.v
/*
Example of how  to link two modules up.
Links two negators in series.
*/
`include "negator.v"
module two_modules(
    input wire in,
    output wire out
);
    /* Fully explicit way. */
    wire middle;
    negator n0 (
        .in(in),
        .out(middle)
    );
    negator n1 (
        .in(middle),
        .out(out)
    );

    /*
    Identical but succint:

    - middle is automatically declared as a wire
    - wires are linked by position instead of name
    */
    /*
    negator n0 (
        in,
        middle
    );
    negator n1 (
        middle,
        out
    );
    */
endmodule