commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r6537 - gnuradio/branches/developers/matt/u2f/models


From: matt
Subject: [Commit-gnuradio] r6537 - gnuradio/branches/developers/matt/u2f/models
Date: Tue, 25 Sep 2007 19:13:13 -0600 (MDT)

Author: matt
Date: 2007-09-25 19:13:12 -0600 (Tue, 25 Sep 2007)
New Revision: 6537

Modified:
   gnuradio/branches/developers/matt/u2f/models/adc_model.v
Log:
speedup


Modified: gnuradio/branches/developers/matt/u2f/models/adc_model.v
===================================================================
--- gnuradio/branches/developers/matt/u2f/models/adc_model.v    2007-09-25 
21:54:19 UTC (rev 6536)
+++ gnuradio/branches/developers/matt/u2f/models/adc_model.v    2007-09-26 
01:13:12 UTC (rev 6537)
@@ -28,13 +28,14 @@
    real freq = 330000/sample_rate;     // 330 kHz
    
    always @(posedge clk)
-     begin
-       adc_a_int <= 
$rtoi(math.round(math.sin(phase*math.MATH_2_PI)*(math.pow(2,13)-1))) ;
-       adc_b_int <= 
$rtoi(math.round(math.cos(phase*math.MATH_2_PI)*(math.pow(2,13)-1))) ;
-       if(phase > 1)
-         phase <= phase + freq - 1;
-       else
-         phase <= phase + freq;
-     end
+     if(~adc_pdn_a & adc_oen_a)
+       begin
+         adc_a_int <= 
$rtoi(math.round(math.sin(phase*math.MATH_2_PI)*(math.pow(2,13)-1))) ;
+         adc_b_int <= 
$rtoi(math.round(math.cos(phase*math.MATH_2_PI)*(math.pow(2,13)-1))) ;
+         if(phase > 1)
+           phase <= phase + freq - 1;
+         else
+           phase <= phase + freq;
+       end
    
 endmodule // adc_model





reply via email to

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