Subject: $sv-ec Re: VeraLite Donation/Clarification
From: Kevin Cameron x3251 (Kevin.Cameron@nsc.com)
Date: Thu Sep 05 2002 - 11:55:06 PDT
Just some thoughts from the stuff mentioned in yesterday's meeting:
class/endclass/extends etc.
If you're going to re-use stuff from C++ I'd like the
syntax to be as similar as possible i.e. ':' instead of
'extends' and keep '{}' as with struct, and 'private'
instead of 'local'.
If the semantics of a Vera/SV class are significantly
different from C++ it should probably be called something
else to avoid confusion.
$cast_assign
I presume this is a system task so that it could be
implemented through PLI in Verilog. I'd prefer to see
it replaced by a new assignment operator e.g. ":=".
#define/extern
I would like to see this revisited, sharing definitions
between C/C++ and Verilog is currently error prone due
to having to copy and translate definitions.
wait_var/wait_child
wait_var should just be rolled into '@'.
I'd prefer to have autonomous threads named (by identifiers on the
fork/process statement) so that you can say "join <identifier>"
instead of wait_child().
fork/join none vs process
process is different from fork in that it refers to
a single statement and fork refers to a group of statements
(1 or more). This makes a difference if you want to identify
a thread uniquely by name, so I'd rather keep the seperate
process statement.
$sync/$trigger
I'd prefer to see these rolled into the -> and @ syntax e.g.
$tigger(ONE_BLAST,evt);
becomes:
ONE_BLAST -> evt;
The $sync task appears to create an event out of other events
so could be replaced by special event function for the ORDER
and CHECK versions. E.g.
$sync(ORDER,lookupchk_evnt,queue_event);
becomes:
@(ordered(lookupchk_evnt,queue_event));
Which can be used with other events e.g.:
always @(posedge clock and ordered(lookupchk_evnt,queue_event)) begin
...
end
(Is there an alternative syntax for ordered events in the assertions stuff
already?)
alloc
'alloc' appears to be used to create various objects dynamically. As
with other Vera system tasks I presume it was done this way for ease
of implemetation through PLI. For SV I would prefer to create new
types for these objects and use a 'new' style syntax for creating
them dynamically. E.g.
module foo;
mailbox s_mbx, // permanemt mailbox
var v_mbx; // mailbox reference
initial begin
v_mbx = new; // dynamic mailbox
end
...
[NB: I don't think we have a donation covering references and/or
pointers yet. Is one in the pipeline?]
The mailbox_put/get tasks can be replaced regular reads and writes
as outlined in the channel proposal (http://www.eda.org/sv-ec/hm/0107.html)
since channels and mailboxes are almost the same (I'll rehash the proposal
to cover the extra functionality later).
Semaphores should also become a proper part of the language e.g.:
<semaphore declaration> ::= semaphore <identifier>["["<sema. count>"]"["["<key count>"]"]]
You could overload the assignment operators to replace semaphore_put/get
functions e.g.:
module foo;
semaphore s1; // counts default to 1
integer key_idx;
always...
key_idx <= s1; // returns -1 if key not available
...
key_idx = s1; // blocks until key available
s1[0][key_idx] = 0; // release key
// and/or
s1++; // blocks until key available
s1--; // returns a key
The static declarations of mailboxes and semaphores should be more friendly
to synthesis tools.
clocking_domain
To avoid making CLOCK a keyword I'd be tempted to change the syntax
to something like:
clock_domain <domain name> [@(<clock expression>)]
You could just use <domain name> instead of <domain name>.CLOCK to pick
up the clock signal.
Regards,
Kev.
This archive was generated by hypermail 2b28 : Thu Sep 05 2002 - 11:57:40 PDT