ssp_frame, ssp_din, ssp_dout, ssp_clk,\r
cross_hi, cross_lo,\r
dbg,\r
- xcorr_is_848, snoop\r
+ xcorr_is_848, snoop, xcorr_quarter_freq\r
);\r
input pck0, ck_1356meg, ck_1356megb;\r
output pwr_lo, pwr_hi, pwr_oe1, pwr_oe2, pwr_oe3, pwr_oe4;\r
output ssp_frame, ssp_din, ssp_clk;\r
input cross_hi, cross_lo;\r
output dbg;\r
- input xcorr_is_848, snoop;\r
+ input xcorr_is_848, snoop, xcorr_quarter_freq;\r
\r
// Carrier is steady on through this, unless we're snooping.\r
assign pwr_hi = ck_1356megb & (~snoop);\r
always @(posedge ck_1356meg)\r
fc_div_2 = ~fc_div_2;\r
\r
+reg fc_div_4;\r
+always @(posedge fc_div_2)\r
+ fc_div_4 = ~fc_div_4;\r
+\r
+reg fc_div_8;\r
+always @(posedge fc_div_4)\r
+ fc_div_8 = ~fc_div_8;\r
+\r
reg adc_clk;\r
\r
-always @(xcorr_is_848 or fc_div_2 or ck_1356meg)\r
- if(xcorr_is_848)\r
- // The subcarrier frequency is fc/16; we will sample at fc, so that \r
- // means the subcarrier is 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 ...\r
- adc_clk <= ck_1356meg;\r
+always @(xcorr_is_848 or xcorr_quarter_freq or ck_1356meg)\r
+ if(~xcorr_quarter_freq)\r
+ begin\r
+ if(xcorr_is_848)\r
+ // The subcarrier frequency is fc/16; we will sample at fc, so that \r
+ // means the subcarrier is 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 ...\r
+ adc_clk <= ck_1356meg;\r
+ else\r
+ // The subcarrier frequency is fc/32; we will sample at fc/2, and\r
+ // the subcarrier will look identical.\r
+ adc_clk <= fc_div_2;\r
+ end\r
else\r
- // The subcarrier frequency is fc/32; we will sample at fc/2, and\r
- // the subcarrier will look identical.\r
- adc_clk <= fc_div_2;\r
+ begin\r
+ if(xcorr_is_848)\r
+ // The subcarrier frequency is fc/64\r
+ adc_clk <= fc_div_4;\r
+ else\r
+ // The subcarrier frequency is fc/128\r
+ adc_clk <= fc_div_8;\r
+ end\r
\r
// When we're a reader, we just need to do the BPSK demod; but when we're an\r
// eavesdropper, we also need to pick out the commands sent by the reader,\r