commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r8820 - usrp2/trunk/fpga/sdr_lib


From: matt
Subject: [Commit-gnuradio] r8820 - usrp2/trunk/fpga/sdr_lib
Date: Mon, 7 Jul 2008 19:44:31 -0600 (MDT)

Author: matt
Date: 2008-07-07 19:44:30 -0600 (Mon, 07 Jul 2008)
New Revision: 8820

Modified:
   usrp2/trunk/fpga/sdr_lib/cic_strober.v
Log:
allow control of max strobe rate


Modified: usrp2/trunk/fpga/sdr_lib/cic_strober.v
===================================================================
--- usrp2/trunk/fpga/sdr_lib/cic_strober.v      2008-07-07 21:49:39 UTC (rev 
8819)
+++ usrp2/trunk/fpga/sdr_lib/cic_strober.v      2008-07-08 01:44:30 UTC (rev 
8820)
@@ -19,20 +19,21 @@
 //
 
 module cic_strober
-  ( input clock,
-    input reset,
-    input enable,
-    input [7:0] rate, // Rate should EQUAL to your desired divide ratio, no 
more -1 BS
-    input strobe_fast,
-    output wire strobe_slow );
+  #(parameter WIDTH=8)
+    ( input clock,
+      input reset,
+      input enable,
+      input [WIDTH-1:0] rate, // Rate should EQUAL to your desired divide 
ratio, no more -1 BS
+      input strobe_fast,
+      output wire strobe_slow );
    
-   reg [7:0] counter;
+   reg [WIDTH-1:0] counter;
    wire      now = (counter==1);
    assign    strobe_slow = now && enable && strobe_fast;
    
    always @(posedge clock)
      if(reset)
-       counter <= 8'd0; 
+       counter <= 0; 
      else if (~enable)
        counter <= rate;
      else if(strobe_fast)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]