hspice 行为级DAC求助
录入:edatop.com 阅读:
本人从未学过HSPICE,而毕设就是关于这个的,希望大家能帮帮忙,谢谢。我根据资料,组装了一段代码(见笑了)
- .subckt DAC8bit VDD VREFP VREFM Vout B7 B6 B5 B4 B3 B2 B1 B0
- *Generate Logic switching point,or trip,voltage
- R1 VDD trip 100MEG
- R2 trip 0 100MEG
- *Change input logic signals into logic 0s or 1s
- X7 trip B7 B7L Bitlogic
- X6 trip B6 B6L Bitlogic
- X5 trip B5 B5L Bitlogic
- X4 trip B4 B4L Bitlogic
- X3 trip B3 B3L Bitlogic
- X2 trip B2 B2L Bitlogic
- X1 trip B1 B1L Bitlogic
- X0 trip B0 B0L Bitlogic
- *Nonlinear dependent source,B,for generating the DAC output
- Bout Vout 0V=(v(VREFP) - v(VREFM))/256*(v(B7L)*128+v(B6L)*64+v(B5L)*32+v(B4L)+*16+v(B3L)*8+v(B2L)*4+v(B1L)*2+v(B0L))+
- +v(VREFM)
- .ends
- .subckt Bitlogic trip BX BXL
- Vone one 0 DC 1
- SH one BXL BX trip Switmod
- SL 0 BXL trip BX Switmod
- .model switmod SW
- .ends
- ***main body*********
- VDD VDD 0 DC 1.5
- VREFP VREFP 0 DC 1.5
- VREFM VREFM 0 DC 0.0
- VB7 B7 0 DC 0 pulse (1.5 0 0 200p 200p 1279.8n 2560n)
- VB6 B6 0 DC 0 pulse (1.5 0 0 200p 200p 639.8n 1280n)
- VB5 B5 0 DC 0 pulse (1.5 0 0 200p 200p 319.8n 640n)
- VB4 B4 0 DC 0 pulse (1.5 0 0 200p 200p 159.8n 320n)
- VB3 B3 0 DC 0 pulse (1.5 0 0 200p 200p 79.8n 160n)
- VB2 B2 0 DC 0 pulse (1.5 0 0 200p 200p 39.8n 80n)
- VB1 B1 0 DC 0 pulse (1.5 0 0 200p 200p 19.8n 40n)
- VB0 B0 0 DC 0 pulse (1.5 0 0 200p 200p 9.8n 20n)
- Xa1 VDD VREFP VREFM Vout B7 B6 B5 B4 B3 B2 B1 B0 DAC8bit
- .OPTION LIST NODE POST
- .OP
- .TRAN 100p 10u
- .PRINT TRAN v(Vout)
- .END
只知道各段是做什么的,组在一起我就茫然了。
下面是EDIT LL():
**warning** (c:\users\administrator\desktop\stimulation\8bit_spice.sp:20) symbol: - is ignored
.subckt dac8bit vdd vrefp vrefm vout b7 b6 b5 b4 b3 b2 b1 b0
*generate logic switching point,or trip,voltage
r1 vdd trip 100meg
r2 trip 0 100meg
*change input logic signals into logic 0s or 1s
x7 trip b7 b7l bitlogic
x6 trip b6 b6l bitlogic
x5 trip b5 b5l bitlogic
x4 trip b4 b4l bitlogic
x3 trip b3 b3l bitlogic
x2 trip b2 b2l bitlogic
x1 trip b1 b1l bitlogic
x0 trip b0 b0l bitlogic
*nonlinear dependent source,b,for generating the dac output
bout vout 0v=(v(vrefp) - v(vrefm))/256*(v(b7l)*128+v(b6l)*64+v(b5l)*32+v(b4l)+*16+v(b3l)*8+v(b2l)*4+v(b1l)*2+v(b0l))+
+v(vrefm)
**error** no required keywords
are found on IBIS buffer card
**error** (c:\users\administrator\desktop\stimulation\8bit_spice.sp:20) difficulty in reading input
点击Avanwaves时说no data in design.
初学者,未入门,求指教,谢谢大家。
求帮助,大神们,thanks
求助哇
warning解决了,还有几个error,求帮助
申明:网友回复良莠不齐,仅供参考。如需专业解答,请学习本站推出的微波射频专业培训课程。
上一篇:折叠运放的工艺角问题
下一篇:Verilog-A中如何给数组赋值