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 ab599f8b6d
commit 9520ecd0c5
4 changed files with 15 additions and 4 deletions

View File

@@ -377,9 +377,7 @@ void Transceiver::driveControl()
mPower = -20;
mRadioInterface->start();
mDriveLoop->start();
mDriveLoop->writeClockInterface();
generateRACHSequence(mSPS);
// Start radio interface threads.
mOn = true;

View File

@@ -119,6 +119,9 @@ int main(int argc, char *argv[])
DriveLoop *drive = new DriveLoop(SAMPSPERSYM,GSM::Time(3,0),radio);
Transceiver *trx = new Transceiver(port, addr, SAMPSPERSYM, radio, drive, 0);
radio->activateChan(0);
if (!trx->init()) {
LOG(ALERT) << "Failed to initialize transceiver";
}
/*
signalVector *gsmPulse = generateGSMPulse(2,1);

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);