Number | 467
|
Category | errata
|
Synopsis | 12.3: assignments on port declarations
|
State | closed
|
Class | errata-simple
|
Arrival-Date | Sep 12 2003
|
Originator | sharp@cadence.com
|
Release | 2001b: 12.3
|
Environment |
|
Description |
This is a question, probably not a real erratum. Looking at the BNF, it appears to allow reg declaration initializers on reg port declarations, both the combined reg port declarations inside the module and the ANSI-C style reg port declarations in the port list. It does not allow continuous assignments on net declarations if those are net port declarations, whether those are combined net port declarations inside the module or ANSI-C style net port declarations in the port list. So the BNF allows both module m (output reg r = 0); and module m (r); output reg r = 0; But it does not allow either module m (output wire w = 0); or module m (w); output wire w = 0; even though it allows module m (w); output w; wire w = 0; Is this what was intended? I can see some logic to this, since you can't really assign much besides constants this way (at least in the ANSI-C style port declarations). That makes sense for a reg initializer, but is of limited use for a continuous assignment. I checked the email archives, but couldn't find anything related to this. |
Fix |
Propose to make no change and close the issue. |
Audit-Trail |
From: Shalom.Bresticker@motorola.com To: sharp@cadence.com Cc: etf-bugs@boyd.com Subject: Re: errata/467: assignments on port declarations 12.3 Date: Sun, 14 Sep 2003 14:06:23 +0300 (IDT) The general form of a net declaration assignment also allows you to add delay and drive strength specifications. These are also not allowed in port declarations. Shalom > Looking at the BNF, it appears to allow reg declaration > initializers on reg port declarations, both the combined > reg port declarations inside the module and the ANSI-C > style reg port declarations in the port list. > > It does not allow continuous assignments on net declarations > if those are net port declarations, whether those are > combined net port declarations inside the module or ANSI-C > style net port declarations in the port list. > > So the BNF allows both > > module m (output reg r = 0); > > and > > module m (r); > output reg r = 0; > > But it does not allow either > > module m (output wire w = 0); > > or > > module m (w); > output wire w = 0; > > even though it allows > > module m (w); > output w; > wire w = 0; > > Is this what was intended? I can see some logic to this, > since you can't really assign much besides constants this > way (at least in the ANSI-C style port declarations). > That makes sense for a reg initializer, but is of limited > use for a continuous assignment. From: Steven Sharp <sharp@cadence.com> To: etf-bugs@boyd.com, Shalom.Bresticker@motorola.com Cc: Subject: Re: errata/467: assignments on port declarations 12.3 Date: Mon, 15 Sep 2003 14:11:25 -0400 (EDT) If you can separately declare output [7:0] a; wire #5 [7:0] a; why shouldn't you be allowed to combine them into output wire #5 [7:0] a; I thought that the point of the new declarations was to allow combining the separate declarations for convenience. Why disallow it just because the net has a delay? Steven Sharp sharp@cadence.com From: Michael McNamara <mac@verisity.com> To: sharp@cadence.com Cc: etf-bugs@boyd.com Subject: RE: errata/467: assignments on port declarations 12.3 Date: Fri, 12 Sep 2003 15:54:46 -0700 I can't cliam there was a real decision to handle it this way; but I can confirm that the BNF correctly implements what I recall we proposed and talked about. There was no desire to enable the specification of a constant driver for an output wire in a design. Note that the result is the same, at least viewed externally; either module if instantiated would have a thing called w that supplies a one to whom ever cares to look at it. Through the PLI one could determine that m.r was a reg, and m.w was a wire, but otherwise all would be the same. module m (output wire w = 0); module m (output reg r = 0); -- On Sep 12 2003 at 14:01, sharp@cadence.com sent a message: > To: etf-bugs@boyd.com > Subject: "errata/467: assignments on port declarations 12.3" > Precedence: bulk > > > >Number: 467 > >Category: errata > >Originator: sharp@cadence.com > >Environment: > > >Description: > > This is a question, probably not a real erratum. > > Looking at the BNF, it appears to allow reg declaration > initializers on reg port declarations, both the combined > reg port declarations inside the module and the ANSI-C > style reg port declarations in the port list. > > It does not allow continuous assignments on net declarations > if those are net port declarations, whether those are > combined net port declarations inside the module or ANSI-C > style net port declarations in the port list. > > So the BNF allows both > > module m (output reg r = 0); > > and > > module m (r); > output reg r = 0; > > But it does not allow either > > module m (output wire w = 0); > > or > > module m (w); > output wire w = 0; > > even though it allows > > module m (w); > output w; > wire w = 0; > > Is this what was intended? I can see some logic to this, > since you can't really assign much besides constants this > way (at least in the ANSI-C style port declarations). > That makes sense for a reg initializer, but is of limited > use for a continuous assignment. > > I checked the email archives, but couldn't find anything > related to this. From: Steven Sharp <sharp@cadence.com> To: etf-bugs@boyd.com, mac@verisity.com Cc: Subject: RE: errata/467: assignments on port declarations 12.3 Date: Mon, 22 Sep 2003 16:46:02 -0400 (EDT) Note that it is more clearly useful on combined port/net declarations inside the module, since you can declare other things before you declare the port. That includes other ports, but not just ports. So, for example module my_and (y,a,b); input wire a,b; output wire y = a & b; endmodule module my_lut (y,a); input wire [3:0] a; reg r; output wire y = r; always @* casez (a) 4'b10??: r = 1; 4'b0101: r = 1; default: r = 0; endcase endmodule Steven Sharp sharp@cadence.com Fix replaced by Shalom.Bresticker@motorola.com on Thu Nov 13 08:27:45 2003 Propose to make no change and close the issue. |
Unformatted |
|
Hosted by Boyd Technology