Transceiver52M: Generate RACH correlation sequence at initialization

There is no temporal dependency on when the RACH sequence is generated,
so there is no need for transceiver to create it in response to a
command from GSM core. If we power on the transceiver, we will need
the RACH sequence, so just allocate it during initialization.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
This commit is contained in:
Thomas Tsou 2013-08-20 18:55:33 -04:00
parent 6aa1f18f41
commit e57004d0c3
4 changed files with 15 additions and 3 deletions

View File

@ -501,7 +501,6 @@ void Transceiver::driveControl()
// Prepare for thread start
mPower = -20;
mRadioInterface->start();
generateRACHSequence(mSPS);
// Start radio interface threads.
mFIFOServiceLoopThread->start((void * (*)(void*))FIFOServiceLoopAdapter,(void*) this);

View File

@ -160,6 +160,9 @@ int main(int argc, char *argv[])
Transceiver *trx = new Transceiver(trxPort, trxAddr.c_str(),
SAMPSPERSYM, GSM::Time(3,0), radio);
if (!trx->init()) {
LOG(ALERT) << "Failed to initialize transceiver";
}
trx->receiveFIFO(radio->receiveFIFO());
trx->start();

View File

@ -244,11 +244,21 @@ void initGMSKRotationTables(int sps)
}
}
void sigProcLibSetup(int sps)
bool sigProcLibSetup(int sps)
{
if ((sps != 0) && (sps != 2) && (sps != 4))
return false;
initTrigTables();
initGMSKRotationTables(sps);
generateGSMPulse(sps, 2);
if (!generateRACHSequence(sps)) {
sigProcLibDestroy();
return false;
}
return true;
}
void GMSKRotate(signalVector &x) {

View File

@ -100,7 +100,7 @@ float vectorNorm2(const signalVector &x);
float vectorPower(const signalVector &x);
/** Setup the signal processing library */
void sigProcLibSetup(int sps);
bool sigProcLibSetup(int sps);
/** Destroy the signal processing library */
void sigProcLibDestroy(void);