From: Daryl Stewart (Daryl.Stewart@cl.cam.ac.uk)
Date: Wed Jul 15 1998 - 09:37:58 PDT
BAD MSG:
Cliff,
-Lines: 46
Content-Type: text/plain; charset="us-ascii"
Content-Length: 1117
X-Status: $$$$
X-UID: 0000000552
Status: RO
Maybe I've missed it, maybe you've discussed it anyway, but the text doesn't
explain *how* the gate instances are named.
I guess that they are indexed according to the surrounding loop, but maybe it
would be good to explicitly describe how nested loops contribute to names - is
the closest enclosing loop used first, or is textual order used?
parameter SIZE = 2;
genvar i, j, k;
generate
for (i=0; i<SIZE+1; i=i+1) begin
M1 N1(); // instantiates N1[i]
for (j=0; j<SIZE; j=j+1) begin
M2 N2(); // instantiates N2[i][j] or N2[j][i]??
end
if (i>0) then // I'm not sure of the syntax for this ;)
for (k=0; k<SIZE; k=k+1) begin
M3 N3(); // instantiates N3[i][k] or N3[k][i]??
end
end
endgenerate
Textual (N2[i][j] and N2[j][i) seems more intuitive to me, giving a better
reflection of hierarchy...
N1[0]
N2[0][0] N2[0][1]
N1[1]
N2[1][0] N2[1][1]
N3[1][0] N3[1][1]
N1[2]
N2[2][0] N2[2][1]
N3[2][0] N3[2][1]
<p>one other little thing - maybe the ripple carry examples will look neater with
assign co = c[SIZE];
instead of
assign co = c[4];
cheers
Daryl
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:52:57 PDT
and
sponsored by Boyd Technology, Inc.