Re: Parameter Interface Bugs?? Clarification?? Enhancement??


Subject: Re: Parameter Interface Bugs?? Clarification?? Enhancement??
From: Paul Graham (pgraham@cadence.com)
Date: Wed Jan 09 2002 - 11:59:21 PST


> (7) module mymodule #(parameter DEPTH=16, AWIDTH=8; parameter BWIDTH=8)
> (...) // commas between parameter lists but a semicolon to separate another
> parameter keyword in the list

I vote for #N+1, where N is the last number on your list. That is, I vote for:

    module m #(parameter signed p1 = 2, p2 = 2, parameter [3:0] p3 = 3, ...
    // commas between parameters, parameter keyword required at start
    // of list, parameter keyword may be repeated to allow
    // for datatype changes

#7 is not consistent with the rules for ANSI ports, which are entirely
comma-separated without semicolons.

#8 doesn't allow for parameter datatypes. You need to be able to specify:

    module m #(parameter signed [3:0] p1 = 1 ...

etc. Leaving out the parameter keyword altogether would look pretty funny.

#5 also has the problem that it does not allow differing parameter types.
How would I write the following using #5:

    module m #(parameter signed p1 = 1, parameter [3:0] p2 = 4'b0)

Sure, you could write:

    module m #(parameter signed p1 = 1, [3:0] p2 = 4'b0)

but this doesn't look at all like a regular parameter declaration.

Paul



This archive was generated by hypermail 2b28 : Wed Jan 09 2002 - 12:14:54 PST