From: Adam Krolnik (adamk@cyrix.com)
Date: Thu Jul 08 1999 - 10:05:12 PDT
The following proposal was allowed to be voted on by mail.
Please vote on this proposal.
The additions to this proposal include:
examples
additional line to section 6 instead of deletion.
constant indexed part selects for net_lvalues in section 6.
------------- Begin Forwarded Message -------------
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; SunOS 4.1.4 sun4m)
[Netscape]">
</HEAD>
<BODY>
<BR>
Section 4.2.1 "Net and register bit-select and part-select addressing"
2nd
<BR>paragraph, last sentence now reads:
A part-select of a vector register or net is given with the following syntax.
The new wording proposed would be:
There are two types of part-selects, a constant part-select and an indexed
part-select. A constant part-select of a vector register or net is given with
the following syntax.
<p>Add paragraph 4 listed below:
<p>An indexed part select of a vector register or net is given with the
following syntax:
<pre>
reg [15:0] big_vect;
reg [0:15] little_vect;
big_vect[lsb_base_expr +: width_expr]
little_vect[msb_base_expr +: width_expr]
big_vect[msb_base_expr -: width_expr]
little_vect[lsb_base_expr -: width_expr]
</pre>
The width_expr shall be a constant expression. It also shall not be
affected by run-time parameter assignments. The lsb_base_expr and
msb_base_expr can vary at run-time. The first two examples select bits
starting at the base and ascending the bit range. The number of bits
selected is equal to the width expression. The second two examples
select bits starting at the base and descending the bit range.
Part-selects that address a range of bits that are completely out of
the address bounds of the net or register, or when the part-select is
x or z, shall yield the value x when read, and shall have no effect
on the data stored when written. Part-selects that are partially out
of range shall when read return x for the bits that are out of range,
and when written shall only affect the bits that are in range.
Examples:
<pre>
reg [31:0] big_vect;
reg [0:31] little_vect;
reg [63:0] dword;
integer sel;
// The first 4 if statements show the identity between the two part
// select constructs. Last shows indexable nature.
initial begin
if ( big_vect[0 +:8] == big_vect[7 : 0]) begin end
if (little_vect[0 +:8] == little_vect[0 : 7]) begin end
if ( big_vect[15 -:8] == big_vect[15 : 8]) begin end
if (little_vect[15 -:8] == little_vect[8 :15]) begin end
if (sel >0 && sel < 8)
dword[8*sel +:8] = big_vect[7:0]; // Replace the byte selected.
end
</pre>
Section 6, table 6.1 - "Legal left-hand side forms in assignment statements"
Add the statement below to the "Continuuus assignment" section.
"Constant indexed part select of a vector net.
Add the statement below to the "Procedural assignment" section.`
"Indexed part select of a vector register".
Section 9.2 "Procedural assignments" Third item in list. Delete the
sentence "Only constant expressions shall be legal for specifying the
part-select index."
BNF
Section A.8 reg_lvalue and net_lvalue, and primary:
reg_lvalue ::=
<BR>reg_identifier
<BR><FONT COLOR="#0000FF">| reg_identifier [ part_selection ]</FONT>
<BR>| reg_concatentation
<FONT COLOR="#0000FF">part_selection ::=</FONT>
<BR><FONT COLOR="#0000FF">expression /* degenerate case -> bit_select */</FONT>
<BR><FONT COLOR="#0000FF">| msb_constant_expression :
lsb_constant_expression</FONT>
<BR><FONT COLOR="#0000FF">| base_expression +: width_constant_expression</FONT>
<BR><FONT COLOR="#0000FF">| base_expression -: width_constant_expression</FONT>
net_lvalue ::=
<BR>net_identifier
<BR><FONT COLOR="#0000FF">| net_identifier [ part_selection ]</FONT>
<BR>| net_concatentation
primary ::=
<BR>number
<BR>| identifier
<BR><FONT COLOR="#0000FF">| identifier [ part_selection ]</FONT>
<BR>| concatenation
<BR>| multiple_concatenation
<BR>| function_call
<BR>| ( mintypemax_expression )
</BODY>
</HTML>
------------- End Forwarded Message -------------
<p><p> Adam Krolnik
Verification Engineer
Cyrix - NSC.
Richardson TX. 75085
<p><p><p>------------- End Forwarded Message -------------
<p><p> Adam Krolnik
Verification Engineer
Cyrix - NSC.
Richardson TX. 75085
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:53:28 PDT
and
sponsored by Boyd Technology, Inc.