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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2093|回复: 0

[求助] 这个ip核看着简单 oserdes 并转串 仿真失败

[复制链接]
发表于 2017-6-16 10:45:25 | 显示全部楼层 |阅读模式

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

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

x
捕获.PNG

失败.PNG
阿房宫.PNG

clk_div_out是有波形的,但是那些差分信号都没有波形。会不会是clk_in与clk_div_out之间的同步有问题。有做过的吗?给提供个思路吧,实在是没有办法了,看着挺简单的啊。不要只是看,给个回复,给个思路。。
程序:简单的屁滚尿流
module Serdes_Test(
  input clk_50m,//全局时钟
  input rstn, //复位
  input clk_reset,
  input io_reset,

  
  output clk_out_to_pin_p,         //lvds时钟输出P
  output clk_out_to_pin_n,
  output data_out_to_pin_p,        //lvds输出数据P
  output data_out_to_pin_n         //lvds输出数据N  
    );


wire clk_div_out_1;      //低速时钟1,串行发送时钟的8分频
wire clk_div_out_2;      //低速时钟2,串行接收时钟的8分频



//产生LVDS发送的测试数据,0~FF
reg [7:0] dataout=8'h0;
always @(posedge clk_div_out_2) begin
//always @(posedge clk_50m) begin
   if (~rstn)
     dataout <= 0;
   else if (dataout == 8'hff)
     dataout <= 0;
    else
     dataout <= dataout + 1'b1;   
//     dataout<=8'h9e;
end


         
//并转串,8位数据dataout转换成串行数据,并通过lvds差分信号输出
wire[7:0] dataout_w;
assign dataout_w=dataout;
p_to_s p_to_s_inst
   (
  // From the device out to the system
    .data_out_from_device(dataout_w), //Input pins
    .data_out_to_pins_p(data_out_to_pin_p), //Output pins
    .data_out_to_pins_n(data_out_to_pin_n), //Output pins
    .clk_to_pins_p(clk_out_to_pin_p), //Output pins
    .clk_to_pins_n(clk_out_to_pin_n), //Output pins

    .clk_in(clk_50m_1),        // Single ended clock from IOB
    .clk_div_out(clk_div_out_1),   // Slow clock output
    .clk_reset(clk_reset),
    .io_reset(io_reset)  //system reset
);
;
BUFG U1_BUFG(
.O(clk_div_out_2),
.I(clk_div_out_1)
);

//wire clk_50m_1;
IBUF IBUF_inst (
.O(clk_50m_1), // 1-bit output: Buffer output
.I(clk_50m)  // 1-bit input: Buffer input
);
                        
endmodule
激励:
module sim(
  input clk_50m,//全局时钟
  input rstn, //复位
  input clk_reset,
  input io_reset,

  
  output clk_out_to_pin_p,         //lvds时钟输出P
  output clk_out_to_pin_n,   
  output data_out_to_pin_p,        //lvds输出数据P
  output data_out_to_pin_n         //lvds输出数据N  
    );
   
Serdes_Test U1(
    .clk_50m(clk_50m),
    .rstn(rstn)
   
);

reg clk_reset_reg;
reg io_reset_reg;
reg rst_n_reg;
reg clk_50m_reg;
assign rstn=rst_n_reg;
assign clk_50m=clk_50m_reg;
assign clk_reset=clk_reset_reg;
assign io_reset=io_reset_reg;
initial
  begin
  rst_n_reg=1'b1; #80 rst_n_reg=1'b0; #40 rst_n_reg=1'b1;
//  clk_50m_reg=1'b1; forever #4 clk_50m_reg=~clk_50m_reg;
  end
initial
  begin
  clk_50m_reg=1'b1; forever #4 clk_50m_reg=~clk_50m_reg;
  end
  
initial
    begin
    clk_reset_reg=1'b1; #168 clk_reset_reg=1'b0;
    end   
   
initial
  begin
  io_reset_reg=1'b1;#296 io_reset_reg=1'b0;
  end     
endmodule
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

X

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

GMT+8, 2025-7-5 18:42 , Processed in 0.013984 second(s), 8 queries , Gzip On, MemCached On.

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