annotate venus/src/periph/sim_socket_block.v @ 82:541b55e6bf47

add UART rescue header
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 08 Dec 2021 05:00:50 +0000
parents d33cb696b335
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This module encapsulates the complete SIM socket block:
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * the actual socket, the bypass cap and our SIM_CD circuit.
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 */
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 module sim_socket_block (GND, Vio, VSIM, SIM_CLK, SIM_RST, SIM_IO, SIM_CD);
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 input GND, Vio, VSIM;
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 input SIM_CLK, SIM_RST;
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 inout SIM_IO;
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 output SIM_CD;
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 wire SIM_CD_inverted;
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 sim_socket_wrap socket (.C1(VSIM),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 .C2(SIM_RST),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 .C3(SIM_CLK),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 .C5(GND),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 .C6(VSIM),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 .C7(SIM_IO),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 .SW1(GND),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 .SW2(SIM_CD_inverted)
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 );
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 /* cap per Leonardo schematics */
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 capacitor C306 (VSIM, GND);
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 /* pull-up on the switch line */
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 resistor switch_pullup (SIM_CD_inverted, Vio);
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 /* inverting buffer for SIM_CD */
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 inv_buffer_74LVC1G04 inv (.GND(GND),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 .Vcc(Vio),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 .A(SIM_CD_inverted),
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 .Y(SIM_CD)
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 );
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
42
d33cb696b335 add missing bypass caps for mobile domain peripherals
Mychaela Falconia <falcon@freecalypso.org>
parents: 17
diff changeset
38 /* bypass cap for the inverting buffer IC */
d33cb696b335 add missing bypass caps for mobile domain peripherals
Mychaela Falconia <falcon@freecalypso.org>
parents: 17
diff changeset
39 capacitor inv_bypass (Vio, GND);
d33cb696b335 add missing bypass caps for mobile domain peripherals
Mychaela Falconia <falcon@freecalypso.org>
parents: 17
diff changeset
40
17
5b18183f55bf Venus src: SIM socket block captured
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 endmodule