首页 > 微波/射频 > RFIC设计学习交流 > hspice 行为级DAC求助

hspice 行为级DAC求助

录入:edatop.com    阅读:

本人从未学过HSPICE,而毕设就是关于这个的,希望大家能帮帮忙,谢谢。我根据资料,组装了一段代码(见笑了)

  1. .subckt DAC8bit VDD VREFP VREFM Vout B7 B6 B5 B4 B3 B2 B1 B0

  2. *Generate Logic switching point,or trip,voltage
  3. R1 VDD trip 100MEG
  4. R2 trip 0 100MEG

  5. *Change input logic signals into logic 0s or 1s
  6. X7 trip B7 B7L Bitlogic
  7. X6 trip B6 B6L Bitlogic
  8. X5 trip B5 B5L Bitlogic
  9. X4 trip B4 B4L Bitlogic
  10. X3 trip B3 B3L Bitlogic
  11. X2 trip B2 B2L Bitlogic
  12. X1 trip B1 B1L Bitlogic
  13. X0 trip B0 B0L Bitlogic

  14. *Nonlinear dependent source,B,for generating the DAC output
  15. 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))+
  16. +v(VREFM)

  17. .ends

  18. .subckt Bitlogic trip BX BXL
  19. Vone one 0 DC 1
  20. SH one BXL BX trip Switmod
  21. SL 0 BXL trip BX Switmod
  22. .model switmod SW
  23. .ends

  24. ***main body*********
  25. VDD VDD 0 DC 1.5
  26. VREFP VREFP 0 DC 1.5
  27. VREFM VREFM 0 DC 0.0

  28. VB7 B7 0 DC 0 pulse (1.5 0 0 200p 200p 1279.8n 2560n)
  29. VB6 B6 0 DC 0 pulse (1.5 0 0 200p 200p 639.8n 1280n)
  30. VB5 B5 0 DC 0 pulse (1.5 0 0 200p 200p 319.8n 640n)
  31. VB4 B4 0 DC 0 pulse (1.5 0 0 200p 200p 159.8n 320n)
  32. VB3 B3 0 DC 0 pulse (1.5 0 0 200p 200p 79.8n 160n)
  33. VB2 B2 0 DC 0 pulse (1.5 0 0 200p 200p 39.8n 80n)
  34. VB1 B1 0 DC 0 pulse (1.5 0 0 200p 200p 19.8n 40n)
  35. VB0 B0 0 DC 0 pulse (1.5 0 0 200p 200p 9.8n 20n)

  36. Xa1 VDD VREFP VREFM Vout B7 B6 B5 B4 B3 B2 B1 B0 DAC8bit

  37. .OPTION LIST NODE POST
  38. .OP
  39. .TRAN 100p 10u
  40. .PRINT TRAN  v(Vout)
  41. .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中如何给数组赋值

射频和天线工程师培训课程详情>>

  网站地图