• 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. Mixed-Signal Design
  3. include function file in verilog-AMS

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 64
  • Views 16418
  • 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

include function file in verilog-AMS

Narasimhan90
Narasimhan90 over 9 years ago

In a library I have a few cells for which I have created verilogams views. I am performing similar functions in the various verilogams files. So I included all those functions in a separate file. Here is a snapshot of the file wreal_func.txt (this is just an example to explain what I want exactly)

/////// file start

function real mult;
  input real a,b;
  mult = a*b;
endfunction

function real divi;
  input real a,b;
  divi = a/b;
endfunction

/////// file end

Now in my modules I have used these functions(like for example  assign z=divi(x,y);  )

If I include the file in each module like

module example();

`include "/somepath/wreal_func.txt"
//some code

endmodule

then it works properly.

Is there a way to include this file globally during simulation(like an ADE option) so that I need not include it in each and every module. That too I need to include the file inside each module. If I define it outside a module(similar to constants.vams) it again throws a syntax error.

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Not entirely. There is the vmsTemplateScript capability as described in solution 11457788. However, if you use create cellView from cellView to create the view and use this approach, you don't get the pins - so this is not really a complete solution (there's a CCR for this limitation).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Not entirely. There is the vmsTemplateScript capability as described in solution 11457788. However, if you use create cellView from cellView to create the view and use this approach, you don't get the pins - so this is not really a complete solution (there's a CCR for this limitation).

    Regards,

    Andrew.

    • 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