Home > Community > Forums > Functional Verification > event questions from newbie

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 event questions from newbie 

Last post Mon, Nov 9 2009 1:28 AM by Hilmar. 1 replies.
Started by enchanterchi 08 Nov 2009 06:03 PM. Topic has 1 replies and 959 views
Page 1 of 1 (2 items)
Sort Posts:
  • Sun, Nov 8 2009 6:03 PM

    event questions from newbie Reply
    Dear Sir/Madam: I am a newbie of verification and specman. I have a question about EVENT in specman e: Can I create a event with is consisted of some other event, such as event CONSISTED_e = (@start_e or @stop_e or @clock_rise)? If it is possible, how could identify which is the cause of the CONSISTED_e in code? For example: my_method () @CONSISTED_e is { if (CONSISED_e is caused by @start_e) { // do something }; if (CONSISTED_e is caused by @(stop_e) { // DO SOMETHING }; and so on. Thanks.
    Filed under: , , ,
    • Post Points: 20
  • Mon, Nov 9 2009 1:28 AM

    • Hilmar
    • Top 500 Contributor
    • Joined on Wed, Jan 21 2009
    • Stockholm, 00-SE
    • Posts 28
    • Points 390
    Re: event questions from newbie Reply

     Hi,

     

    To answer your syntax question: Yes, you can declare events as combinations and/or sequences of other events. 

     

    The methodology question has a number of different options, depending on personal preferences. You can define actions to happen on the occurance of an event, e.g.:

     

    on stop_e {

       message(HIGH, "I got a stop event");

    };

     

    For your method, you could do something along these lines:

     

    my_tcm()@c_e is {

        first of {

           {

             sync @start_e;

             message(HIGH,"Got a start_e event");

          };

           {

             sync @stop_e;

             message(HIGH,"Got a stop_e event");

          };

           {

             sync @clk_e;

             message(HIGH,"Got a clk_e event");

          };

        };

    };


    The benefit of this that the method will see two events as well.

     

    Cheers,

    Hilmar

    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by enchanterchi at 08 Nov 2009 06:03 PM. Topic has 1 replies.