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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 10121|回复: 14

[求助] 急求有verilog-A编写

[复制链接]
发表于 2013-5-15 07:33:45 | 显示全部楼层 |阅读模式
50资产
基于Verilgo-A建模语言,对IR-UWB接收机系统进行建模。利用Verilog-A语言完成整个接收机系统的功能建模,包括低噪声放大器,可变增益放大器,平方器,积分判决输出模块以及相应的控制电路,以构建一个完成的接收机系统。

最佳答案

查看完整内容

rfLib 下的VGA_BB的veriloga你可以参考一下。。。。。 // VerilogA baseband behavioral model of a power amplifier. // Copyright (c) 1999 // by Cadence Design Systems, Inc. All rights reserved. // 11/14/99 //Engineering release only. No passband view. /* This is a baseband behavioral model of a variable gain amplifier. This model contains only third order non-linear amplitude effects (am/am c ...
发表于 2013-5-15 07:33:46 | 显示全部楼层
rfLib 下的VGA_BB的veriloga你可以参考一下。。。。。


//  VerilogA baseband behavioral model of a power amplifier.
//  Copyright (c) 1999
//  by Cadence Design Systems, Inc.  All rights reserved.

// 11/14/99

//Engineering release only. No passband view.

/* This is a baseband behavioral model of a variable gain
amplifier. This model contains only third order non-linear
amplitude effects (am/am conversion). It does not include
second order non-linear effects. The transfer curve saturates
beyond the point where the slope of the transfer curve
is zero. The form of the am/pm conversion is
output_phase_shift = alpha*(Vin/Vcp)^n/(1+beta*(Vin/Vcp)^n).
Vcp is the compression point in volts. alpha and beta are
computed to produce zero phase shift at Vin=0, a specified
phase shift at the 1db compression point, and a specified
phase shift at Vin->infinity. "n" is selected by the user
to control how sharply the onset of am/pm conversion occurs.

G_in*gpv is a voltage numerically equal to the voltage gain.
Thus, when the voltage at G_in is 1 volt, the voltage
gain is gpv volt/volt.
*/

/* PARAMETER DEFINITIONS:
======================
gpv         = voltage gain per volt on the G_in pin.
cpdb         = 1 db compression point, measured in dbm,
               referred to the output.
psinf         = Output phase shift as the input power goes to infinity.
pscp         = Output phase shift at the 1db compression point.
shp           = Determines how fast the phase shift occurs with increasing
          input power. A larger number delays the shift but makes
          the shift rise faster as a function of input signal level.
cw         = Determines the direction of the phase shift. The phase
             shift is only in one direction. +1 means counter-clockwise, -1
             means clockwise, and 0 means no phase shift (no am/pm conversion).
rin         = input resistance
rout         = output resistance
=====================
*/

`include "constants.h"
`include "discipline.h"

`define PI 3.1415926535897932384626433
module VGA_BB(G_in, I_in, I_out, Q_in, Q_out);
input G_in;
electrical G_in;
inout I_in;
electrical I_in;
inout I_out;
electrical I_out;
inout Q_in;
electrical Q_in;
inout Q_out;
electrical Q_out;

parameter real gpv = 1 from (0:inf);
parameter real cpdb = -30;
parameter real rin = 50 from (0:inf);
parameter real rout = 50 from (0:inf);
parameter real pscp = 0.7 from (0:inf);
parameter real psinf = 2 from (pscp:inf);
parameter real shp = 2 from [0:inf);
parameter integer cw = 0 from [-1:1];
parameter real nf = 0;

real a;
real b;
real cmp;
real rho;
real rhooutmax;
real rhoinmax;
real rhoout;
real theta;
real beta;
real tmp;
real rnf;
real noise_current;

analog begin

// The "initial" block converts the input parameters from engineering
// units to implementation units.
  @(initial_step("static") or initial_step("pss") or
        initial_step("pdisto")) begin
     beta = pscp/(psinf-pscp);
     rnf = pow(10,nf/10);      
  end

// Compute everything that depends on the linear gain.
  if (V(G_in)!=0) a = gpv*abs(V(G_in));
  else a = 1e-6;
  cmp = sqrt(pow(10,(cpdb+1)/10)*2*rout*0.001)/a;
  b = a*(0.108749)/(cmp*cmp);
  rhoinmax = sqrt(a/(3*b));
  rhooutmax = (2*a/3)*rhoinmax;
  noise_current = sqrt(8*(rnf-1)*1.380620e-23*$temperature/rin);



// Compute the input angle and radius.
  if (V(I_in) !=0) theta = atan2(V(Q_in),V(I_in));
  else if (V(Q_in) > 0) theta = `PI/2;
  else theta = -`PI/2;
  rho = hypot(V(I_in),V(Q_in));

// Apply the third order non-linearity. Clamp the
// output for extreme inputs.
  if (rho < rhoinmax ) rhoout = (a - b*rho*rho)*rho;
  else rhoout = rhooutmax;

// Rotate the output for am/pm conversion.
  tmp = pow(rho/cmp,shp);
  theta = theta + cw*(1+beta)*pscp*tmp/(1+beta*tmp);

  I(I_in) <+ V(I_in)/rin;
  I(Q_in) <+ V(Q_in)/rin;
  I(I_out) <+ (-2*rhoout*cos(theta) + V(I_out))/rout;
  I(Q_out) <+ (-2*rhoout*sin(theta) + V(Q_out))/rout;

// add the noise
  I(I_in) <+ white_noise(noise_current*noise_current, "VGA_BB_i");
  I(Q_in) <+ white_noise(noise_current*noise_current, "VGA_BB_q");

end
endmodule
发表于 2013-5-15 08:21:32 | 显示全部楼层
作业?还是毕设?
发表于 2013-5-15 09:01:20 | 显示全部楼层
悬赏好少啊,再乘1000还差不多
 楼主| 发表于 2013-5-15 09:40:46 | 显示全部楼层
回复 2# 天牛不唱歌

课程设计,我现在没那么多积分。我可以后面给充1000信元给你。您有代码呢?要能给,真是万分感谢
 楼主| 发表于 2013-5-15 09:48:01 | 显示全部楼层
回复 2# 天牛不唱歌
课程设计,这种语言新接触,自学的弄,一直没弄出来,被老师弄死了。大神要有代码,麻烦分享一下。若有效的,给你100元人民币做酬谢。有AGC的代码也行,给你冲1000信。反正,不管怎样,都要谢谢你
发表于 2013-5-15 13:44:40 | 显示全部楼层
回复 5# wenqingxin


    cadence里面有两个verilog-A库,里面有很多现成的模块,你去看看,可能有你需要的。
发表于 2013-5-15 22:15:47 | 显示全部楼层
直接能看到了,不错
 楼主| 发表于 2013-5-16 09:36:46 | 显示全部楼层
回复 7# 天牛不唱歌
大神,万分感谢谢你啊。你真是大好人啊,真是帮了大忙
 楼主| 发表于 2013-5-16 09:41:56 | 显示全部楼层
回复 6# zhanghao301
好,我这就去看看。真的很感谢你的指点。论坛里,大家都很乐于帮人啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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


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

GMT+8, 2024-11-23 16:49 , Processed in 0.020709 second(s), 7 queries , Gzip On, Redis On.

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