Subject: [sv-ac] Usage of templates
From: Adam Krolnik (krolnik@lsil.com)
Date: Fri Mar 28 2003 - 14:54:52 PST
Good afternoon;
Having looked at the BNF for templates, I've come to this realizations.
Background:
templates can contain:
property definitions
sequence definitions
assert or cover directives
initial/always blocks
variable declaration
parameter declarations
generate statements
The procedural scopes can contain:
procedural_asssertions
<other stuff>
Thus assuming the inline property proposal passes (a or b) the only
thing allowed in a template instantiated in a procedural scope would
be procedural_assertion statements. You could not create of the other
elements.
For instantiation of templates in a declarative context, the only issue
would be the use of event controls as parameters to the template.
I would recommend that we drop support for procedural instances of templates
and work toward completing templates as declarative elements.
Currently template_instance is not used in the BNF. I suggest that it be
allowed in concurrent_assertion_items. This allows it in modules, interfaces,
templates, etc.
[BTW, why is the template body allowed to have a 'statement' production? This means
template me;
reg a, b;
if (a) b = 1;
endtemplate
Is legal. I would suggest this be removed. You can have always/initial blocks to do this. ]
THanks.
Adam Krolnik
Verification Mgr.
LSI Logic Corp.
Plano TX. 75074
This archive was generated by hypermail 2b28 : Fri Mar 28 2003 - 14:56:05 PST