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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3919|回复: 1

CORDIC IP 核后仿结果

[复制链接]
发表于 2009-6-5 09:58:19 | 显示全部楼层 |阅读模式

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

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

x
最近在用Xilinx IP核实现CORDIC的仿真。 我用的仿真平台是ISE10.1 选择的芯片是Virtex-4 SX55T。下面是我的程序和测试程序:

module My_Arctan(

input clk,
input rst_n,
input [15:0] d_real,
input [15:0] d_imag,
input data_en,

output [15:0] phase_out,
output rdy
);


Arctan UArctan(
.clk(clk),
.x_in(d_real),
.y_in(d_imag),
.ce(data_en),
.phase_out(phase_out),
.rdy(rdy)
);

endmodule


///-----------------------test bench----

`timescale 1ns/1ps

module My_Arctan_tb;

//input
reg clk;
reg rst_n;
reg [15:0] d_real,d_imag;
reg data_en;


//output

wire [15:0] phase_out;
wire rdy;

//---Instantiate the Unit Under Test (UUT)
My_Arctan UUT(

        .clk(clk),
        .rst_n(rst_n),
        .d_real(d_real),
        .d_imag(d_imag),
        .data_en(data_en),
        ,phase_out(phase_out),
        .rdy(rdy)
);

//----clock
always #10 clk = ~clk;


initial begin
  clk = 0;
  rst_n = 0;
  d_imag = 0;
  d_real = 0;
  data_en = 0;

#200   rst_n = 1;

end

reg [2:0] cnt_8;
always @(posedge clk or negedge rst_n)
begin
     if(!rst_n)
        cnt_8 <= 3'd0;
     else
        cnt_8 <=cnt_8 +3'd1;
end


always @(posedge clk or negedge rst_n)
begin
      if(!rst_n)
        data_en<=1'b0;
      else if(cnt_8 == 3'd7)
        data_en<=1'b1;
     else
        data_en<=1'b0;
end

always @(posedge clk or negedge rst_n)
begin
      if(!rst_n)
      begin
          d_real<=16'd0;
          d_imag<=16'd0;
      end
      else if(cnt_8 ==3'd7)
      begin
         d_real<=$random%32768;
         d_imag<=$random%32768;
      end
      else
      begin
         d_real<=d_real;
         d_imag<=d_imag;  
      end
end

endmodule


////////////////////////////////////////////////////////////

这个模块前仿没有问题,结果是正确的。但是后仿时,Modelsim 就报错了,错误信息如下:

#**Error:C:/Modeltech_6.2b/Xilinx/Simprims_ver/Simprims_ver_source.v[17637]setup(negedge CE &&& (ce_clk_enable1 == 1):864125 ps, posedge CLK: 864420 ps , 440 ps);
#   TimeL864420 ps Iteration:0 instance :/My_Arctan_tb/UUT/\UArctan/BU740\
......

上述错误一直出现。信号phase_out是X态。

哪位大侠做过这方面的设计,能否帮小弟解决一下。不胜感激。
发表于 2014-1-23 10:11:23 | 显示全部楼层
赞一个~~~~~~~~~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-5-27 06:35 , Processed in 0.028519 second(s), 10 queries , Gzip On, Redis On.

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