From: Jason Woolf (jasonw@cadence.com)
Date: Mon Apr 05 2004 - 10:38:33 PDT
Francoise,
I would suggest a couple of minor changes:
1. Replace "would be" with "is implicitly" in:
// generate scope would be named genblk1 as the first nested scope inside of g1
2. Replace "would not have been" with "had not been" in:
// 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
3. I would expand on the above comment. I would reword it as follows:
// generate scope is implicitly named genblk4 since it belongs to the fourth
generate construct in scope "top". Note that the previous generate
construct would have been named genblk3 if it had not been explicitly
named g1.
-Jason
> Date: Mon, 05 Apr 2004 13:20:27 -0400
> To: etf@boyd.com
> From: Francoise Martinolle <fm@cadence.com>
> Subject: suggested improved comments for ex in 12.4.3
> X-pstn-cm-addresses: from <fm@cadence.com> (approved)
>
> 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
This archive was generated by hypermail 2.1.4
: Mon Apr 05 2004 - 10:20:49 PDT
and
sponsored by Boyd Technology, Inc.