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

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜帖子
查看: 1946|回复: 3

[求助] 何乐年VerilogA全差分运放,关于输入信号幅值的一个仿真问题

[复制链接]
发表于 2023-6-14 17:43:52 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 TOPEEP108 于 2023-6-15 09:49 编辑


差分信号,单个输入信号幅度大于85mV,输出波形就出错。改过SR也没有作用。不知道是为什么?

                               
登录/注册后可看大图
85mV不正常波形

                               
登录/注册后可看大图
75mV正常波形

以下是所用代码:
`include "discipline.h"
`include "constants.h"
module diff_opamp(vout_p,vout_n,vref,vin_p,vin_n,vsupply_p,vsupply_n);
input vref,vsupply_p,vsupply_n;
inout vout_p,vout_n,vin_p,vin_n;
parameter real freq_unitygain=1e6;
parameter real gain=2;
parameter rin=1e6;
parameter real ibias=0;
parameter real rout=80;
parameter real  iin_max=100e-6;
parameter real  slew_rate=50e6;
parameter vin_offset=0;
parameter real vsoft=0;
real  gm_nom;
real  vmax_in;
real  vin_al,c1,r1;
electrical vout_p,vout_n,vref,vin_p,vin_n,vsupply_n,vsupply_p;
electrical cout_n,cout_p;
Analog begin
     @(initial_step or initial_step("dc"))begin
      c1=iin_max/(slew_rate);
      gm_nom=2*3.14*freq_unitygain*c1;
      r1=gain/gm_nom;
      vmax_in=iin_max/gm_nom;
      end
      vin_al=V(vin_p,vin_n)/2+vin_offset;
   //
   //input stage
   //
    I(vref,vin_n)<+ibias;
    I(vref,vin_p)<+ibias;
    I(vin_p,vin_n)<+(V(vin_p,vin_n)+vin_offset)/rin;
   //
   //GM stage with slew rating
   //
   I(cout_n,vref)<+ V(cout_n,vref)/100e6;
   I(cout_p,vref)<+ V(cout_p,vref)/100e6;
  if(vin_al>vmax_in)begin
     I(vref,cout_p)<+ iin_max;
     I(vref,cout_n)<+ -iin_max;
        end
     else if(vin_al<-vmax_in)begin
       I(vref,cout_p)<+ -iin_max;
       I(vref,cout_n)<+  iin_max;
         end
      else begin
          I(vref,cout_p)<+0.5*gm_nom*vin_al;
          I(vref,cout_n)<+ -0.5*gm_nom*vin_al;
           end
     //  
     //dominate pole
     //
    I(vref,cout_n)<+ c1*ddt(V(vref,cout_n));
    I(vref,cout_p)<+ c1*ddt(V(vref,cout_p));
    I(vref,cout_n)<+ V(vref,cout_n)/r1;
    I(vref,cout_p)<+ V(vref,cout_p)/r1;
    //
    //output stage
    //
    I(vref,vout_n)<+ V(cout_n,vref)/rout;
    I(vout_n,vref)<+ V(vout_n,vref)/rout;
    I(vref,vout_p)<+ V(cout_p,vref)/rout;
    I(vout_p,vref)<+ V(vout_p,vref)/rout;
    //
    //soft output limiting
    //
    if(V(vout_p)>(V(vsupply_p)-vsoft))
     I(cout_p,vref)<+gm_nom*(V(vout_p,vsupply_p)+vsoft);
      else if(V(vout_p)<(V(vsupply_n)+vsoft))
         I(cout_p,vref)<+gm_nom*(V(vout_p,vsupply_n)-vsoft);
    if(V(vout_n)>(V(vsupply_p)-vsoft))
     I(cout_n,vref)<+gm_nom*(V(vout_n,vsupply_p)+vsoft);
      else if(V(vout_n)<(V(vsupply_n)+vsoft))
         I(cout_n,vref)<+gm_nom*(V(vout_n,vsupply_n)-vsoft);
end
endmodule





发表于 2023-6-15 09:21:25 | 显示全部楼层
最近也在用veriloga建模全差分运放,顶一个
回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2023-6-15 09:47:27 | 显示全部楼层


   
洛神孤恋 发表于 2023-6-15 09:21
最近也在用veriloga建模全差分运放,顶一个


可以一起交流交流
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-6-15 09:58:27 | 显示全部楼层
问题解决了,就是Slew Rate不够大的问题,应该是前几次修改的还是不够大。Slew Rate会影响一个“vmax_in”的中间变量,导致输入幅值的限制
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

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

GMT+8, 2025-8-23 14:33 , Processed in 0.033266 second(s), 4 queries , Gzip On, Redis On.

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