Jump to content

Search the Community

Showing results for tags 'events'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Accellera Systems Initiative
    • Information
    • Announcements
    • In the News
  • SystemC
    • SystemC Language
    • SystemC AMS (Analog/Mixed-Signal)
    • SystemC TLM (Transaction-level Modeling)
    • SystemC Verification (UVM-SystemC, SCV, CRAVE, FC4SC)
    • SystemC CCI (Configuration, Control & Inspection)
    • SystemC Datatypes
  • UVM (Universal Verification Methodology)
    • UVM (IEEE 1800.2) - Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • UVM Simulator Specific Issues
    • UVM Commercial Announcements
    • UVM (Pre-IEEE) Methodology and BCL Forum
  • Portable Stimulus
    • Portable Stimulus Discussion
    • Portable Stimulus 2.0 Public Review Feedback
  • IP Security
    • SA-EDI Standard Discussion
    • IP Security Assurance Whitepaper Discussion
  • IP-XACT
    • IP-XACT Discussion
  • SystemRDL
    • SystemRDL Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • Commercial Announcements
    • Announcements

Categories

  • SystemC
  • UVM
  • UCIS
  • IEEE 1735/IP Encryption

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Biography


Location


Interests


Occupation


Company

Found 3 results

  1. Hello, I have a system-under-test that can connect to one or more producers, as well as one or more consumers. I am currently writing a testbench for this system. I have a sequence of N test scenarios I would like to submit my SUT to, so I'd like phase through each in my testbench. I could instantiate N separate testbenches, but I am looking for a more elegant solution that only requires me to instantiate one testbench, and phase through the tests within it. I am looking for suggestions on how to do this. The primary concerns for me are that it should not be too difficult to understand the testing mechanism, and it should be as easy as possible to add new tests, or modify existing ones. To give this some substance, this is the solution I have design so far: class Producer : public sc_module { public: sc_event first_test_e; sc_event second_test_e; sc_mutex busy_lock; // ... void first_test() { wait(first_test_e); busy_lock.lock(); // ... busy_lock.unlock(); } void second_test() { wait(second_test_e); busy_lock.lock(); // ... busy_lock.unlock(); } }; class Consumer : public sc_module { public: sc_event first_test_e; sc_event second_test_e; sc_mutex busy_lock; // ... void first_test() { wait(first_test_e); busy_lock.lock(); // ... busy_lock.unlock(); } void second_test() { wait(second_test_e); busy_lock.lock(); // ... busy_lock.unlock(); } }; class tb_top : public sc_module { public: Producer prod_i; Consumer cons_i; // ... void top_test() { // First test starts... prod_i.first_test_e.notify(SC_ZERO_TIME); cons_i.first_test_e.notify(SC_ZERO_TIME); wait(SC_ZERO_TIME); wait(SC_ZERO_TIME); prod_i.busy_lock.lock(); cons_i.busy_lock.lock(); // First test done. prod_i.busy_lock.unlock(); cons_i.busy_lock.unlock(); // Go on to second test... // ... } }; Here, I use events owned by the producers/consumers to begin tests. I use locks to communicate to the top test thread when all producers/consumers are done. I created a rudimentary prototype for this with success. Do you have any feedback?
  2. I have recently modeled registers as simple unions to represent bitfields, for example: typedef union { struct { uint32_t ADDRESS:5; uint32_t RESERVED:26; uint32_t ENABLE:1; } b; uint32_t w; } register_type; which facilitates the access to either the complete word or a bitfield. The interesting part comes when I try to check if the register value has changed, is there a more elegant way of doing this than polling in if or while statements for each register's value? I need to do this for a lot of them so I was wondering if modeling this using sc_bv provides a built-in event I could use in a SC_METHOD sensitivity list? example: typedef union { struct { sc_bv<5> ADDRESS; sc_bv<26> RESERVED; sc_bv<1> ENABLE; } b; uint32_t w; } register_type; and then do something like: register_type Reg; ... SC_METHOD(some_method); sensitive << Reg.b.ENABLE; ... some_method(){ ... } Any pointers or ideas are greatly appreciated
  3. Hello All I am trying to understand the hierarchical events and for this I created a SystemC class which contains a sc_event object. - How I can control an event to make it hierarchical or non-hierarchical ? -What is the example use case or hierarchical events. Can anyone help me on this ? Thanks Khushi
×
×
  • Create New...