The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 18th, 2024, 6:24am
Pages: 1
Send Topic Print
strange error when using Verilog-A blocks (Read 3460 times)
dxt78
Junior Member
**
Offline



Posts: 15
Ohio
strange error when using Verilog-A blocks
May 08th, 2011, 3:57pm
 
I'm getting a strange error when using two Verilog-A blocks (pic attached) together.  I test each block on their own and they work fine.  When I try to use them together though, I get this error:

"ERROR (CMI-2116): I3: Too few terminals given (3 < 4)"

The first block ("min_block") takes three voltages and finds the minimum.

The second block ("subtract_block") takes two voltages and outputs the difference.

My Verilog-A for the min_block is:

"`include "constants.vams"
`include "disciplines.vams"

module min_block(x, y, z, out);
     electrical x, y, z, out;

     analog begin : themodule
           real vx,vy,vz;
           real temp, temp2;
           vx = V(x);
           vy = V(y);
           vz = V(z);

           temp = min(vx,vy);
           temp2 = min(temp,vz);
           V(out) <+ temp2;
     end
endmodule"

And my code for the subtract_block is:

`include "constants.vams"
`include "disciplines.vams"

module min_block(x, y, difference);
     electrical x, y, difference;

     analog begin : themodule
           real vx,vy;
           real temp;
           vx = V(x);
           vy = V(y);

           temp = (vx - vy);
           V(difference) <+ temp;
     end
endmodule
Back to top
 

Capture.PNG
View Profile   IP Logged
dxt78
Junior Member
**
Offline



Posts: 15
Ohio
Re: strange error when using Verilog-A blocks
Reply #1 - May 8th, 2011, 4:13pm
 
Edit: ok sorry I actually found the problem.  I created the 2nd block, from the first, but forgot to change the module name!
Back to top
 

Capture2.PNG
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.