Scope of program blocks?

J

jgg

Guest
Hi All,

Reading the past postings on clocking blocks from Jonathan Bromley has
brought up an old question I've had about program blocks..

How far do the special properties of a program block extend?
1) If I call a blocking task in a package from a program block when do
the blocking statements in the task schedule?
2) If I new a class from a package and call into a member task from a
program block when do the blocking statements schedule?
3) Like in #2 except the task forks a thread - when do tasks called by
the thread schedule?
4) New a class in a program block, pass the class handle to a thread
started in a module and call a task member?

I can't find anything in the LRM that describes the scope of the
special scheduling caused by the program block.. It would make sense
to me if it was a property of the threads and their sub-threads
spawned by the program block - otherwise it is pretty much useless
when intermixed with classes through something like OVM.

Regards,
Jason
 
On Tue, 22 Jan 2008 11:29:31 -0800 (PST),
jgg <jgunthorpe@gmail.com> wrote:

Reading the past postings on clocking blocks from Jonathan Bromley has
brought up an old question I've had about program blocks..
Good catch. It's been fixed by the SV committees for the 2008
revision. I'll answer based on that revision, since the
story was far from clear in the 2005 LRM.

How far do the special properties of a program block extend?
Program execution in the Reactive scheduler regions is a
property of a *thread of execution*. If that thread is
rooted in (=ultimately spawned from) an initial or always
block in a program, then it has Reactive execution. So...

1) If I call a blocking task in a package from a program block when do
the blocking statements in the task schedule?
Reactive.

2) If I new a class from a package and call into a member task from a
program block when do the blocking statements schedule?
Reactive - the thread is the program's.

3) Like in #2 except the task forks a thread - when do tasks called by
the thread schedule?
Reactive, again - the threads are children of a Reactive thread.

4) New a class in a program block, pass the class handle to a thread
started in a module and call a task member?
Active. The executing thread is rooted in the module.

I can't find anything in the LRM that describes the scope of the
special scheduling caused by the program block.
Nor could anyone else :)
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
On Tue, 22 Jan 2008 20:13:05 +0000,
Jonathan Bromley wrote:

It's been fixed by the SV committees for the 2008
revision.
For the sake of precision, I should point out that
this doesn't GUARANTEE that the change will go
into the 1800-2008 standard. There is still much
IEEE process to go through, including balloting.
Having said that, at least one sim vendor has
already implemented the changes I described
(and a few more to do with clocking blocks)
so I reckon we're on fairly safe ground.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

Welcome to EDABoard.com

Sponsor

Back
Top