The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Simulators >> Circuit Simulators >> Write a macro in spectre https://designers-guide.org/forum/YaBB.pl?num=1188726802 Message started by ywguo on Sep 2nd, 2007, 2:53am |
Title: Write a macro in spectre Post by ywguo on Sep 2nd, 2007, 2:53am Hi guys, I wrote a CMFB macro in HSPICE language shown below. May I write it in spectre language? I don't know how to describe the E1 and E2 in spectre language. Sure it is better if there is any component in analogLib which has the function of E1 and E2. Any comments are appreciated. .SUBCKT CMFB CBIAS CMC CMO VON VOP R1 CMC CMO1 200E3 R0 CMO2 CMC 200E3 V1 CMO 0 0.935 E1 CMO1 0 VOL='V(cbias)-(V(cmo)-V(VOP))' max=1.8 min=0 E2 CMO2 0 VOL='V(cbias)-(V(cmo)-V(VON))' max=1.8 min=0 C2 VON CMC 200E-15 C0 VOP CMC 200E-15 .ENDS Best regards, Yawei |
Title: Re: Write a macro in spectre Post by Ken Kundert on Sep 2nd, 2007, 2:22pm What's it do? In particular, what do E1 and E2 do? -Ken |
Title: Re: Write a macro in spectre Post by ywguo on Sep 2nd, 2007, 8:05pm Hi Ken, Sorry that I didn't explain clearly. It's a CMFB macro written in SPICE language, which was a replacement when I simulated frequency response of an OTA with SC-CMFB. E1 and E2 are voltage controlled voltage sources. Their values are determined by VOL='expression'. Node VOP and VON are the positive and negative output of a differential OTA. Node CMO is the desired common mode output voltage. Voltage of node CBIAS are generated from a bias circuit. Node CMC is to tune the tail current of an OTA. Now I want to simualte using spectre. So I need draw the macro in Virtuoso Schematic Composer or write the macro in spectre language. Thanks Yawei |
Title: Re: Write a macro in spectre Post by byang on Sep 2nd, 2007, 10:53pm Hi, Yawei, You can try Spectre bsource. Baolin Yang http://www.gemini-da.com |
Title: Re: Write a macro in spectre Post by ywguo on Sep 11th, 2007, 11:21pm Hi Baolin, Thank you. I looked at the spectre online help using command spectre -h bsource. It describes a voltage controlled voltage source like the following. vcvs1 (n3 n4) bsource v=gain*v(n1,n2), or vcvs2 (n3 n4) bsource v=v(n1,n2)-v(n5,n6) It is similar as the voltage controlled voltage source in SPICE. However, I have one more question. Do I have to write the vcvs in a spectre netlist manually? I try to instantiate a bvs from analogLib, but bvs has NOT spectre view. There are auCdl, hspiceD, hspieceS, and symbol views. I don't understand why there is not a spectre view. :( Best regards, Yawei |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |