Jump to content

Search the Community

Showing results for tags 'next_trigger'.

  • 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

Calendars

  • Community Calendar

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 1 result

  1. Hello Everyone, I was trying to implement FSM in SystemC using SC_METHOD and next_trigger(). In the requirement it is mentioned i can't use SC_THREAD and static sensitivity (except reset_input). I am facing one problem here, which mentioned in screen-shot. In the attached screen-shot, whenever the current_state is FIRST then next_state could be SECOND, THIRED, and FOURTH (the priority of next_state is SECOND > THIRED > FOURTH). I am able to write a code using next_trigger when next_state is only one and not many. Here is the raw code: sc_in<bool> Reset_in; sc_in<bool> First_in ; sc_in<bool> Common_in; sc_in<bool> Second_in; sc_in<bool> Third_In; sc_in<bool> Fourth_in; SC_METHOD(FSMMethod) sensitive << Reset_in; async_reset_signal_is(Reset_in, false); dont_initialize(); void FSMMethod() { if (Reset_in == false) { current_state = RESET; next_trigger(); } else { switch (current_state) { case RESET: next_state = FIRST; next_trigger(First_in.posedge_event()); // now you can see when FSM is in RESET state then if First_in signal value become one //then FSM method will call again due to next_trigger and that time the next_state would be FIRST. break; case FIRST: // I am stuck here, if Common_in and Second_in signal true then next_state should be SECOND but the problem // is during the execution it will go inside the if block, if block not executed then next_trigger condtion // will not trigger the sc_method again and FSM will not in next_state. if (Common_in && Second_in) { next_state = SECOND; next_trigger(Common_in.value_changed_event() & Second_in.value_changed_event()); } else if (Common_in && Third_in) { next_state = THIRD; next_trigger(Common_in.value_changed_event() & Third_in.value_changed_event()); } else if (Common_in && Fourth_in) { next_state = FOURTH; next_trigger(Common_in.value_changed_event() & Fourth_in.value_changed_event()); } break } current_state = next_state; } } Hope i am able to put my question but if you guys need more clarification then please let me know. ultimatly i am not able to call FSMMethod beacuse next_trigger not executed in FIRST state, first we to have evalaute the transition condition then only next_trigger will execute. if in FIRST state if next_state were only one then it would be easy to use next_trigger (just in case we used in RESET to FIEST state) Please give me your valauble suggestions so it help to implement this FSM design. Thanks and Regards, ARI
×
×
  • Create New...