[sv-ec] Re: Program


Subject: [sv-ec] Re: Program
From: Kevin Cameron (Kevin.Cameron@nsc.com)
Date: Thu Feb 27 2003 - 15:47:12 PST


[Just for the record]

Since "program" doesn't create any new objects only modifies access to existing
objects it seems to me that the "program" qualifier/attribute could be applied
at the statement level - e.g. preceding a statement with "program" modifies the
semantics of the statement (and the statement can be a block):

  module test_bench;
     initial program begin
        // code with "program" semantics
     end

If you need a task with program semantics you could do:

  task foo(input a,output b)
    program begin
       // code with "program" semantics
    end
  endtask

It would also let you mix program and regular semantics in a long procedural
test:

   module long_test;
      initial begin
        begin : test_1
           // asynchronous test
        end
        program begin : test_2
           // synchronous test
        end
        ...
      end
    endmodule

Regards,
Kev.

--
National Semiconductor, Tel: (408) 721 3251
2900 Semiconductor Drive, Mail Stop D3-500, Santa Clara, CA 95052-8090



This archive was generated by hypermail 2b28 : Thu Feb 27 2003 - 15:47:56 PST