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
_______________________________________________
Commit-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnuradio