HardwareCalypsoDSP » History » Version 6
Anonymous, 02/19/2016 10:48 PM
Add details about burst alignement ...
1 | 5 | laforge | [[PageOutline]] |
---|---|---|---|
2 | 1 | laforge | = The Calypso DSP = |
3 | |||
4 | The DSP inside the Calypso is a TMS320c5x LEAD2 DSP core. |
||
5 | |||
6 | The software inside the DSP is mainly mask-ROM implementing the signal processing related pary of GSM (mostly Rx side). |
||
7 | |||
8 | == DSP Hardware == |
||
9 | |||
10 | === Bus === |
||
11 | The DSP has its own address adress and data bus, independent of the ARM bus. |
||
12 | |||
13 | There is a bridge (called RHEA bridge) interfacing the DSP with its peripherals. |
||
14 | |||
15 | === Clock === |
||
16 | The Clock is fed from the DPLL of the Calypso chip. |
||
17 | |||
18 | === Reset === |
||
19 | The Reset line of the DSP is controlled by the ARM. |
||
20 | |||
21 | === API RAM === |
||
22 | There's a shared memory window (8kWords, i.e. 16kByte) between the DSP and the ARM used for inter-CPU-communication |
||
23 | |||
24 | == DSP Software == |
||
25 | |||
26 | === Patches === |
||
27 | The normal phone firmware downloads patches into the DSP RAM, using the API memory. |
||
28 | The DSP ROM code seems to contain some patch download program that is executed after reset. |
||
29 | |||
30 | Patches are likely used to fix bugs and to extend features in the DSP |
||
31 | |||
32 | |||
33 | === API === |
||
34 | |||
35 | The API is the programming interface implemented via the API RAM. |
||
36 | |||
37 | It consists of |
||
38 | * A double buffered (DB) Read Page (DSP->ARM direction, mostly response values) |
||
39 | * A double buffered (DB) Write Page (ARM->DSP direction, mostly commands) |
||
40 | * A non double-buffered (NDB) Page |
||
41 | * A parameter area |
||
42 | |||
43 | === Timing === |
||
44 | |||
45 | 5 | laforge | The timing we know so far is for single-slot operation (i.e. only one of the 8 timeslots is used) |
46 | |||
47 | 1 | laforge | The flow of events is as follows: |
48 | * The ARM utilizeds the DB Write page to define the set of actions (tasks) to be performed by the DSP |
||
49 | * It indicates which tasks (GSM and/or MISC) are to be executed by a field in the NDB page |
||
50 | * It indicates which of the two double buffered write pages was used in the NDB page |
||
51 | * The ARM tells the TPU to issue a FRAME interrupt at the next GSM frame |
||
52 | * When the first FRAME interrupt executes, the DSP starts to process the tasks as indicated by the ARM |
||
53 | 5 | laforge | * The DSP seems to need a setup time of 66 Quarter-bits before it receives RF samples via TSP (DSP_SETUP_TIME) |
54 | * The DSP receives and processes the sample data |
||
55 | 1 | laforge | * Results are stored as they are ready, using the DB Read page |
56 | * When the next FRAME interrupt executes, the ARM can read the results from the DB Read page. |
||
57 | |||
58 | Those flows normally happen overlapping, i.e. after the first FRAME interrupt above, the ARM can already write |
||
59 | the next set of commands to the ''other'' DB Write page. |
||
60 | |||
61 | Of course, some more complex DSP tasks take more than one frame to complete. The ARM code needs to know how |
||
62 | many frame interrupts to wait before reading the results from the DB Read page. |
||
63 | |||
64 | === Tasks === |
||
65 | |||
66 | 4 | laforge | The DSP has a number of tasks that it can execute on behalf of the ARM. A full list is available at [wiki:TSM30Layer1#DSPTasks] |
67 | 1 | laforge | |
68 | 3 | laforge | Please don't confuse DSP tasks with Layer1 tasks. They are both called ''tasks'' and even use one namespace, |
69 | but are distinctively different. Each layer1 task (on the ARM) is using a sequence of one or multiple DSP tasks. |
||
70 | |||
71 | 1 | laforge | ==== CHECKSUM ==== |
72 | This task computes a checksum over the program code inside the DSP. It is used to ensure that patches in combination with |
||
73 | the ROM code have the desired overall result. |
||
74 | |||
75 | The checksum task finishes after 1 frame. |
||
76 | |||
77 | 5 | laforge | ==== PM (Power Measurement) / AGC Task ==== |
78 | 1 | laforge | This task measures the received power level to control the gain of the analog Rx path. |
79 | |||
80 | The ARM can specify how many measurements are to be taken (1,2 or 3). |
||
81 | |||
82 | The number of measurements determines the execution time. |
||
83 | |||
84 | ==== FB (Frequency Burst) ==== |
||
85 | This task performs Frequency Burst detection/decoding in idle mode. |
||
86 | |||
87 | This task finishes after a maximum of 13 frames. |
||
88 | |||
89 | The first frame is "idle", and all further 12 frames are checked for frequency burst detection results in the NDB page. |
||
90 | |||
91 | ==== SB (Synchronization Burst) ==== |
||
92 | This task performs Synchronization Burst detection/decoding in idle mode. |
||
93 | |||
94 | It has two wait-states ({{{C W W R}}}) |
||
95 | |||
96 | 6 | laforge | It processes 190 IQ samples and has a 50 bits training sequence search window starting at sample[39] and correlating the full 64 bits. |
97 | (See PROM0:7C2C in DSP code for more details about demodulation) |
||
98 | |||
99 | ==== RX NB (Normal Burst - Reception) ==== |
||
100 | This task performs reception of Normal Bursts in both idle mode & dedicated mode. It should be called four times (for the 4 bursts) and the final data can be retreived on the fourth call response. |
||
101 | |||
102 | It processes 150 IQ samples and has a 10 bits training sequence search window starting at sample[68] and correlating only 14 bits (bits 10 -> bit 23 of the TSC). |
||
103 | (See PROM0:7C27 in DSP code for more details about demodulation) |
||
104 | |||
105 | 1 | laforge | ==== TCH_FB (Frequency Burst) ==== |
106 | This task performs Frequency Burst reading in dedicated mode. |
||
107 | |||
108 | ==== TCH_SB (Synchronization Burst) ==== |
||
109 | This task performs Synchronization Burst reading in dedicated mode. |
||
110 | 2 | laforge | |
111 | |||
112 | === Data Formats === |
||
113 | |||
114 | ==== Angle ==== |
||
115 | |||
116 | This angle indicates how far the received carrier clock deviates from our synthesized LO-based clock. |
||
117 | It's measured in radians and coded in fx1.15 notation (fixed-point 16bit data type with 1 bit integral and 15bit fractional) |
||
118 | |||
119 | ==== SNR (Signal/Noise Ratio) ==== |
||
120 | |||
121 | The SNR as measured by the DSP is maesured in dB and coded in fx6.10 notation. |
||
122 | |||
123 | ==== Power ==== |
||
124 | |||
125 | The Power of a signal present at the ADC baseband input, coded in 1/64dBm |
||
126 | 6 | laforge | |
127 | ==== TOA (Time Of Arrival) ==== |
||
128 | |||
129 | When reading NB, this is expressed as full bits and seems to be only positive. |