Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

Transistor SPICE model for Multisim

Hi, I'm currently doing a project involving SPICE simulation and I have a couple of problems with it. I'm generating a SPICE circuit file(.cir) based on a configuration file with a program I created. I don't have any problems generating the SPICE circuit file it's when I try to simulate it that I run into problems. I'll show you an example of a circuit file :

MTran1 1 VDD VDD 0 CMOSP L=180N W=500N
MTran3 0 1 VDD 0 CMOSP L=180N W=500N
Vin VDD 0 DC 1.8

.MODEL CMOSP PMOS LEVEL=3 PHI=0.600000 TOX=2.1200E-08 XJ=0.200000U
+TPG=-1 VTO=-0.9056 DELTA=1.5200E+00 LD=2.2000E-08 KP=2.9352E-05
+UO=180.2 THETA=1.2480E-01 RSH=1.0470E+02 GAMMA=0.4863
+NSUB=1.8900E+16 NFS=3.46E+12 VMAX=3.7320E+05 ETA=1.6410E-01
+KAPPA=9.6940E+00 CGDO=5.3752E-11 CGSO=5.3752E-11
+CGBO=3.3650E-10 CJ=4.8447E-04 MJ=0.5027 CJSW=1.6457E-10
+MJSW=0.217168 PB=0.850000

The model is one I took on the Internet since I will have the real simulation model later on during the project.

When I run this file with Multisim, it generates a visual format of the circuit but they replace the transistor formats I've given by others in Multisim. Here's what it writes :

Importing SPICE netlist
File name: C:\Users\Personnel\Desktop\formatSPICE\formatSPICE \test.cir
- Component 'CMOSP' imported as 'MOS_4TEN_VIRTUAL' (RefDes MTran3)
- Component 'CMOSP' imported as 'MOS_4TEN_VIRTUAL' (RefDes MTran1)

I tried creating a new component using the component wizard and naming the component "CMOSP" but they keep changing the transistors I want to 'MOS_4TEN_VIRTUAL'. I don't know if this problem ever occured to anyone (hope I'm not the only one) but I'm kinda new with this stuff and I need to be able to generate the right kind of transistors if I want my simulation datas to be as accurate as possible. Thanks !
0 Kudos
Message 1 of 10
(9,869 Views)

Hi,

 

It's hard to say what's wrong with your circuit without looking at it, if you can please post it.  I copied you nestling and ran it in Multisim and I didn't get any error message, the circuit is attached.  Double click on the 'Arbitrary SPICE block' and you'll see the netlist.  I am using the Transient analysis to look at node 1.

 

 

Message Edited by Tien P on 07-17-2009 10:11 AM
Tien P.

National Instruments
0 Kudos
Message 2 of 10
(9,863 Views)
OK, here's what I'm doing, I have a circuit file (.cir) that I open in Multisim using the "Open file" option and it changes all of my transistors by some in the Master Database.  I'm gonna put in attachment my .cir file and the resulting Multisim file.  I don't know how you did to have an Arbitrary SPICE block...but if it works that way it would be nice to explain me how to do it.  Thanks !
Download All
0 Kudos
Message 3 of 10
(9,857 Views)

When importing a SPICE netlist file (.cir), Multisim automatically substitutes circuit elements that specify model parameters with virtual components.  To use the model specified in your netlist, you will need to create the MOSFET in a User/Corportate database (which it sounds like you have already done) and replace the virtual MOSFET in the circuit.  To do this, right-click on the virtual MOSFET and choose Replace Components..., selecting the CMOSP that you created.

 

Note: The substitution only occurs when importing netlists, so you will only need to do this the first time you import the netlist into Multisim.

 

Once you replace the virtual MOSFET in the imported netlist, you should see the correct results and begin saving as a Multisim circuit file.

Message Edited by NatashaB on 07-17-2009 10:24 AM

Natasha Baker
R&D Engineer
National Instruments

Join the NI Circuit Design Community
Follow Multisim on Twitter!
0 Kudos
Message 4 of 10
(9,855 Views)
I already tried using the "Replace Component" option, it works as you said, I import, I replace the components and after that I can save my file and don't have to replace anymore.  The problem with it is that I will have a different file to import almost everytime, so I'll have to replace EVERY component each time.  It wouldn't be so bad if all my files were like the test files but when my project will be over I'll have hundreds of transistors...replacing al of them each time I have a new circuit file is kinda redundant and a loss of time.  Thanks for your replies...hope we'll find a good solution soon.
0 Kudos
Message 5 of 10
(9,849 Views)

If you are not interested in creating a schematic, Tien's suggestion to use the Arbitrary SPICE Block is probably best since it will allow you to simply paste in your netlists for quick simulations.


Natasha Baker
R&D Engineer
National Instruments

Join the NI Circuit Design Community
Follow Multisim on Twitter!
0 Kudos
Message 6 of 10
(9,848 Views)

Well the schematic is always good if I want to see my components but indeed as long as I can test my circuit I don't really need to see it.  I will try the SPICE Block then.  Just one question : How does it work ?...I only have to create a SPICE Block, copy my netlist and I can simulate my whole circuit only with this block ? 

 

Thanks

0 Kudos
Message 7 of 10
(9,842 Views)

Yes, the same way a regular circuit would work except that you won't be able to see the nets/components in schematic form.

 

Also, one more tip: you can multi-select when replacing components, so this might speed up the process if all MOSFETs use the same model.  In the meantime, I will enter a feature request to see if we can modify the import of netlists to allow for direct import of components (instead of replacing with virtual components).  Thanks for the input.


Natasha Baker
R&D Engineer
National Instruments

Join the NI Circuit Design Community
Follow Multisim on Twitter!
0 Kudos
Message 8 of 10
(9,836 Views)

A third option would be to use the Multisim Automation API (if you have either the Education or Power Pro version and at least Multisim 10).

 

With the API, you could write a program that would simulate your netlist directly, without having to do any copy and paste or any replacing of components. The function you would be looking for is DoCommandLine and you would need to specify Multisim's special Nutmeg commands.

 

This is complex, but once you get it running, it would be possible to do millions of transistors with no additional work.

 

There is a basic example in the Multisim User Guide in 10.1 (is also applies to 10.0), that would get you started, but it doesn't explain the Nutmeg commands that you would need to use. If this helps, let me know, and I can give some more details on how you would control the simulator in this case.

 

 

 

 

Garret
Senior Software Developer
National Instruments
Circuit Design Community and Blog

If someone helped you, let them know. Mark as solved or give a kudo. 🙂
0 Kudos
Message 9 of 10
(9,808 Views)
Wow, thanks for your help 🙂 I'll see what I can do with what you told me.  For now though it's the week end so I'm off but I'll contact you next week if I want further informations on the API you talked about.  Thanks once again, have a nice week end !
0 Kudos
Message 10 of 10
(9,796 Views)