在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 6103|回复: 4

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

[复制链接]
发表于 2013-1-23 17:01:37 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
这是我写的代码,目的功能是 实现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
发表于 2013-1-23 21:02:11 | 显示全部楼层
5%迟滞区间是什么意思?是什么的5%?
 楼主| 发表于 2013-1-24 08:46:18 | 显示全部楼层
回复 2# bsaqycx


    参考电压的5%,比如说标准电压时1.25V,那么滞回区间的宽度就是1.25*5%。
发表于 2022-8-26 13:10:37 来自手机 | 显示全部楼层
楼主问题解决了吗
发表于 2024-8-5 14:20:04 | 显示全部楼层
kankan
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2025-3-11 01:23 , Processed in 0.020772 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表