]> git.zerfleddert.de Git - proxmark3-svn/blame - fpga/hi_sniffer.v
chg: too many \ slashes
[proxmark3-svn] / fpga / hi_sniffer.v
CommitLineData
1d0ccbe0 1module hi_sniffer(
2 pck0, ck_1356meg, ck_1356megb,
3 pwr_lo, pwr_hi, pwr_oe1, pwr_oe2, pwr_oe3, pwr_oe4,
4 adc_d, adc_clk,
5 ssp_frame, ssp_din, ssp_dout, ssp_clk,
6 cross_hi, cross_lo,
7 dbg,
8 xcorr_is_848, snoop, xcorr_quarter_freq // not used.
9);
10 input pck0, ck_1356meg, ck_1356megb;
11 output pwr_lo, pwr_hi, pwr_oe1, pwr_oe2, pwr_oe3, pwr_oe4;
12 input [7:0] adc_d;
13 output adc_clk;
14 input ssp_dout;
15 output ssp_frame, ssp_din, ssp_clk;
16 input cross_hi, cross_lo;
17 output dbg;
18 input xcorr_is_848, snoop, xcorr_quarter_freq; // not used.
19
20// We are only snooping, all off.
f5d2e7f7 21assign pwr_hi = 1'b0;
22assign pwr_lo = 1'b0;
1d0ccbe0 23assign pwr_oe1 = 1'b0;
24assign pwr_oe2 = 1'b0;
25assign pwr_oe3 = 1'b0;
26assign pwr_oe4 = 1'b0;
27
1d0ccbe0 28reg ssp_frame;
1d0ccbe0 29reg [7:0] adc_d_out = 8'd0;
f5d2e7f7 30reg [2:0] ssp_cnt = 3'd0;
1d0ccbe0 31
f5d2e7f7 32assign adc_clk = ck_1356meg;
33assign ssp_clk = ~ck_1356meg;
1d0ccbe0 34
f5d2e7f7 35always @(posedge ssp_clk)
1d0ccbe0 36begin
f5d2e7f7 37 if(ssp_cnt[2:0] == 3'd7)
38 ssp_cnt[2:0] <= 3'd0;
39 else
40 ssp_cnt <= ssp_cnt + 1;
1d0ccbe0 41
f5d2e7f7 42 if(ssp_cnt[2:0] == 3'b000) // set frame length
1d0ccbe0 43 begin
f5d2e7f7 44 adc_d_out[7:0] <= adc_d;
45 ssp_frame <= 1'b1;
1d0ccbe0 46 end
f5d2e7f7 47 else
1d0ccbe0 48 begin
f5d2e7f7 49 adc_d_out[7:0] <= {1'b0, adc_d_out[7:1]};
50 ssp_frame <= 1'b0;
1d0ccbe0 51 end
1d0ccbe0 52
f5d2e7f7 53end
1d0ccbe0 54
f5d2e7f7 55assign ssp_din = adc_d_out[0];
1d0ccbe0 56
57endmodule
Impressum, Datenschutz