Aug 20

Pluse Expander 脉冲扩展 不指定

RickySu , 11:36 , 技术经验 , 评论(1) , 引用(0) , 阅读(1250) , Via 本站原创 | |
利用SRL16,将一个时钟长度的脉冲扩展到16个时钟长度。

点击在新窗口中浏览此图片

点击在新窗口中浏览此图片



引用
module pluse_expand(pluse, clk, dout);
   input pluse;
   input clk;
   output dout;
   
wire srl_out;

SRL16 #(
  .INIT(16'h0000) // Initial Value of Shift Register
     ) SRL16_inst (
  .Q(srl_out), // SRL data output
  .A0(1'b1), // Select[0] input
  .A1(1'b1), // Select[1] input
  .A2(1'b1), // Select[2] input
  .A3(1'b1), // Select[3] input
  .CLK(clk), // Clock input
  .D(pluse) // SRL data input
  );
 
FDRE #(
  .INIT(1'b0) // Initial value of register (1'b0 or 1'b1)
     ) FDRSE_inst (
  .Q(dout), // Data output
  .C(clk), // Clock input
  .CE(pluse), // Clock enable input
  .D(pluse), // Data input
  .R(srl_out) // Synchronous reset input
//   .S(1'b0) // Synchronous set input
  );

endmodule
Tags: , ,
lubee Email
2007/08/26 22:51
Ricky brother, 你好,一直关注你的blog呢,呵呵!
        此电路有创意,依靠srl实现计数,可以通过设置SRL的A0-A3来实现任意脉宽的输出。但有个问题,当两个输入pluse靠的比较近的时候,且前一个pulse比较宽的时候,由于仍有高电平随着SRL的输出移出,所以仍使后端的FF清零。所以影响后面的脉宽。我用的测试向量:
   initial begin
    // Initialize Inputs
    pluse = 0;
    // Wait 100 ns for global reset to finish
    #105;
    // Add stimulus here
               pluse = 1;
    #80
    pluse = 0;
    #100
    pluse = 1;
    #190
    pluse = 0;
个人认为,还是SRL的计数的问题,不能当机立断,当pulse持续时间较长时,SRL有高电平的”拖尾“。还是用计数器,比较可靠。个人看法,听听你的看法。
RickySu 回复于 2007/08/27 21:13
的确是个问题,使用的时候应该注意的:
输入信号的脉宽宽度是多少,频率是多少。
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]