• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Parameterized UVM Environment Creation Issue.

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 66
  • Views 21350
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Parameterized UVM Environment Creation Issue.

Selvavinayak
Selvavinayak over 10 years ago

Hi all, 

  when we are trying to create Parameterized UVM environment, we are not able to pass parameter from top to bottom of the component.Please help Us to solve this Issue, Our Dummy Environment should be like below,

class driver (parameter DATAWIDTH)

bit[DATAWIDTH-1:0]data;

endclass:driver

class agent(parameter DATAWIDTH)

driver#(DATAWIDTH) driver_m;

class agent

class env();

  agent#() agent_m[];

function new();

  

endfunction

function build_phase();

  agent_m=new[3];

  agent_m[0]=agent#(32)::type_id::create("agent", this)

  agent_m[1]=agent#(64)::type_id::create("agent", this)

  agent_m[2]=agent#(128)::type_id::create("agent", this)

endfunction

endclass:env

we need to create agent with different parameters. we tried but, parameter value is not passing correctly some time we are facing fatal error.

Is any one have experience with this environment. please share the Information

Thanks,

selvavinayakam.na

  • Cancel
Parents
  • Selvavinayak
    Selvavinayak over 10 years ago

    Thanks for your response Tudor timi, now I checked with single agent flow like below, class driver (parameter DATAWIDTH=32)

    bit[DATAWIDTH-1:0]data;

    endclass:driver

    class agent(parameter DATAWIDTH=32)

    driver#(DATAWIDTH) driver_m; function build_phase();
    driver_m = driver#(DATAWIDTH)::type_id::create("driver", this); endfunction
    endclass agent

    class env();

    agent#(64) agent_m;

    function build_phase();

    agent_m=agent#(64)::type_id::create("agent", this)

    endfunction

    endclass:env when we Tried above setup we are getting below error, driver_m = driver#(DATAWIDTH)::type_id::create("driver", this);
    |
    ncelab: *E,TYCMPAT (agent.sv,15|58): assignment operator type check failed (expecting datatype compatible with 'class $unit::driver#(.DATAWIDTH(32))' but found 'class $unit::driver#(.DATAWIDTH(64))' instead).
    can you please share Information how to solve This Issue. thanks, selvavinayakam.na

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Selvavinayak
    Selvavinayak over 10 years ago

    Thanks for your response Tudor timi, now I checked with single agent flow like below, class driver (parameter DATAWIDTH=32)

    bit[DATAWIDTH-1:0]data;

    endclass:driver

    class agent(parameter DATAWIDTH=32)

    driver#(DATAWIDTH) driver_m; function build_phase();
    driver_m = driver#(DATAWIDTH)::type_id::create("driver", this); endfunction
    endclass agent

    class env();

    agent#(64) agent_m;

    function build_phase();

    agent_m=agent#(64)::type_id::create("agent", this)

    endfunction

    endclass:env when we Tried above setup we are getting below error, driver_m = driver#(DATAWIDTH)::type_id::create("driver", this);
    |
    ncelab: *E,TYCMPAT (agent.sv,15|58): assignment operator type check failed (expecting datatype compatible with 'class $unit::driver#(.DATAWIDTH(32))' but found 'class $unit::driver#(.DATAWIDTH(64))' instead).
    can you please share Information how to solve This Issue. thanks, selvavinayakam.na

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information