首页 > 微波/射频 > RFIC设计学习交流 > VerilogA 代码 实现滞回比较器 求指导

VerilogA 代码 实现滞回比较器 求指导

录入:edatop.com    阅读:
这是我写的代码,目的功能是 实现5%迟滞区间的迟滞比较器 但是 现在仿真的结果出不来请高手指点下 问题出在哪里~O(∩_∩)O谢谢
`include "constants.vams"
`include "disciplines.vams"
module comp_over5percent(OUT, GND, VDD, Vneg, Vpos);
output OUT;
electrical OUT;
input GND;
electrical GND;
input VDD;
electrical VDD;
input Vneg;
electrical Vneg;
input Vpos;
electrical Vpos;
parameter real offset=0;
  real hyst ;
  real thrlo;
  real thrhi;
parameter real Out_high=5;
parameter real Out_low =0;
  integer X;
analog begin
  hyst=0.05*V(Vneg);
  thrlo=offset-0.5*hyst;
  thrhi=offset+0.5*hyst;
   @(initial_step("dc"))
     begin
        if (V(Vpos,Vneg)>=offset) X=1;
        else X=0;
     end
   @(cross(V(Vpos,Vneg)-thrhi,+1))
           X=1;
   @(cross(V(Vpos,Vneg)-thrlo,-1))
            X=0;
   V(OUT)<+transition(X?Out_high:Out_low,20p,10p);
end
endmodule

5%迟滞区间是什么意思?是什么的5%?



    参考电压的5%,比如说标准电压时1.25V,那么滞回区间的宽度就是1.25*5%。

申明:网友回复良莠不齐,仅供参考。如需专业解答,请学习本站推出的微波射频专业培训课程

上一篇:译码器,毛刺
下一篇:PFD 死区问题

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

  网站地图