From: Adam Krolnik (adamk@cyrix.com)
Date: Tue Jun 02 1998 - 01:25:32 PDT
Good afternoon:
I like this proposal and I would like to add a few items:
1. Structure definition
I would like to add an optional width declaration to the structure.
E.g.
truct [range] struct_identifier
If there is a range specified, the structure is limited to the size
of that range [and an error shall be generated if the number of bits
required to implement the structure is larger than the size of the range.]
Bit and part selects of the structure would have to fall into that range.
If there is no range specified, the size of the structure is not limited.
I have used structure like things, both accessing elements of a structure
and the entire structure. The common error that occurrs is incorrect
location of an element - leading to several fields receiving an incorrect
value. The most common reason for this was incorrect sizing.
<p>2. Structure block
It seems that originally the definition was 'struct' ... 'endstruct'. The
closing word is missing (and the example has it.)
I would like to remove the begin/end pair if we are keeping 'endstruct'
3. Named port connections.
It seems that you can declare a bus as a structure and access all or selected
fields when defining modules. But it seems that you can't collect signals into
a structure through instantiation.
E.g.
module driver;
input Xbus.address;
...
endmodule
driver ad0 (.Xbus.address(buf_address), ...);
Instead
assign xbus.address = buf_address;
driver ad0 (.Xbus(xbus), ... );
4. The example modules use the unprefixed name. E.g.
module pbus_arb (input Pbus.req, ...);
...
always @(clk) begin
case (req) <--- This should be Pbus.req
5. 'struct item' definition
I believe the definition for this is not sufficient.
The current definition is:
struct_item
::= [ signed ] [ range ] list_of_struct_identifiers ;
I believe it should be net_declarations and the reg_declarations - minus the
initialization parts.
6. Global structure declarations
Since modules must be compilable separate, all structures would need to be
present within each module (or within the file being compiled.) I would support
structures defined (most likely through file inclusion) within all modules
requiring them.
<p> Adam Krolnik
Verification Engineer
Cyrix - NSM.
Richardson TX. 75085
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:52:54 PDT
and
sponsored by Boyd Technology, Inc.