1 //-----------------------------------------------------------------------------
2 // The way that we connect things when transmitting a command to an ISO
3 // 15693 tag, using 100% modulation only for now.
5 // Jonathan Westhues, April 2006
6 //-----------------------------------------------------------------------------
9 pck0, ck_1356meg, ck_1356megb,
10 pwr_lo, pwr_hi, pwr_oe1, pwr_oe2, pwr_oe3, pwr_oe4,
12 ssp_frame, ssp_din, ssp_dout, ssp_clk,
17 input pck0, ck_1356meg, ck_1356megb;
18 output pwr_lo, pwr_hi, pwr_oe1, pwr_oe2, pwr_oe3, pwr_oe4;
22 output ssp_frame, ssp_din, ssp_clk;
23 input cross_hi, cross_lo;
25 input shallow_modulation;
27 // low frequency outputs, not relevant
29 assign pwr_oe2 = 1'b0;
31 // The high-frequency stuff. For now, for testing, just bring out the carrier,
32 // and allow the ARM to modulate it over the SSP.
38 always @(ck_1356megb or ssp_dout or shallow_modulation)
40 if(shallow_modulation)
42 pwr_hi <= ck_1356megb;
49 pwr_hi <= ck_1356megb & ~ssp_dout;
57 // Then just divide the 13.56 MHz clock down to produce appropriate clocks
58 // for the synchronous serial port.
60 reg [6:0] hi_div_by_128;
62 always @(posedge ck_1356meg)
63 hi_div_by_128 <= hi_div_by_128 + 1;
65 assign ssp_clk = hi_div_by_128[6];
67 reg [2:0] hi_byte_div;
69 always @(negedge ssp_clk)
70 hi_byte_div <= hi_byte_div + 1;
72 assign ssp_frame = (hi_byte_div == 3'b000);
74 assign ssp_din = 1'b0;
76 assign dbg = ssp_frame;