BTF draft 4 requested change - attributes

From: Adam Krolnik (krolnik@lsil.com)
Date: Fri Jan 28 2000 - 11:03:09 PST


This is a proposal to make the attributes more consistent - a few more
additions,
a correction, a removal and an update.

First the update:

Section 2.8 Attributes

Was:

See the syntax at the end of this section for a list of statements that
may have attributes attached to them.

Proposed:

See the syntax box ... ?!

Syntax 2-3 Statements with attributes attached.

module declarations
module or generate item
inout declaration
input declaration
output declaration
integer declaration
net declaration
reg declaration
time declaration
real declaration
realtime declaration
event declaration
function declaration
task declaration
block reg declaration
parameter declaration
local parameter declaration
specparam declaration
gate instantiation
module instantiation
ordered port connection
named port connection
udp declaration
udp output declaration
udp input declaration
initial construct
always construct
par(allel) block
seq(ential) block
statement
conditional statement
if else if statement
case statement
case_item
loop_statement
function statement
function case statement
function loop statement
function seq(ential) block
function conditional statement
function call
constant function call
system function call
unary operator
binary operator
conditional operator

Proposed change:
Add missing table referred to in the text. Refer to all elements with
attributes (including proposal listed below.)

------------------------------------------------------------

Section 2.8 Attributes

Was:

Proposed:
Add attribute_instance to following:

case item
statement
loop_statement
function_loop_statement
function_if_else_if_statement
function_conditional_statement
function_case_item
real declaration
realtime declaration
event declaration
parameter declaration
local parameter declaration
specparam declaration
system_function_call
constant_function_call

Remove attribute instance from the following:
task_call

Modify the attribute instance as shown below for:
function_call

<p>Proposed change:

All function_* definitions seem to be missing the attribute_instance.
Add attributes to these.

Add attribute_instance to case items, and as an element of statement.
You can't specify an attribute for an item of a case statement. What
if I wanted to attach (* rtl_not_reached *)

Also, you can't specify an attribute next to a statement within
sequential blocks. What if I wanted to say

(* rtl_ignore_width_mismatch *)
a = {a,b};

An attribute_instance is a valid item of a module, why not of
statements?

Don't specify attributes on elements of the language that can only be
represented as a single item. By allowing an attribute as a statement
level
and module level item, one can specify an attribute before these single
statements. Items like this include: defparam statements, all
assignments
types, task call, system task call, event trigger, disable statement,
release
and deassign statements, etc.

Proposed BNF: (Statements in <> are directives to follow for editing.)

A.2.1.1
local_parameter_declaration ::=
 < insert "[attribute_instance]" before all "list_of_param_assignments"
>

parameter_declaration ::=
 < insert "[attribute_instance]" before all "list_of_param_assignments"
>

pecparam_declaration ::= specparam [range] [attribute_instance]
     list_of_specparam_assignments;

<p>A.2.1.3

event_declaration ::= event [attribute_instance]
list_of_event_identifiers ;
real_declaration ::= real [attribute_instance] list_of_real_identifiers
;
realtime_declaration ::= realtime [attribute_instance]
list_of_real_identifiers ;

<p>A.6.4 (adding attributes)

tatement ::=
< include existing statement definitions>
 | attribute_instance

function_statement ::=
<include existing function_statement definitions>
 | attribute_instance

<p>A.6.6 (adding attributes)

function_if_else_if_statement ::=
  if (expression) [attribute_instance] function_statement_or_null
  { else if (expression) [attribute_instance] function_statement_or_null
}
  [ else function_statement_or_null ]

function_conditional_statement ::=
  if (expression) [attribute_instance] function_statement_or_null
  { else if (expression) [attribute_instance] function_statement_or_null
}
  [ else function_statement_or_null ]

A.6.7 (adding attributes)

case_item ::=
  expression {, expression}: [attribute_instance] statement_or_null
| default [:] [attribute_instance] statement_or_null

function_case_item ::=
  expression {, expression}: [attribute_instance]
function_statement_or_null
| default [:] [attribute_instance] function_statement_or_null

A.6.8 (adding attributes)

loop_statement ::=
   forever [attribute_instance] statement
 | repeat (expression) [attribute_instance] statement
 | while (expression [attribute_instance] statement
 | for (reg_assignment; expression ; reg_assignment)
[attribute_instance] statement

function_loop_statement ::=
   forever [attribute_instance] function_statement
 | repeat (expression) [attribute_instance] function_statement
 | while (expression [attribute_instance] function_statement
 | for (reg_assignment; expression ; reg_assignment)
[attribute_instance] function_statement

A.6.9 (removing attribute)

task_enable ::= hierarchical_task_identifier [ (expression {,
expression} )] ;

<p>A.8.2 (moving location of attribute)

function_call ::= hierarchical_function_identifier [range_or_type]
[attribute_instance]
   ( expression {, expression} )

constant_function_call ::= function_identifier [range_or_type]
[attribute_instance]
   ( constant_expression {, constant_expression} )

ystem_function_call ::= system_function_identifier [attribute_instance]
   ( expression {, expression} )

<p><p><p><p><p> Adam Krolnik
     Verification Mgr.
     LSI Logic Inc.
     Plano TX. 75074



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:54:11 PDT and
sponsored by Boyd Technology, Inc.