The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Aug 14th, 2022, 3:45am
Pages: 1 2 
Send Topic Print
Using a SPICE subcircuit in Spectre (Read 57079 times)
boe
Community Fellow
*****
Offline



Posts: 615

Re: Using a SPICE subcircuit in Spectre
Reply #15 - Apr 05th, 2011, 8:28am
 
apprentice,

there should be an include statement for abc_model.scs in the input.scs.

B O E
Back to top
 
 
View Profile   IP Logged
apprentice
Community Member
***
Offline



Posts: 32

Re: Using a SPICE subcircuit in Spectre
Reply #16 - Apr 5th, 2011, 8:47am
 
Should I manually edit the input.scs to have the include statement?

I guess I missed one of the steps so that the include statement isn't able to be in the input.scs automatically.
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Using a SPICE subcircuit in Spectre
Reply #17 - Apr 5th, 2011, 11:19am
 
apprentice wrote on Apr 5th, 2011, 8:47am:
Should I manually edit the input.scs to have the include statement?
That should not be necessary. The netlister should automatically include all model files via include statement.

B O E

PS: Please note the forum guidelines: "Create your own topic. Do not jump into another person's topic. This only creates confusion and makes the board harder to search. Even if the problem seems similar to you, more often than not, the answer to your request will be something different from the original posters."
Back to top
 
 
View Profile   IP Logged
apprentice
Community Member
***
Offline



Posts: 32

Re: Using a SPICE subcircuit in Spectre
Reply #18 - Apr 13th, 2011, 10:04pm
 
I repeated the simulation and checked the input.scs which has the include statement.

include "/home/.../abc_model.scs"

However, I still find the same error.

Error found by spectre during circuit read-in.
   ERROR (SFE-23): "input.scs" 13: I1 is an instance of an undefined model abc_model.

anything to try?

thanks
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Using a SPICE subcircuit in Spectre
Reply #19 - Apr 14th, 2011, 3:51am
 
apprentice,

If you have a SPICE subcircuit, you need lang=spice somewhere at the beginning of your subcircuit. However, your netlist extract does not show this.

Is the include statement before or after the use of abc_model? Is the path correct?

B O E
Back to top
 
 
View Profile   IP Logged
apprentice
Community Member
***
Offline



Posts: 32

Re: Using a SPICE subcircuit in Spectre
Reply #20 - Apr 14th, 2011, 9:03am
 
B O E,

The first line of abc_model.scs is below.  
      simulator lang=spectre insensitive=yes

Path is correct.

don't quite understand the quoted question. A few lines of the input.scs are below.
"Is the include statement before or after the use of abc_model?"

input.scs
 // Generated for: spectre
// Generated on: Apr  4 22:06:27 2011
// Design library name: abc
// Design cell name: tb_abc
// Design view name: schematic
simulator lang=spectre
global 0
include "/home/../abc_model.scs
...


one question on CDF parameter
  name:  (shall it be exactly same as subckt name defined in netlist?)
In my case, the name should be "abc_model" instead of "model".



thanks
Back to top
 

CDF_parameter.png
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Using a SPICE subcircuit in Spectre
Reply #21 - Apr 14th, 2011, 12:20pm
 
apprentice,

I define all subcircuits before I use it. So, you should have the include statement first, and only later use the abc_model (i.e. create instances of it).

The line (reply #14)
I1 (in_p in_n out) abc_model
should use abc_model if it is known to the simulator.

I assume the parameter model should create an instance parameter "model (Model name)" that should be used for netlisting if you set all other parameters correctly.

This is a thread on how to use a SPICE model, so I am surprised that you have lang=spectre.

B O E

[Added:] NB: There are some differences in syntax between SPICE and Spectre, so it is important to define the language properly.
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Using a SPICE subcircuit in Spectre
Reply #22 - Apr 14th, 2011, 12:41pm
 
apprentice,

You seem to have a problem in the netlist. So please post your latest version so we can have a look at it

B O E
Back to top
 
 
View Profile   IP Logged
Pages: 1 2 
Send Topic Print
Copyright 2002-2022 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.