Re: suggested improved comments for ex in 12.4.3

From: Clifford E. Cummings (cliffc@sunburst-design.com)
Date: Mon Apr 05 2004 - 12:38:57 PDT

  • Next message: Francoise Martinolle: "revised comments"

    I like Francoise's changes.

    Regards - Cliff

    At 10:20 AM 4/5/2004, Francoise Martinolle wrote:
    >My improved comments are in green color
    >
    >Example_12_4_3.v
    >// Example in section 12.4.3 (reformatted and comments added)
    >module top;
    >parameter genblk2 = 0;
    >genvar i;
    >// generate scope is implicitly named genblk1
    >if (genblk2) reg a; // top.genblk1.a
    >else reg b; // top.genblk1.b
    >
    >// generate scope is implicitly named genblk02 as genblk2 is already a
    >declared identifier
    >if (genblk2) reg a; // top.genblk02.a
    >else reg b; // top.genblk02.b
    >
    >// generate scope would have been named genblk3 but is explicitly named g1
    >for (i = 0; i < 1; i = i + 1) begin : g1 // block name
    >// generate scope would be named genblk1 as the first nested scope inside
    >of g1
    >if (1) reg a; // top.g1[0].genblk1.a
    >end
    >
    >// generate scope is implicitly named genblk4 as the previous generate
    >construct would have been named genblk3 if it would not have been
    >explicitly named g1
    >for (i = 0; i < 1; i = i + 1)
    >// generate scope is implicitly named genblk1 as the first nested scope of
    >genblk4
    >if (1) reg a; // top.genblk4[0].genblk1.a
    >
    >// generate scope is implicitly named genblk5
    >if (1) reg a; // top.genblk5.a
    >endmodule

    ----------------------------------------------------
    Cliff Cummings - Sunburst Design, Inc.
    14314 SW Allen Blvd., PMB 501, Beaverton, OR 97005
    Phone: 503-641-8446 / FAX: 503-641-8486
    cliffc@sunburst-design.com / www.sunburst-design.com
    Expert Verilog, SystemVerilog, Synthesis and Verification Training



    This archive was generated by hypermail 2.1.4 : Mon Apr 05 2004 - 12:21:40 PDT and
    sponsored by Boyd Technology, Inc.