Jump to content

wuddi

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Hi dudi, Thanks. I solve the problem in a different way. first, I declare a event clock_detected; then use a task to triggered the event. task sync_to_posedge_clk(); fork forever begin @(vif.cb); -> clock_detected; end join_none endtask task run_phase(uvm_phase phase); sync_to_posedge_clk(); seq_item_port.get_next_item(req); wait(clock_detected.triggered); . . . endtask Best Regards wuddi
  2. Hi UVM experts: Normally, driver gets transaction at posedge clock and then drive transaction to interface. But when driver gets a transaction at non-posedge clock, it cannot drive transaction immediately, and must wait next posedge clock (NBA region) to drive it out. My code as below shows: [example code begin] forever begin seq_item_port.get_next_item(req); vif.cb.address <= req.address; vif.cb.data <= req.data; @(vif.cb); end [example code end] transaction_1 : address = 32'h0000_1010; data = 32'h0000_1111; transaction_2 : address = 32'h0000_1111; data = 32'h1111_0000; When driver gets tranasction_1 at non-posedge clock, and gets transaction_2 at next posedge clock, I found only transaction_2's address=32'h0000_1111 & data=32'h1111_0000 been driven to the interface. So how to fix this bug? Thanks in advence. Best Regards wuddi
  3. Hi UVM experts, I want to use members of configuration object in transaction file and there is an example below, How can transaction access to configuration object? (I have use uvm_config_db::set to put my_cfg into resourse database, but I'm confused about how and when to use uvm_config_db::get to get my_cfg information from database.) class my_cfg extends uvm_object; typedef enum { DATA_WIDTH_8, DATA_WIDTH_16, DATA_WIDTH_32 } data_width_enum; rand data_width_enum data_width = DATA_WIDTH_8; `uvm_object_utils_begin(my_cfg) ...... function new (string name = "my_cfg"); ...... endclass class my_trans extends uvm_object; my_cfg cfg; rand bit [31:0] data; constraint reasonable_data { (cfg.data_width == DATA_WIDTH_8) -> data[31:8] ==0 ; (cfg.data_width == DATA_WIDTH_16) -> data[31:16] ==0; } `uvm_object_utils_begin(my_trans) ...... function new (......); ...... endclass Thanks.
  4. Dear UVM experts: I am a new to UVM, I have a question, the different between seq_item_port.get() and seq_item_port.get_next_item(). Is the get method is equivalent to seq_item_port.get_next_item() and seq_item_port.item_done(); Thank you!
×
×
  • Create New...