comparison venus/src/core/rf_section.v @ 9:3ed0f7a9c489

Venus: first version of Verilog for the Calypso core
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 19 Nov 2021 05:58:21 +0000
parents
children
comparison
equal deleted inserted replaced
8:d23dae52cd7b 9:3ed0f7a9c489
1 module rf_section (GND, VBAT_REG, VBAT_PA, Vio,
2 Analog_IM, Analog_IP, Analog_QM, Analog_QP, AFC, APC,
3 TCXOEN, RFEN, TSPCLK, TSPDO, TSPEN_Rita, TSPACT,
4 Clock_out_to_DBB, RTEMP_VTEST, ANTENNA);
5
6 input GND, VBAT_REG, VBAT_PA, Vio;
7
8 inout Analog_IM, Analog_IP, Analog_QM, Analog_QP;
9 input AFC, APC;
10 input TCXOEN, RFEN, TSPCLK, TSPDO, TSPEN_Rita;
11 input [11:0] TSPACT;
12
13 output Clock_out_to_DBB, RTEMP_VTEST;
14 inout ANTENNA;
15
16 /* wires between subblocks */
17 wire VREG3;
18 wire LNAGSMN, LNAGSMP, LNADCSN, LNADCSP, LNAPCSN, LNAPCSP;
19 wire Rita_LBTXOUT, Rita_HBTXOUT;
20 wire PA_LB_in, PA_HB_in, PA_LB_out, PA_HB_out;
21 wire FEM_TX_LB_in, FEM_TX_HB_in;
22 wire FEMout_to_LNAGSMN, FEMout_to_LNAGSMP;
23 wire FEMout_to_LNADCSN, FEMout_to_LNADCSP;
24 wire FEMout_to_LNAPCSN, FEMout_to_LNAPCSP;
25
26 /* instantiate the main subblocks */
27
28 rita_vcxo_int Rita_vcxo (.GND(GND),
29 .VBAT(VBAT_REG),
30 .VREG3(VREG3),
31 .VRIO(Vio),
32 .TCXOEN(TCXOEN),
33 .RFEN(RFEN),
34 .AFC_in(AFC),
35 .Clock_out_to_DBB(Clock_out_to_DBB),
36 .Ctrl_CLK(TSPCLK),
37 .Ctrl_DATA(TSPDO),
38 .Ctrl_STROBE(TSPEN_Rita),
39 .Ctrl_RESETZ(TSPACT[0]),
40 .IN(Analog_IM),
41 .IP(Analog_IP),
42 .QN(Analog_QM),
43 .QP(Analog_QP),
44 .LNAGSMN(LNAGSMN),
45 .LNAGSMP(LNAGSMP),
46 .LNADCSN(LNADCSN),
47 .LNADCSP(LNADCSP),
48 .LNAPCSN(LNAPCSN),
49 .LNAPCSP(LNAPCSP),
50 .LBTXOUT(Rita_LBTXOUT),
51 .HBTXOUT(Rita_HBTXOUT),
52 .DAC(GND),
53 .DET1(GND),
54 .DET2(GND),
55 .APC(), /* no connect */
56 .RTEMP_VTEST(RTEMP_VTEST)
57 );
58
59 rf_pa_block PA (.GND(GND),
60 .VBAT(VBAT_PA),
61 .Band_Select(TSPACT[3]),
62 .Tx_Enable(TSPACT[9]),
63 .APC_in(APC),
64 .LB_RF_in(PA_LB_in),
65 .HB_RF_in(PA_HB_in),
66 .LB_RF_out(PA_LB_out),
67 .HB_RF_out(PA_HB_out)
68 );
69
70 rf_fem_block FEM (.GND(GND),
71 .VREG3(VREG3),
72 .Ctrl_Tx_Low(TSPACT[2]),
73 .Ctrl_Tx_High(TSPACT[1]),
74 .Ctrl_Rx_850(TSPACT[4]),
75 .RX_LOW1(FEMout_to_LNAGSMP),
76 .RX_LOW2(FEMout_to_LNAGSMN),
77 .RX_DCS1(FEMout_to_LNADCSN),
78 .RX_DCS2(FEMout_to_LNADCSP),
79 .RX_PCS1(FEMout_to_LNAPCSN),
80 .RX_PCS2(FEMout_to_LNAPCSP),
81 .TX_LOW(FEM_TX_LB_in),
82 .TX_HIGH(FEM_TX_HB_in),
83 .ANT(ANTENNA)
84 );
85
86 /* RF magic glue connecting the blocks */
87
88 /* Tx: Rita to PA */
89 rfmatch_rita2pa_lb rita2pa_lb (.In(Rita_LBTXOUT), .Out(PA_LB_in), .GND(GND));
90 rfmatch_rita2pa_hb rita2pa_hb (.In(Rita_HBTXOUT), .Out(PA_HB_in), .GND(GND),
91 .VREG3(VREG3));
92
93 /* Tx: PA to FEM */
94 rfmatch_pa2fem_pi pa2fem_lb (.In(PA_LB_out), .Out(FEM_TX_LB_in), .GND(GND));
95 rfmatch_pa2fem_pi pa2fem_hb (.In(PA_HB_out), .Out(FEM_TX_HB_in), .GND(GND));
96
97 /* Rx paths (3) from the FEM to Rita LNA inputs */
98
99 rfmatch_fem2rita_low fem2rita_low (.In_neg(FEMout_to_LNAGSMN),
100 .In_pos(FEMout_to_LNAGSMP),
101 .Out_neg(LNAGSMN),
102 .Out_pos(LNAGSMP)
103 );
104 rfmatch_fem2rita_dcs fem2rita_dcs (.In_neg(FEMout_to_LNADCSN),
105 .In_pos(FEMout_to_LNADCSP),
106 .Out_neg(LNADCSN),
107 .Out_pos(LNADCSP)
108 );
109 rfmatch_fem2rita_pcs fem2rita_pcs (.In_neg(FEMout_to_LNAPCSN),
110 .In_pos(FEMout_to_LNAPCSP),
111 .Out_neg(LNAPCSN),
112 .Out_pos(LNAPCSP)
113 );
114
115 endmodule