Jump to content

karlzhao

Members
  • Content count

    5
  • Joined

  • Last visited

About karlzhao

  • Rank
    Member

Recent Profile Visitors

297 profile views
  1. Hi Guys, I want to print out some info in the log file as bellow: TEST0001: seed = 12 Out_Str: Hello_test Out_Num: 64 TEST0002: seed = 12345678 Out_Str: Hello_Public_test Out_Num: 1024 I have do this as follows: $fdisplay("TEST%04d: seed = %d Out_str: %s Out_Num: %d", index, seed, out_str, out_num); But I can not got the format which I wanted. Can you tell me how can I do this? Thanks a lot!
  2. These days, I have done some study on UVM_ML. But In my verification work, The work can be done good with UVM_SV lib, which can be done by UVM_ML too. So I want to know why the UVM_ML is coming out, and what its advantage is. In Which Context the UVM_ML is a better choice than UVM_SV ?
  3. Dear Guys, I have got a compile error as bellow: .../sc_interface.h:67: error: 'sc_core::sc_interface::sc_interface(const sc_core::sc_inteface&)' is private ../producer.h:33: error: within this context ...... My sc code here: producer.h class producer : public uvm_component , public tlm::tlm_bw_transport_if<tlm::tlm_base_protocol_types> { public: tlm::tlm_initiator_socket<32,tlm::tlm_base_protocol_types> b_isocket; tlm::tlm_initiator_socket<32,tlm::tlm_base_protocol_types> nb_isocket; producer(sc_module_name nm) : uvm_component(nm) , b_isocket("b_isocket") , nb_isocket("nb_isocket") { b_isocket(*this); nb_isocket(*this); } UVM_COMPONENT_UTILS(producer) void build() { cout << "SC producer::build" << endl; } ...... } sctop.cpp: #include "uvm_ml.h" #include "ml_tlm2.h" using namespace uvm; using namespace uvm_ml; #include "uvm_ml_transaction.h" #include "sc_global_define.h" #include "sc_env.h" #include "producer.h" class sctop : public uvm_component { public: sc_env * scenv; producer prod; sctop(sc_module_name nm) : uvm_component(nm), prod(prod) { cout << "SC sctop::sctop name= " << this->name() << " type= " << this->get_type_name() << endl; } void build() { cout << "SC sctop::build " << this->name() << endl; scenv = new sc_env("scenv"); } void before_end_of_elaboration() { cout << "SC sctop::before_end_of_elaboration " << this->name() << endl; std::string full_initiator_b_socket_name = ML_TLM2_REGISTER_INITIATOR(prod, PAYLOAD_TYPE, b_isocket , 32); std::string full_initiator_nb_socket_name = ML_TLM2_REGISTER_INITIATOR(prod, PAYLOAD_TYPE, nb_isocket , 32); uvm_ml::uvm_ml_connect(full_initiator_b_socket_name, "test.svenv.sv_ref_model.b_target_socket"); uvm_ml::uvm_ml_connect(full_initiator_nb_socket_name, "test.svenv.sv_ref_model.nb_target_socket"); } void connect() { cout << "SC sctop::connect " << this->name() << endl; if (scenv->ref_model != NULL) { uvm_ml_register(&scenv->ref_model->sc_to_sv_port1); uvm_ml_register(&scenv->ref_model->sc_to_sv_port2); } uvm_ml_register(&scenv->data->sv_to_sc_data_export); uvm_ml_register(&scenv->config->sv_to_sc_config_export); } void start_of_simulation() { cout << "SC sctop::start_of_simulation " << this->name() << endl; } void end_of_elaboration() { cout << "SC sctop::end_of_elaboration " << this->name() << endl; } UVM_COMPONENT_UTILS(sctop) }; UVM_COMPONENT_REGISTER(producer) UVM_COMPONENT_REGISTER(sctop) int sc_main(int argc, char** argv) { return 0; } UVM_ML_MODULE_EXPORT(sctop) Can you help me with this?
  4. I have got an error when I was running a test. My bench has been constructed by system C on cadence incisive 14.20. The run command is like this: irun -sysc -uvmtop "SC:top" -top dut -f list.f -DTV_PATH=\\\"/home/test0/\\\" In sc_main.cpp, there is a line like this: cout << "TV_PATH: " << TV_PATH <<endl; But when I was running, there is a compile error like this: line 12: error: expected an expression cout << "TV_PATH: " << TV_PATH <<endl; extra text after expected end of number cout << "TV_PATH: " << TV_PATH <<endl; Hi nice guys, How can I solve this problem? Thanks!
×