Email: bknpk@hotmail.com Phone: +972-54-7649119
V

 

ASIC/FPGA Design and Verification Out Source Services

Restrict your debug print message to a short manageable and easy to visually inspect text log.

  1. For me system C is a great, free and high performance hardware simulator with the C++ as a verification engine.
  2. Sometimes there is a need for some printing to help in debugging. The messages can not be printed for every check, in order not create huge files, which are difficult to inspect and store on disk. In this example, the message dump, is restricted to some time of interest. Follow next example:



  3. //dbg pini
    1. sc_time t1(126790 ,SC_NS);
    2. sc_time t2(126820 ,SC_NS);
    3. sc_time t3=sc_time_stamp();
    4. if(t1 < t3 && t2 > t3) {
    5.   for(i=0; i < MAX_BUF; i++) {
    6.     j=(i+idx)%MAX_BUF;
    7.     cout << "dbg26 " << i << " " << j << " " << get_into_ais_a[j].read() << " at " << sc_time_stamp() << endl;
    8.   }
    }
    //dbg pini

  4. For a nice debug message, one can assign the time value into a string and later use it:

    1. #include
    2. ...
    3. sc_time t_dbg;
    4. string t_st;
    5. ...
    6. t_dbg = sc_time_stamp();
    7. t_st.assign(t_dbg.to_string());
    8. cout << "sc_time to string " << t_st << endl;
  ...



Home

my first example with systemc verification

A simple c++ scoreboard implementation using STD queues.


SD slave with Samsung flash (k9f1208) (vhdl project).


Download Area






Search This Site


Feedback This Site




new pages on this site