The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 16th, 2024, 3:46pm
Pages: 1
Send Topic Print
Write a macro in spectre (Read 5946 times)
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
Write a macro in spectre
Sep 02nd, 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
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: Write a macro in spectre
Reply #1 - Sep 2nd, 2007, 2:22pm
 
What's it do? In particular, what do E1 and E2 do?

-Ken
Back to top
 
 
View Profile WWW   IP Logged
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
Re: Write a macro in spectre
Reply #2 - 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
Back to top
 
« Last Edit: Sep 2nd, 2007, 11:25pm by ywguo »  
View Profile   IP Logged
byang
Community Member
***
Offline



Posts: 46

Re: Write a macro in spectre
Reply #3 - Sep 2nd, 2007, 10:53pm
 
Hi, Yawei,

You can try Spectre bsource.

Baolin Yang
http://www.gemini-da.com
Back to top
 
 
View Profile   IP Logged
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
Re: Write a macro in spectre
Reply #4 - 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. Sad


Best regards,
Yawei
Back to top
 
 
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.