Search form

Main menu

My Account Menu

Forums: UVM

View Mode:
Q&A
  • 0 answers
    2 views

    test

    module dummy (a,b)
    input a;
    output b;
    initial
    begin
    assign b = a;
    end
    end

    Read more →

    33 min 47 sec ago - No activity yet
  • 1 answer
    95 views

    What is the difference between uvm_config_db and uvm_resource_db ?

    Hi

    I would like to know What is the difference between uvm_config_db and uvm_resource_db ?
    Please let me know the difference between the the two config_db's, when it can be used and how it is used with an example?
    I went through so many articles but it is vague and unclear.can some one point me with the expamples and usage ?

    -Thanks,
    -Raja.

    Read more →

    Last Activity 1 hour 38 min ago by tfitz
  • 0 answers
    6 views

    Is there a way to see which raise objection is still not dropping?

    Is there a way to see which raise objection is still not dropping?

    I'm asking this question because there are times that my simulation hangs-up and then the reason is because there is an objection that is still not dropping.
    It took me a lot of time to debug it, so maybe there is a faster way to know if an objection is still raised.

    Read more →

    Last Activity 2 hours 5 min ago by nithyavlsi
  • 0 answers
    27 views

    How to use ralgen in VCS

    I have provided below two registers details in xml file to generate ralf from xml.

    Register Name Register Address Register Width Field Name Field Offset Field Width Field Access Field Reset Value
    reg_SBus_command 0x8000 16 SBus_command 0 8 RW 0
    reg_SBus_command unused 7 8 R 0

    I am using below command to convert xml to ralf in UVM format. It gives error shown below command and generating blank ralf file.

    ralgen -uvm -ipxact2ralf sapphire_reg_sheet.xml
    INTERNAL: Could not find element memoryMaps.

    Can anyone tell me my xml file is correct?
    Is there any other mistake done by me?

    Read more →

    Last Activity 4 hours 16 min ago by DhavalP
  • 1 answer
    246 views

    hanging register test

    Hi All,

    I am new in using UVM registers model. I am trying to integrate my model in the environment. I think I did this as it is described in the cookbook.
    And here is my problem:
    I tried to write and run simple test which just write one register and then read it. But the write_reg task doesn't complete at all. The write operation is done correctly, the registers inside the DUT are written and the driver's item_done() method is called, but it seems that the write_reg is waiting for something. My driver doesn't return response so the adapter's provides_responses is set to 0.
    I look at the UVMKIT libraries and noticed that in uvm_reg_map base class. There are these tasks do_bus_write/do_bus_read and they are waiting for bus_req.end_event.wait_on(). Here is where my test hangs it is waiting for bus_req.end_event.wait_on().

    But I don't know why this is not triggered. Does any of you have an idea why is that so and how to resolve the problem.

    Read more →

    Last Activity 7 hours 48 min ago by rancohen
  • 1 answer
    44 views

    How can implement reusable uvm_sequence_item based on agent's multiple configuration?

    Hi Everyone ,

    i have defined single agent(UVC) and declared 10 agent objects. The each agent object have separate configuration. Now how can i use each configuration to differentiate 10 uvm_sequence_item corresponding to 10 agents.

    example :

    axi_agent a0,a1,a2;

    data_bus width of a0 = 32 bit ;
    data_bus width of a1 = 64 bit ;
    data_bus width of a2 = 128 bit ;

    whenever i will run a0,a1,a2 agent parallel ,the squencer of agent must pick corresponding uvm_seq-> corresponding uvm_seq_item.

    How can i will get implement reusable agent , seq_item ?

    very advance thanks

    Regards
    kbkdec15

    Read more →

    Last Activity 9 hours 1 min ago by kbkdec15
  • 1 answer
    22 views

    DPI-C Mapping data types

    Currently working on verification IP for SPARC V8 using UVM

    I have developed a reference model in C it calculates the result and destination register address based on instruction send from SV which is 32-bit length. so, if I declare in SV as
    bit [31:0]inst;

    and used
    import "DPI-C" function void ref_model(input bit [31:0]inst,output bit [31:0]reg_data,output bit [4:0]reg_add);

    what should the corresponding data type in C, I have tried like this in C
    void ref_model(svBitVecVal* inst,svBitVecVal* reg_data,svBitVecVal* reg_add) // included svdpi.h
    {
    printf("inst=%s\n",inst);
    ....
    }

    when I tried to print inst in C some garbage gets printing also not getting outputs reg_data & reg_add.

    appreciate if any experts help me, thank you.

    Read more →

    Last Activity 21 hours 24 min ago by dave_59
  • 1 answer
    66 views

    Connecting the DUT and the Model to single driver ?

    Hey!

    Is it a good idea to share a single driver between the DUT and the Model ? The model is similar to the DUT at the pin level.
    If I create two instances of the drivers, there is no sync. Since the DUT's driver pops off a transaction with get method and its no longer there on the channel. When Model's driver asks for a transaction, it receives completely new test.

    As a fix, I am using the same driver. Driver instantiates the DUT and the model at the pin level and provides the test stimulus to the both at the same time.
    I am not sure if its a good practice though.

    So how to ensure that the DUT and the model receive the same test stimulus ?
    Would like to know the way its done out there.

    Thanks.

    Read more →

    Last Activity 1 day 13 hours ago by Wanglj
  • 1 answer
    42 views

    Return struct/string from C to SV

    I have a question

    1# I want to return a structure from c-model to the SV my structure is here
    In SV:

    typedef struct {
      string res_data;
      string res_add;
    }rfi;

    In C:

    typedef struct {
      char res_data[32];
      char res_add[32];
    }rfi;
    

    and imported in SV using
    import "DPI-C" function rfi ref_model(string inst);

    I'm getting an error says "unpacked struct can't be return type"
    So when I use
    In SV:
    typedef struct packed{
    string res_data;
    string res_add;
    }rfi;
    getting error:"string can't be in packed struct"

    2# How to return a string type to SV from C?
    i'm using::
    import "DPI-C" function string ref_model(string inst);
    string result;
    result=ref_model(inst);
    when I print result the simulator(VCS) gets terminating without printing the result...

    Read more →

    Last Activity 1 day 14 hours ago by dave_59
  • 1 answer
    39 views

    Reference model

    I have a question
    #Which high-level language is better/mostly used to model reference model, any reasons why many reference models are in C?

    appreciate if any experts help me, thank you.

    Read more →

    Last Activity 1 day 14 hours ago by dave_59
  • 1 answer
    43 views

    UVM Support in Veloce Solo Emulator

    Hi,

    I was wondering if Veloce Solo emulator from Mentor Graphics supports UVM testbench?

    The documentation suggested that Veloce Solo does support OVM but I couldn't find if UVM is supported.
    I guess TBX mode should be able to accommodate UVM testbench as long as the Driver is written as a Transactor and made sure to be synthesizable.

    Read more →

    Last Activity 1 day 15 hours ago by eburnsbrook
  • 1 answer
    43 views

    Should driver/sequencer class name be different from object name?

    Hi,

    I am facing a problem rekated to driver/sequencer class name.

    If i try to create an object with the same name as that of their class names, I am getting an error. For example:

    class ahbs_driver extends uvm_driver #(ahbs_transaction);
    endclass

    class ahbs_agent extends uvm_agent;
    `uvm_component_utils(ahbs_agent)
    ahbs_driver ahbs_driver;
    .....
    ahbs_driver=ahbs_driver::type_id::create("ahbs_driver",this);
    ....
    endclass

    Above is giving me an error:
    Error-[SV-EEM-SRE] Scope resolution error
    ahbs_agent.sv, 15
    test, "ahbs_driver::type_id::create"
    Target for scope resolution operator does not exist. Token 'ahbs_driver' is
    not a class/package. Originating module 'test'.
    Check that class or package exists with referred token as the name

    But if i change the name of the driver class to ahbs_driver1, the error goes off.

    Read more →

    Last Activity 1 day 22 hours ago by tfitz
  • 3 answers
    216 views

    Can we disconnect the already connected tlm ports and make a new connection ???

    Hi ,
    I want to disconnect tlm port connection which is established in parent class and make a new connection in child class.

    Thanks
    CB Singh

    Read more →

    Last Activity 1 day 22 hours ago by dave_59
  • 1 answer
    48 views

    Multi-threaded UVM Testbench

    Is UVM capable of creating a multi-threaded testbench. Here multi-core enabled multi-threading is not questioned.
    And if UVM is capable of such multithreading testbench creation then in what manner? Confused about multi-threading and UVM in the same frame.

    Read more →

    Last Activity 1 day 22 hours ago by dave_59
  • 0 answers
    32 views

    set/get function - getting hierarchial issue while accessing it through sequence

    Hi,
    I am having reigster model and reference model. I have put the instance of register model in base test testcase .Pass the object in uvm_resource_db so that it could be used in basic sequence and reference model.

    // In uvm_base test case:
    uvm_sequence_spi uvm_seq_spi;
    spi_rm_register spi_rm_h;
    build_phase:
    spi_rm_h = sp_rm_register::type_id::create("spi_rm_h");
    uvm_resource_db #(spi_rm_register)::set("*", "spi_reg_model",spi_rm_h, null);

    run_phase :
    uvm_seq_spi = uvm_sequence_spi::type_id::create("uvm_seq_spi");

    // In base sequence
    class uvm_sequence_spi extends uvm_sequence;
    spi_rm spi_rm_h;

    //Under prebody task:
    if(!uvm_resource_db #(spi_rm_register)::read_by_name(get_full_name(), "spi_reg_model", spi_rm_h);

    //under some task
    bit [15:0] reg_value;
    task write_register
    reg_value = spi_rm_h.default_reg.SPI_MODE.get();
    endtask

    Read more →

    Last Activity 2 days 22 hours ago by cgales
  • 0 answers
    22 views

    Set/Get register value in register model- illegal location for a hierarchical name (in a package

    Hi,
    I am having reigster model and reference model. I have put the instance of register model in base test testcase .Pass the object in uvm_resource_db so that it could be used in basic sequence and reference model.

    // In uvm_base test case:
    uvm_sequence_spi uvm_seq_spi;
    spi_rm_register spi_rm_h;
    build_phase:
    spi_rm_h = sp_rm_register::type_id::create("spi_rm_h");
    uvm_resource_db #(spi_rm_register)::set("*", "spi_reg_model",spi_rm_h, null);

    run_phase :
    uvm_seq_spi = uvm_sequence_spi::type_id::create("uvm_seq_spi");

    // In base sequence
    class uvm_sequence_spi extends uvm_sequence;
    spi_rm spi_rm_h;

    //Under prebody task:
    if(!uvm_resource_db #(spi_rm_register)::read_by_name(get_full_name(), "spi_reg_model", spi_rm_h);

    Read more →

    4 days 10 hours ago - No activity yet
  • 1 solution
    4,904 views

    Parameterized Classes

    Hi all,

    I am in the middle of writing a parametrized class, and I hit a road block. Is there a way I can overwrite a parameter in the type_id::create call?

    For example, can I do something similar to this?

    Class A #(int j=10)
    ....
    endclass

    Class B
    A m_a;
    int mode;
    ....
    function void build();
    case(mode)
    0: m_a = A#(7)::type_id::create(...);
    1: m_a = A#(2)::type_id::create(...);
    2: m_a = A#(11)::type_id::create(...);
    default: m_a = A#(4)::type_id::create(...);
    endcase
    endfunction
    endclass

    Any comment is greatly appreciated!

    Thanks,
    Billy

    Read more →

    Last Activity 4 days 18 hours ago by aming
  • 1 answer
    62 views

    Phase objection

    Hi,

    I want to know from where i need to raise an objection.

    I initially put raise/drop objection in the sequence and i found that to be working.
    I found few examples where people have raised/dropped objection in testcase.

    I tried to do the same, but my testcase ended without even randomizing the set of sequence items.

    Please explain.

    Thanks

    Read more →

    Last Activity 4 days 20 hours ago by Debjit
  • 2 answers
    62 views

    Failing to connect analysis port.

    Hi, I am failing to connect an analysis port of sequencer with monitor.

    I've an agent with following member:

    my_sequencer sequencer

    my_sequencer has an analysis port implemented with uvm_analysis_imp_decl

    From my environment, I am trying to connect the analysis port of a monitor with the port declared in my sequencer.

    my_agent.my_monitor.transaction_port.connect(my_agent2.sequencer.rec_port)

    I get a message that "sequencer" is not a class item.

    Read more →

    Last Activity 5 days 5 hours ago by yaohe
  • 1 answer
    68 views

    What is the recommended way to implement coverage driven verification in UVM (connection between coverage and sequence)?

    Hi,

    When implementing coverage driven verification, how should a sequence get information on one or several covergroups instantiated at different places in the testbench (in objects derived from uvm_subscriber for instance, or from an interface) ?

    We can use hierarchical reference from the test environment to the object where the covergroup is instantiated but, for a better reuse, is there a way to pass a reference to a covergroup through the config DB from the object it is instantianted in and get this reference in the sequence ? or something equivalent ?

    Thank you for your help

    Norbert

    Read more →

    Last Activity 5 days 5 hours ago by Wanglj