Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

VMM using Questa.6.6.

Hello Experts,

We are working on one project based on VMM methodology so to compile it we are using Questasim. But we are facing a problem to run it.

First it wasn't getting a path for VMM.

So I downloaded the vmm package(vmm-1.1.1a/ vmm-1.2.2b), set the environment to

--- Quote Start ---

setenv VMM_HOME /../../Desktop/vmm-1.1.1a/

--- Quote End ---

and compiled my program by using following command:

--- Quote Start ---

vlog -sv +incdir+$VMM_HOME/sv +incdir+$VMM_HOME/sv/std_lib/vmm_str_dpi.c +incdir+$VMM_HOME/sv/std_lib/vmm_xvc_dpi.c top_sv.sv

--- Quote End ---

Now it compiles the program successfully but gives error during simulation. The error is:

--- Quote Start ---

** Fatal: (vsim-3770) Failed to find user specified function 'vmm_str_match'. The search list was empty.# Using -sv_lib, -sv_root, and -sv_liblist arguments can provide a search list# FATAL ERROR while loading design# Error loading design

--- Quote End ---

for simulation we are using following command:

--- Quote Start ---

vsim -c top -do "run -all;quit"

--- Quote End ---

For compilation we also tried command given below:

--- Quote Start ---

vlog -sv +incdir+$VMM_HOME +incdir+/../../Desktop/program +define+vmm_NO_STR_DPI top_sv.sv

--- Quote End ---

But still it gives the same error.

we are using Questa.6.6.

Plz give me some idea to simulate it.

36 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Dave,

    I have got the solution of this issue. We can use typedef class for same.

    --- Quote Start ---

    example:(http://www.testbench.in/cl_19_typedef_class.html)

    typedef class X;

    class Y ;

    X x; // refers to Class X, which is not yet defined

    endclass

    class X;

    int i;

    endclass

    The typedef of class X allows the compiler to process Y before X is fully defined.

    --- Quote End ---

    :)

    dreku
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What you just described is called a forward typedef. It allow you to declare a class variable that will hold a handle to another class object that has not been defined yet.

    I don't see how that helps with your circular constructor argument issue though.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi dave,

    Yes you are right, it didn't help me. In any case, if it is necessary to pass any object member than i need to take another function in corresponding class.

    --- Quote Start ---

    class A;

    int x;

    function pass_new_variable(int x);

    this.x=x;

    endfunction

    endclass

    class B;

    int y;

    function pass_new_variable(int y);

    this.y=y;

    endfunction

    endclass

    program main;

    A a;

    B b;

    initial begin

    a=new();

    b=new();

    a.pass_new_variable(b.y);

    b.pass_new_variable(a.x);

    end

    endprogram

    --- Quote End ---

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Dave,

    How are you?

    I am here again with a basic query in systemverilog interface. I have a testbench, in TOP module of this tb there is a binding of instance of interface with instance of modport of same interface.

    --- Quote Start ---

    interface intf (input clock);

    modeport mport();

    endinterface

    module my_module (intf.mport mport);

    endmodule

    module top;

    intf interfc (clock);

    my_module abc (.mport(interfc)); <== modeport's instance is binding with same interface's instance.... :confused:

    endmodule

    --- Quote End ---

    I can't figure out why we need to pass interface this way. Is there any special reason or just a flexibility of code?

    waiting for your reply.

    Regards,

    Dreku

    --- Quote Start ---

    I don't think you'll find too many people using Questa on this forum.

    Have you filed a service request with Mentor?

    http://supportnet.mentor.com/

    Their support is really very good.

    Did you look to see where this function is defined in the VMM source?

    Cheers,

    Dave

    --- Quote End ---

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Different Dave here.

    There is nothing special about this code, but it is a bad programming practice to use the same identifier to represent two different things so close together. Normally people add a _mp extension to modport names.