Hspice call verilogA 理想dac 失败
时间:10-02
整理:3721RD
点击:
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 2013crash ..
再試過一些方式 發現了 .
1. hspice win 2009 can not use voltageelectrical. but in hspice 2013 use electrical is work,
voltage not work .
but simulation very slow? crash again?怪怪的 ..
2. sometime hspice 2013 runinclude verilog-A will crash but hspice 2009 not .
如 dca.va bit define 相衝突下hspice2013 直接 當掉 ..