• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. passing events as parameters to methods or TCM

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 64
  • Views 12937
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

passing events as parameters to methods or TCM

jaichandra
jaichandra over 13 years ago

Hi everyone,

               Is it possible to pass events to a method or TCM in e language? I have a TCM which emits events based on some register settings.

   I have five such registers and each register does the same function but on different group. Initially i thought of creating a list of events and pass the index number to the TCM and it can emit the respective event. But i belive e do not support list of events. So i was checking if it is possible to pass events as parameters to the TCM and there is nothing mentioned about this in e ref manual.

  Can someone share some information if it is possible or is there any work around? Thanks in advance for your help.

  • Cancel
  • hannes
    hannes over 12 years ago

    Hello Jaichandra,

    events are not really types so you can't pass them. What you can do is a pass a list of structs/units which contain events. Depending on your condition you can then emit the events of the struct/unit in question. For example:
    type my_t: [T1, T2, T3];
    struct reg {
        event reg_ev;
    };
    unit foo {
        my_regs[3]: list of reg;
        
        my_tcm(regs:list of reg,flag:my_t)@sys.any is {
            case flag {
                T1: {emit regs[0].reg_ev;};
                T2: {emit regs[1].reg_ev;};
                T3: {emit regs[2].reg_ev;};
            };
            wait [1];
            stop_run();
        };
        run() is also {
            start my_tcm(my_regs,T2);
        };
    };

    Regards
    -hannes

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information