Jump to content


  • Content Count

  • Joined

  • Last visited

About hbhbts

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hbhbts


    SC_MODULE(Fsm) { sc_in<bool> clk; sc_in<bool> reset; sc_in<bool> is_valid; sc_in<bool> is_half_dollar; sc_out<bool> is_dispensed; SC_CTOR(Fsm) { SC_THREAD(fsm_thread); sensitive << clk.pos(); }; void fsm_thread() { typedef enum {S0=0, S1=1, S2=2, S3=3} state_e; state_e state = S0; while(true) { is_dispensed.write(false); if(reset.read() == false) { switch(state) { case S0: if(is_valid.read() == true && is_half_dollar.read() == true) state = S1; else state = S2; break; case S1: if(is_valid.read() == true && is_half_dollar.read() == true) state = S2; else state = S3; break; case S2: if(is_valid.read() == true) state = S3; break; case S3: is_dispensed.write(true); state = S0; break; default: state = S0; } } else state = S0; wait(); } }//fsm_thread };
  2. the original compare_field_int() is plan to bit size <=64, you can use compare_field() instead.
  3. based on your defined data_item, your monitor implementation is incorrect. the monitor shall sample the sample the in signal and than sample the corresponding out signal, give the encapsulation the two value in a data item, send it out.
  4. you can use the one monitor for the dut input and output. And i think the root case is not base on how mant input/ouput of dut you have, but the interface type the dut have. for exanple, if you have one axi input and one aix output, you can use one monitor to collect all input/outout axi transaction. So i think the number monitor is based on the types of interfaces.
  5. as you define a domain1 phase with the run_phase, so when the run_phase complete, extract phase will scheduled for last phase to run. at the same time, the domain1 phase also complete and schedule extract phase to next to run. So the there two phase to printed. for your second question, the run phase schedule extract phase and the domain1 phase schedule final phase and clean the pahse runining before the final so final phase run once.
  6. add a TLM port in regular driver and the port is used to get the transaction and sent to ref model. And also the driver respondsiable for transition the item to RTL signals
  7. maybe you not enable polymorphism at other functions when extend from base class.
  8. you can enable UVM_PHASE_TRACE, this debug message can print phases and objections information.
  • Create New...