• 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. Verilog-A module instantiating

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 66
  • Views 22024
  • 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

Verilog-A module instantiating

Jacob Bao
Jacob Bao over 11 years ago

Dear all,

I'm modifying my original Verilog-A module M1 and it has Verilog-A and schematic views with corresponding input/outout ports.

Now I'm trying to add an another module M2 into M1.

So I add the M2's Verilog-A code above M1's which is like below.

 =================================================

`include "disciplines.vams"

module M2(a,b);

...

endmodule

 

module M1(aa,bb,...);

...

M2 G1(a,b);

...

endmodule

=============================================== 

 

 

Error messages: 

 ==============================================

Error found by spectre during AHDL read-in.

ERROR (VACOMP-2259): "M2<<--? G1(a,b);"

"/home/..../variloga.va", line 97: syntax error

  ==============================================

I did my best to check the systax rules.

What's wrong with this? 

 

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

    I just used this and it worked fine:

    `include "disciplines.vams"

    module hierLower(a,b,f);
    inout a,b,f;
    electrical a,b,f;
    parameter real r=1k;

    analog begin
    //  if ($port_connected(f)) begin
    //    $strobe("f is connected\n");
    //  end
      V(a,b)<+I(a,b)*r;
    end

    endmodule


    `include "disciplines.vams"

    module hierUpper(c,d);

    input c,d;
    electrical c,d;

    //hierLower R1(.a(c),.b(e),.f(n));
    hierLower R1(.a(c),.b(e));
    hierLower R2(.a(e),.b(d));

    endmodule

    So my guess is that the syntax error is probably in something before the line it mentions, in the part you omitted from your post. Maybe a missing semi-colon?

    Andrew.

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

    I just used this and it worked fine:

    `include "disciplines.vams"

    module hierLower(a,b,f);
    inout a,b,f;
    electrical a,b,f;
    parameter real r=1k;

    analog begin
    //  if ($port_connected(f)) begin
    //    $strobe("f is connected\n");
    //  end
      V(a,b)<+I(a,b)*r;
    end

    endmodule


    `include "disciplines.vams"

    module hierUpper(c,d);

    input c,d;
    electrical c,d;

    //hierLower R1(.a(c),.b(e),.f(n));
    hierLower R1(.a(c),.b(e));
    hierLower R2(.a(e),.b(d));

    endmodule

    So my guess is that the syntax error is probably in something before the line it mentions, in the part you omitted from your post. Maybe a missing semi-colon?

    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