From: Clifford E. Cummings (cliffc@sunburst-design.com)
Date: Fri Sep 24 1999 - 14:57:49 PDT
Ted -
Attached, from the July 29, 1999 VSG minutes, is the B33 parameter
enhancement proposal.
I will be out of town all of next week. If you have additional questions,
please post them to btf@boyd.com for answers from our knowledgable and
friendly BTF staff ;-)
- Cliff
B33 - Parameter type declarations
Section: A.2 3.10
Date Submitted: 980312
Requestor: Steve Meyer (sjmeyer@pragmatic-c.com)
Status: Passed BTF
Analyzed by: BTF Team
Synthesizable: Yes
Details: I propose changing parameter declaration statements to allow
normal reg range and signed declaration keywords. If feature has already
been proposed, just ignore this. Some examples (I am not sure if I am
using latest syntax):
parameter signed [3:0] mux_selector = 0;
paramater signed [0:3] mux_selector = 0; // only different if selects allowed
parameter real r1 = 3.5e17;
parameter p1 = 13'h7e;
parameter [31:0] dec_const = 1'b1; // valued converted to 32 bits
Proposal
In section A.2 on page 595 and Syntax 3-4 on page 25, change the syntax for
param_assignment to:
param_assignment ::=
parameter_identifier [type] [range] = constant_expression
type ::=
signed | integer | real | realtime | time
Add the following sentence at the end of the third paragraph in section 3.10:
"See section 3.9.2 for conversion between parameter types"
On page 26 before section 3.11, add the following examples:
parameter signed [3:0] mux_selector = 0;
parameter real r1 = 3.5e17;
parameter p1 = 13'h7e;
parameter [31:0] dec_const = 1'b1; // valued converted to 32 bits
++++++++++++++++++++++++++++++++++++
Need to clarify what happens to defparam before this can pass. After group
discussion, Mike McNamara wrote the following proposed amendment:
++++++++++++++++++++++++++++++++++++
Amended Proposal:
Modify section 12.2 as follows:
Add second paragraph as follows:
There are two kinds of parameter declarations. The first kind of
parameter declaration has a type and or range qualification, and
second does not. When an untyped and unranged parameter's value is
overridden, the parameter takes on the size and type of the override.
When a typed and/or ranged parameter is overriden, the new value is
converted to the type and size of the destination, and assigned to
that parameter.
An example:
module foo(a,b);
real r1,r2;
parameter [2:0] A = 3'h2;
parameter B = 3'h2;
initial begin
r1 = A;
r2 = B;
$display("r1 is %f r2 is %f",r1,r2);
end
endmodule // foo
module bar;
wire a,b;
defparam f1.A = 3.1415;
defparam f1.B = 3.1415;
foo f1(a,b);
endmodule // bar
Parameter A is a typed and/or ranged parameter, and so the defparam of
f1.A with the value 3.1415 is performed by converting the floating
point number 3.1415 into a fixed point number '3' and then the low 3
bits of 3 are assigned to A.
Parameter B is not a typed and/or ranged parameter, and so the
defparam of f1.B with the value 3.1415 replaces B's current value of
3'h2 with the floating point number 3.1415.
********************************************************
Motion: Approve BTF item 33 as amended.
Proposed: Mike McNamara
Seconded: Drew Lynch,
Motion approved as amended.
<p>Regards - Cliff
//********************************************************************//
// Cliff Cummings E-mail: cliffc@sunburst-design.com //
// Sunburst Design, Inc. Phone: 503-579-6362 / FAX: 503-579-7631 //
// 15870 SW Breccia Dr., Beaverton, OR 97007 //
// //
// Verilog & Synthesis Training //
// Verilog, VHDL, Synopsys, LMG, FPGA, Consulting and Contracting //
//********************************************************************//
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:53:29 PDT
and
sponsored by Boyd Technology, Inc.