mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-02 21:23:16 +00:00
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:
@@ -377,9 +377,7 @@ void Transceiver::driveControl()
|
||||
mPower = -20;
|
||||
mRadioInterface->start();
|
||||
mDriveLoop->start();
|
||||
|
||||
mDriveLoop->writeClockInterface();
|
||||
generateRACHSequence(mSPS);
|
||||
|
||||
// Start radio interface threads.
|
||||
mOn = true;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user