FreeCalypso > hg > fc-magnetite
view src/cs/layer1/gtt_include/ctm/ctm_defines.h @ 600:8f50b202e81f
board preprocessor conditionals: prep for more FC hw in the future
This change eliminates the CONFIG_TARGET_FCDEV3B preprocessor symbol and
all preprocessor conditionals throughout the code base that tested for it,
replacing them with CONFIG_TARGET_FCFAM or CONFIG_TARGET_FCMODEM. These
new symbols are specified as follows:
CONFIG_TARGET_FCFAM is intended to cover all hardware designs created by
Mother Mychaela under the FreeCalypso trademark. This family will include
modem products (repackagings of the FCDEV3B, possibly with RFFE or even
RF transceiver changes), and also my desired FreeCalypso handset product.
CONFIG_TARGET_FCMODEM is intended to cover all FreeCalypso modem products
(which will be firmware-compatible with the FCDEV3B if they use TI Rita
transceiver, or will require a different fw build if we switch to one of
Silabs Aero transceivers), but not the handset product. Right now this
CONFIG_TARGET_FCMODEM preprocessor symbol is used to conditionalize
everything dealing with MCSI.
At the present moment the future of FC hardware evolution is still unknown:
it is not known whether we will ever have any beyond-FCDEV3B hardware at all
(contingent on uncertain funding), and if we do produce further FC hardware
designs, it is not known whether they will retain the same FIC modem core
(triband), if we are going to have a quadband design that still retains the
classic Rita transceiver, or if we are going to switch to Silabs Aero II
or some other transceiver. If we produce a quadband modem that still uses
Rita, it will run exactly the same fw as the FCDEV3B thanks to the way we
define TSPACT signals for the RF_FAM=12 && CONFIG_TARGET_FCFAM combination,
and the current fcdev3b build target will be renamed to fcmodem. OTOH, if
that putative quadband modem will be Aero-based, then it will require a
different fw build target, the fcdev3b target will stay as it is, and the
two targets will both define CONFIG_TARGET_FCFAM and CONFIG_TARGET_FCMODEM,
but will have different RF_FAM numbers. But no matter which way we are
going to evolve, it is not right to have conditionals on CONFIG_TARGET_FCDEV3B
in places like ACI, and the present change clears the way for future
evolution.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 01 Apr 2019 01:05:24 +0000 |
parents | 945cf7f506b2 |
children |
line wrap: on
line source
/* ******************************************************************************* * * COPYRIGHT (C) 2000 BY ERICSSON EUROLAB DEUTSCHLAND GmbH * 90411 NUERNBERG, GERMANY, Tel Int + 49 911 5217 100 * * The program(s) may be used and/or copied only with the * written permission from Ericsson or in accordance * with the terms and conditions stipulated in the agreement or * contract under which the program(s) have been supplied. * ******************************************************************************* * * File : ctm_defines.h * Purpose : Global constants for the Cellular Text Telephone Modem * ******************************************************************************* */ #ifndef ctm_defines_h #define ctm_defines_h "$Id: $" #ifndef MAX #define MAX(A, B) ((A) > (B) ? (A) : (B)) #endif #define MAX_IDLE_SYMB 5 /* Number of Idle Symbols at End of Burst */ #define CHC_RATE 4 /* Rate of the Error Protection */ #define CHC_K 5 /* Constraint length of Error Protection */ #define SYMB_LEN 40 /* Length of one CTM symbol */ /* The following constant determines whether the signal processing takes */ /* place sample-by-sample or frame-by-frame (160 samples per frame) */ // #define LENGTH_TONE_VEC 160 /* signal frame size */ #define LENGTH_TONE_VEC 1 /* signal frame size */ /* Number of bits that are processed during each call of the main loop */ //LN March 13, 2002 //#define LENGTH_TX_BITS MAX(2, 2*LENGTH_TONE_VEC/SYMB_LEN) #define LENGTH_TX_BITS 2 //LN #define BITS_PER_SYMB 8 /* bits per symbol */ #define NCYCLES_0 2 /* Number of periods for symbol #0 */ #define NCYCLES_1 3 /* Number of periods for symbol #1 */ #define NCYCLES_2 4 /* Number of periods for symbol #2 */ #define NCYCLES_3 5 /* Number of periods for symbol #3 */ #define THRESHOLD_RELIABILITY_FOR_SUPPRESSING_OUTPUT 100 #define THRESHOLD_RELIABILITY_FOR_XCORR 1 #define THRESHOLD_RELIABILITY_FOR_GOING_OFFLINE 100 #define MAX_NUM_UNRELIABLE_GROSS_BITS 400 #define NUM_BITS_GUARD_INTERVAL 6 /* length of silence after a burst */ #define WAIT_SYNC_REL_THRESHOLD_0 20316 /* = 0.62*32768 */ #define WAIT_SYNC_REL_THRESHOLD_1 17039 /* = 0.52*32768 */ #define WAIT_SYNC_REL_THRESHOLD_2 23265 /* = 0.71*32768 */ #define RESYNC_REL_THRESHOLD 26542 /* = 0.81*32768 */ #define GUARD_BIT_SYMBOL 0 /* "magic number" indicating that a */ // /* bit shall be muted */ #define intlvB 8 /* Interleaver block length */ #define intlvD 2 /* Interleaver block distance (interlace) */ #define demodSyncLns 1 /* Nr of demodulator sync lines */ #define deintSyncLns 0 /* Nr of deinterleaver sync lines */ #define IDLE_SYMB 0x16 /* UCS code for Idle Symbol */ #define ENQU_SYMB 0x05 /* UCS code for Enquiry Symbol */ #if LENGTH_TONE_VEC==160 #define ENQUIRY_TIMEOUT 20 /* number of frames for negotiation */ #else #define ENQUIRY_TIMEOUT (1320/5) //19*160 #endif #define NUM_ENQUIRY_BURSTS 3 /* number of enquiry attempts */ #define NUM_MUTE_ROWS 4 /* duration of muting interval, 4 rows=80ms */ #define RESYNC_SEQ_LENGTH 32 /* must be a multiple of intlvB */ #define NUM_BITS_BETWEEN_RESYNC 352 // 352 = 320+32 /* 352 is a multiple of CHC_RATE, intlvB, and BITS_PER_SYMB, */ /* and must be greater than intlvB*((intlvB-1)*intlvD+NUM_MUTE_ROWS */ #define SILENCE_PERIOD 32 #define EARLY_SILENCE_PERIOD SILENCE_PERIOD-2 #define LATE_SILENCE_PERIOD SILENCE_PERIOD+2 #define PLAYBACK_VOLUME 0xC000 /* volume for sound card playback */ //#define DEBUG_OUTPUT /* comment this out for regular operation mode! */ #endif