mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-12 16:04:47 +08:00
style
This commit is contained in:
parent
621eb12976
commit
e4bd3544d5
1 changed files with 20 additions and 14 deletions
|
@ -13,6 +13,8 @@
|
||||||
// iZsh <izsh at fail0verflow.com>, June 2014
|
// iZsh <izsh at fail0verflow.com>, June 2014
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
`define FPGA_CMD_SET_CONFREG 1
|
||||||
|
|
||||||
`include "hi_read_tx.v"
|
`include "hi_read_tx.v"
|
||||||
`include "hi_read_rx_xcorr.v"
|
`include "hi_read_rx_xcorr.v"
|
||||||
`include "hi_simulate.v"
|
`include "hi_simulate.v"
|
||||||
|
@ -48,7 +50,10 @@ reg [7:0] conf_word;
|
||||||
always @(posedge ncs)
|
always @(posedge ncs)
|
||||||
begin
|
begin
|
||||||
case(shift_reg[15:12])
|
case(shift_reg[15:12])
|
||||||
4'b0001: conf_word <= shift_reg[7:0]; // FPGA_CMD_SET_CONFREG
|
`FPGA_CMD_SET_CONFREG:
|
||||||
|
begin
|
||||||
|
conf_word <= shift_reg[7:0];
|
||||||
|
end
|
||||||
endcase
|
endcase
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -61,8 +66,7 @@ begin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
wire [2:0] major_mode;
|
wire [2:0] major_mode = conf_word[7:5];
|
||||||
assign major_mode = conf_word[7:5];
|
|
||||||
|
|
||||||
// For the high-frequency transmit configuration: modulation depth, either
|
// For the high-frequency transmit configuration: modulation depth, either
|
||||||
// 100% (just quite driving antenna, steady LOW), or shallower (tri-state
|
// 100% (just quite driving antenna, steady LOW), or shallower (tri-state
|
||||||
|
@ -72,8 +76,10 @@ wire hi_read_tx_shallow_modulation = conf_word[0];
|
||||||
// For the high-frequency receive correlator: frequency against which to
|
// For the high-frequency receive correlator: frequency against which to
|
||||||
// correlate.
|
// correlate.
|
||||||
wire hi_read_rx_xcorr_848 = conf_word[0];
|
wire hi_read_rx_xcorr_848 = conf_word[0];
|
||||||
|
|
||||||
// and whether to drive the coil (reader) or just short it (snooper)
|
// and whether to drive the coil (reader) or just short it (snooper)
|
||||||
wire hi_read_rx_xcorr_snoop = conf_word[1];
|
wire hi_read_rx_xcorr_snoop = conf_word[1];
|
||||||
|
|
||||||
// divide subcarrier frequency by 4
|
// divide subcarrier frequency by 4
|
||||||
wire hi_read_rx_xcorr_quarter = conf_word[2];
|
wire hi_read_rx_xcorr_quarter = conf_word[2];
|
||||||
|
|
||||||
|
@ -157,17 +163,17 @@ hi_flite hfl(
|
||||||
// 110 -- none
|
// 110 -- none
|
||||||
// 111 -- everything off
|
// 111 -- everything off
|
||||||
|
|
||||||
mux8 mux_ssp_clk (major_mode, ssp_clk, ht_ssp_clk, hrxc_ssp_clk, hs_ssp_clk, hisn_ssp_clk, he_ssp_clk, hfl_ssp_clk, 1'b0, 1'b0);
|
mux8 mux_ssp_clk (major_mode, ssp_clk, ht_ssp_clk, hrxc_ssp_clk, hs_ssp_clk, hisn_ssp_clk, he_ssp_clk, hfl_ssp_clk, 1'b0, 1'b0);
|
||||||
mux8 mux_ssp_din (major_mode, ssp_din, ht_ssp_din, hrxc_ssp_din, hs_ssp_din, hisn_ssp_din, he_ssp_din, hfl_ssp_din, 1'b0, 1'b0);
|
mux8 mux_ssp_din (major_mode, ssp_din, ht_ssp_din, hrxc_ssp_din, hs_ssp_din, hisn_ssp_din, he_ssp_din, hfl_ssp_din, 1'b0, 1'b0);
|
||||||
mux8 mux_ssp_frame (major_mode, ssp_frame, ht_ssp_frame, hrxc_ssp_frame, hs_ssp_frame, hisn_ssp_frame, he_ssp_frame, hfl_ssp_frame, 1'b0, 1'b0);
|
mux8 mux_ssp_frame (major_mode, ssp_frame, ht_ssp_frame, hrxc_ssp_frame, hs_ssp_frame, hisn_ssp_frame, he_ssp_frame, hfl_ssp_frame, 1'b0, 1'b0);
|
||||||
mux8 mux_pwr_oe1 (major_mode, pwr_oe1, ht_pwr_oe1, hrxc_pwr_oe1, hs_pwr_oe1, hisn_pwr_oe1, he_pwr_oe1, hfl_pwr_oe1, 1'b0, 1'b0);
|
mux8 mux_pwr_oe1 (major_mode, pwr_oe1, ht_pwr_oe1, hrxc_pwr_oe1, hs_pwr_oe1, hisn_pwr_oe1, he_pwr_oe1, hfl_pwr_oe1, 1'b0, 1'b0);
|
||||||
mux8 mux_pwr_oe2 (major_mode, pwr_oe2, ht_pwr_oe2, hrxc_pwr_oe2, hs_pwr_oe2, hisn_pwr_oe2, he_pwr_oe2, hfl_pwr_oe2, 1'b0, 1'b0);
|
mux8 mux_pwr_oe2 (major_mode, pwr_oe2, ht_pwr_oe2, hrxc_pwr_oe2, hs_pwr_oe2, hisn_pwr_oe2, he_pwr_oe2, hfl_pwr_oe2, 1'b0, 1'b0);
|
||||||
mux8 mux_pwr_oe3 (major_mode, pwr_oe3, ht_pwr_oe3, hrxc_pwr_oe3, hs_pwr_oe3, hisn_pwr_oe3, he_pwr_oe3, hfl_pwr_oe3, 1'b0, 1'b0);
|
mux8 mux_pwr_oe3 (major_mode, pwr_oe3, ht_pwr_oe3, hrxc_pwr_oe3, hs_pwr_oe3, hisn_pwr_oe3, he_pwr_oe3, hfl_pwr_oe3, 1'b0, 1'b0);
|
||||||
mux8 mux_pwr_oe4 (major_mode, pwr_oe4, ht_pwr_oe4, hrxc_pwr_oe4, hs_pwr_oe4, hisn_pwr_oe4, he_pwr_oe4, hfl_pwr_oe4, 1'b0, 1'b0);
|
mux8 mux_pwr_oe4 (major_mode, pwr_oe4, ht_pwr_oe4, hrxc_pwr_oe4, hs_pwr_oe4, hisn_pwr_oe4, he_pwr_oe4, hfl_pwr_oe4, 1'b0, 1'b0);
|
||||||
mux8 mux_pwr_lo (major_mode, pwr_lo, ht_pwr_lo, hrxc_pwr_lo, hs_pwr_lo, hisn_pwr_lo, he_pwr_lo, hfl_pwr_lo, 1'b0, 1'b0);
|
mux8 mux_pwr_lo (major_mode, pwr_lo, ht_pwr_lo, hrxc_pwr_lo, hs_pwr_lo, hisn_pwr_lo, he_pwr_lo, hfl_pwr_lo, 1'b0, 1'b0);
|
||||||
mux8 mux_pwr_hi (major_mode, pwr_hi, ht_pwr_hi, hrxc_pwr_hi, hs_pwr_hi, hisn_pwr_hi, he_pwr_hi, hfl_pwr_hi, 1'b0, 1'b0);
|
mux8 mux_pwr_hi (major_mode, pwr_hi, ht_pwr_hi, hrxc_pwr_hi, hs_pwr_hi, hisn_pwr_hi, he_pwr_hi, hfl_pwr_hi, 1'b0, 1'b0);
|
||||||
mux8 mux_adc_clk (major_mode, adc_clk, ht_adc_clk, hrxc_adc_clk, hs_adc_clk, hisn_adc_clk, he_adc_clk, hfl_adc_clk, 1'b0, 1'b0);
|
mux8 mux_adc_clk (major_mode, adc_clk, ht_adc_clk, hrxc_adc_clk, hs_adc_clk, hisn_adc_clk, he_adc_clk, hfl_adc_clk, 1'b0, 1'b0);
|
||||||
mux8 mux_dbg (major_mode, dbg, ht_dbg, hrxc_dbg, hs_dbg, hisn_dbg, he_dbg, hfl_dbg, 1'b0, 1'b0);
|
mux8 mux_dbg (major_mode, dbg, ht_dbg, hrxc_dbg, hs_dbg, hisn_dbg, he_dbg, hfl_dbg, 1'b0, 1'b0);
|
||||||
|
|
||||||
// In all modes, let the ADC's outputs be enabled.
|
// In all modes, let the ADC's outputs be enabled.
|
||||||
assign adc_noe = 1'b0;
|
assign adc_noe = 1'b0;
|
||||||
|
|
Loading…
Reference in a new issue