Jump to content

mrforever

Members
  • Content Count

    118
  • Joined

  • Last visited

  1. Hi Alan, Hi, Dave Thanks for your suggestion, I think i have found the problem. I think the factory mechanism should work at the compile-time, when i use run-time option to registered my_test #(TSID), vcs doesn't support it, i didn't take your suggestion to have a test, i don't know whether it will work.
  2. Hi, all Does anybody know the differences between debug_all and debug_pp. When i use -debug_all option, vcs runs my test successfully, it will failed if i change -debug_all to -debug_pp. This is the error message and corresponding code: Error-[NOA] Null object access /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_pool.svh, 307 The object is being used before it was constructed/allocated. Please make sure that the object is newed before using it. #0 in \uvm_object_string_pool#(uvm_event)::get at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_pool.svh:307 #1 in \uvm_transaction::new at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_transaction.svh:494 #2 in \uvm_sequence_item::new at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/seq/uvm_sequence_item.svh:53 #3 in \my_tr::new at ../sv/common/my_tr.sv:495 #4 in \uvm_object_registry#(my_tr,"my_tr")::create_object at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_registry.svh:197 #5 in \uvm_factory::create_object_by_type at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_factory.svh:1104 #6 in \uvm_object_registry#(my_tr,"my_tr")::create at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_registry.svh:248 #7 in \my_monitor::run_phase at ../sv/master/my_monitor.sv:91 #8 in \uvm_run_phase::exec_task at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_common_phases.svh:245 #9 in \uvm_task_phase::execute at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_task_phase.svh:150 #10 in \uvm_task_phase::m_traverse at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_task_phase.svh:112 #11 in \uvm_task_phase::m_traverse at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_task_phase.svh:92 #12 in \uvm_task_phase::m_traverse at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_task_phase.svh:92 #13 in \uvm_task_phase::m_traverse at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_task_phase.svh:92 #14 in \uvm_task_phase::m_traverse at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_task_phase.svh:92 #15 in \uvm_task_phase::m_traverse at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_task_phase.svh:92 #16 in \uvm_task_phase::traverse at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_task_phase.svh:80 #17 in \uvm_phase::execute_phase at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_phase.svh:1171 #18 in \uvm_phase::m_run_phases at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_phase.svh:1847 #19 in \uvm_root::run_test at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_root.svh:417 #20 in run_test at /EDA_Tools/synopsys/vcs_vE-2011.03/etc/uvm-1.1/uvm-1.1d/src/base/uvm_globals.svh:40 #21 in unnamed$$_15 at ../sv/top/my_top.sv:470 #22 in my_tb_top Pieces code of my_monitor.sv: virtual task run_phase(uvm_phase phase); my_tr axi_item; @(negedge clkmg_vif.rst); forever begin @(this.clkmg_vif.wait_one_clk); axi_item = my_tr::type_id::create("axi_item"); collect_pkt(axi_item); scb_port.write(axi_item); end endtask : run_phase By the way, class my_tr has using the field and factory mechanism. Anybody met the same problem? Regards
  3. Hi, all I want to use the factory mechanism to write one reusable test, this is the codes class my_test #(parameter TSID=0) extends uvm_test; typedef my_test #(TSID) this_typ; typedef uvm_component_registry #(my_test #(TSID), $sformatf("my_test%0d", TSID)) type_id; static function type_id get_type(); return type_id::get(); endfunction : get_type function new(string name = "my_test", uvm_component parent=null); super.new(name,parent); endfunction : new ... endclass But I met such a compile error: Error-[NCE] Non-constant expression The following expression should be a constant. Expression: $sformatf("my_test%0d", TSID) Source info: typedef uvm_component_registry #(my_test #(TSID), $sformatf("my_test%0d", TSID)) type_id; ... If the second parameter should be a constant or constant expression in typedef uvm_component_registry #(my_test #(TSID), $sformatf("my_test%0d", TSID)) type_id; then how can i distinguish the specialized test using TSID which is from run option (my original idea is that using parameter TSID to distinguish the different specialized test)? Second problem, my_test is a generic class now, where should the specialized test define and how to define if my original idea is feasible? Regards
  4. Hi uwe, there should be a dot between slv_seq[k] and evt,aI am sorry that I left out it.
  5. In the env, there is such uvm_config_db::set(): for (int i = 0; i < host_num; i++) begin inst_name = $sformatf("*.v_seq.slv_seq[%0d]", i); uvm_config_db#(uvm_event)::set(uvm_root::get(), inst_name, "evt", env.subenv[i].slv_agt.slv_mon.evt); end in the slv_seq, there is such uvm_config_db::get(): if(!uvm_config_db#(uvm_event)::get(null, this.get_full_name(), "evt", evt)) `uvm_fatal("NOEVT",{"evt must be set for: ",get_full_name(),".evt"}); When I use +UVM_CONFIG_DB_TRACE, I found such message: UVM_INFO /EDA_Tools/synopsys/vcs1209/etc/uvm-1.1/uvm-1.1d/src/base/uvm_resource_db.svh(121) @ 2580000: reporter [CFGDB/GET] Configuration 'uvm_test_top.env.v_sqr.v_seq.slv_seq[k]evt' (type class uvm_pkg::uvm_event) read by = null (failed lookup) If I uvm_config_db::set() in slv_mon like this: uvm_config_db#(uvm_event)::set(uvm_root::get(), "*", "evt",evt); there isn't such message, I think it configures successfully. there are multiple slv_mon and slv_seq instances, when there is only one valid slv_mon and slv_seq, the evt cann't pass successfully when it triggered. So I want to config evt of slv_mon to slv_seq using the bijective way. It isn't success at the moment, can anybody tell me the graceful way? Thanks in advance mrforever
  6. Hi David, I think the UVM library which i am using isn't pre-compiled UVM library. The version of the UVM library is uvm-1.1d, which is downloaded from this site: http://www.accellera.org/downloads/standards/uvm Could you tell me the comunication way with Synopsys FAE? Thanks in advance!
  7. Hi all, There are such codes in heartbeat class: virtual task run_phase(uvm_phase phase); uvm_callbacks_objection cb; uvm_heartbeat hb; uvm_event e; uvm_component comps[$]; if (heartbeat_window == 0) begin return; end e = new("e"); assert($cast(cb, phase.get_objection())) else `uvm_fatal("heartbeat", run_phase objection isn't the type of uvm_callbacks_objection. You need to define UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE!) hb = new(get_full_name(), m_context, cb); uvm_top.find_all("*", comps, m_context); hb.set_mode(UVM_ANY_ACTIVE); hb.set_heartbeat(e, comps); fork forever begin #heartbeat_window e.trigger(); end join_none endtask: run_phase The VCS always reports assertion fail even though I defined UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE in define.svh or in command line. The way of defining UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE: in define.svh `define UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE // For heartbeatin command line: VCS = vcs -sverilog -debug_all -picarchive -timescale=1ns/1ps \ +acc +vpi \ +define+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR+UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE \ If I defined UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE, phase.get_objection() should return the uvm_callbacks_objection type and the assert should be successful, but it doesn't. Why? Thanks in advance!
  8. Hi all, There are such codes in heartbeat class: virtual task run_phase(uvm_phase phase); uvm_callbacks_objection cb; uvm_heartbeat hb; uvm_event e; uvm_component comps[$]; if (heartbeat_window == 0) begin return; end e = new("e"); assert($cast(cb, phase.get_objection())) else `uvm_fatal("heartbeat", run_phase objection isn't the type of uvm_callbacks_objection. You need to define UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE!) hb = new(get_full_name(), m_context, cb); uvm_top.find_all("*", comps, m_context); hb.set_mode(UVM_ANY_ACTIVE); hb.set_heartbeat(e, comps); fork forever begin #heartbeat_window e.trigger(); end join_none endtask: run_phase The VCS always reports assertion fail even though I defined UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE in define.svh or in command line. The way of defining UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE: in define.svh `define UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE // For heartbeatin command line: VCS = vcs -sverilog -debug_all -picarchive -timescale=1ns/1ps \ +acc +vpi \ +define+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR+UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE \ If I defined UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE, phase.get_objection() should return the uvm_callbacks_objection type and the assert should be successful, but it doesn't. Why? Thanks in advance!
  9. Hi David, I am sorry that I ignored the compile-time. I have tried it, but it didn't work, still reporting the assertion error. Here is the corresponding script in Makefile VCS = vcs -sverilog -debug_all -picarchive -timescale=1ns/1ps \ +acc +vpi \ +define+UVM_OBJECT_MUST_HAVE_CONSTRUCTOR+UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE \ I have double checked the spelling of macro UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE, it's right. Is there anything i am missing? Why it didn't work when i defined the macro UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE in the file define.svh? By the way, there is another issue about uvm_reg, could have a look at this: http://forums.accellera.org/topic/1255-issue-about-read-write-only-register-via-backdoor/ Thanks in advance. Regards mrforever
  10. Hi David, I have such codes in heartbeat class: virtual task run_phase(uvm_phase phase); uvm_callbacks_objection cb; uvm_heartbeat hb; uvm_event e; uvm_component comps[$]; if (heartbeat_window == 0) begin return; end e = new("e"); assert($cast(cb, phase.get_objection())) else `uvm_fatal("heartbeat", run_phase objection isn't the type of uvm_callbacks_objection. You need to define UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE!) hb = new(get_full_name(), m_context, cb); uvm_top.find_all("*", comps, m_context); hb.set_mode(UVM_ANY_ACTIVE); hb.set_heartbeat(e, comps); fork forever begin #heartbeat_window e.trigger(); end join_none endtask: run_phase The VCS always reports assertion fail even though I defined UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE in define.svh or in command line. The way of defining UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE: in define.svh `define UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE // For heartbeat in command line: ./simv +UVM_TESTNAME=test +UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE -l run.log If I defined UVM_USE_CALLBACKS_OBJECTION_FOR_TEST_DONE, phase.get_objection() should return the uvm_callbacks_objection type and the assert should be successful, but it doesn't. Why? Thanks in advance!
  11. Hi all, There is one register model such as this: class R_r extends uvm_reg; uvm_reg_field vaule; ... endclass : R_r class A_R_file extends uvm_reg_file; R_r R; ... endclass : A_R_file class R_model extends uvm_reg_block; A_R_file R_f; ... endclass : R_model class my_r_seq extends uvm_reg_sequence; R_model regmodel; ... write_reg(regmodel.R_f.R, status, wdata); peek_reg (regmodel.R_f.R, status, rdata); ... endclass : my_r_seq R_r is write-only, when reading R_r via backdoor as above, VCS reports such an error. UVM_ERROR /EDA_Tools/synopsys/vcs1209/etc/uvm-1.1/uvm-1.1d/src/reg/uvm_reg_block.svh(2049) @ 406000: reporter [RegModel] Block does not have hdl path defined for abstraction 'RTL' UVM_ERROR: get: unable to locate hdl path R_f.R Either the name is incorrect, or you may not have PLI/ACC visibility to that name The VCS reports that "unable to locate hdl path", but I have used configure() function to configure the hdl path in class A_R_file and class R_model. Did anybody meet the issue?
  12. Hi all, How to end simulation when there are forever-loops in sub-sequence and monitor? I have tried set_drain_time, but it doesn't work. If I remove the forever-loops in sub-sequence and monitor. The simulation ends when drop_objection executes done successfully in top-sequence after all the item being sent. By the way, I want to monitor signals of DUV during all the simulation time until the last item being sent. Could anybody tell me the trick? Thanks in advance.
  13. Hi logger, Thanks for your reply, I will have a try. Buy the way, usually the uvm_config_db#(TYPE)::get() should not be invoked earlier than uvm_config_db#(TYPE)::set(), where do you invoked uvm_config_db#(TYPE)::get()? In the pre_body(), body() or new(), etc. on sequence?
  14. Hi all, How to pass the value to the variable of uvm_sequence object? 1. use uvm_config_db 2. assign directly When i use the first way, i found that maybe uvm_config_db::get() can only use in the uvm_component class. Then i use the second way, I cann't pass the value to the variable successfully. Does anybody know the reason? Thanks in advance. pieces of code of the first way: In top: uvm_config_db#(uvm_bitstream_t)::set(uvm_root::get(), "*", "my_cpu_id", HOST_NUM); In my_sub_sequence which extends from uvm_sequence: void'(uvm_config_db#(uvm_bitstream_t)::get(this, "", "my_cpu_id", my_cpu_id)); Result: VCS reports error. pieces of code of the second way: In v_sequence: for (int i = 0; i < host_num; i++) begin inst_name = $sformatf("sub_seq[%0d]", i); //sub_seq[i] = my_sub_sequence::type_id::create(inst_name,,get_full_name()); sub_seq[i] = new(inst_name); sub_seq[i].my_cpu_id = i; end In my_sub_sequence: int my_cpu_id; ... virtual task body(); ... $display("my_cpu_id = %0d", my_cpu_id); ... endtask Result: every my_cpu_id's value display 0, not 0, 1, 2, 3.
×