Hspice call verilogA 理想dac 失败
录入:edatop.com 阅读:
Hspice call verilogA 理想dac 失败 ,
说
有voltage 没define ,
module ideal_dac(in,out);
input [0:dac_size-1] in;
output out;
voltage in,out; ==> error
parameter real dac_size = 7 from (1:inf); parameter vth = 2.5; parameter real trise = 0 from [0:inf); parameter real tfall = 0 from [0:inf); real code; integer pow2 [0:dac_size]; analog begin @(initial_step) for (i=0;i<=dac_size;i=i+1) pow2 = pow(2,i); code = 0; for (i=0;i<dac_size;i=i+1) code = code + (V(in) > vth) ? pow2 : 0; V(out) <+ transition(code/pow2[dac_size],0,trise,tfall); endendmodule
and modify
但是 把输出入改 electrical 一样有问题
Error: Reference to undefined discipline 'electrical'.
还有某些版本 windows hspice 好像一跑veriloga 会当掉
I find the problem .
nature electrical 被定義在 disciplines.vams , 但是 disciplines.vams 就算直接 include 也無法在 hspice2009 下使用 ,
不過 跑adc.va examples 在 hspice 2009 work , 但是會再 hspice 2013 crash ..
再試過一些方式 發現了 .
1. hspice win 2009 can not use voltage electrical . but in hspice 2013 use electrical is work,
voltage not work .
but simulation very slow ? crash again ? 怪怪的 ..
2. sometime hspice 2013 run include verilog-A will crash but hspice 2009 not .
如 dca.va bit define 相衝突下 hspice2013 直接 當掉 ..
申明:网友回复良莠不齐,仅供参考。如需专业解答,请学习本站推出的微波射频专业培训课程。