Exemplo n.º 1
0
        public void DpdApiTestInit()
        {
            settings = new TestSetupConfig();
            AdiCommandServerClient Link = AdiCommandServerClient.Instance;
            //Start Calibration
            UInt32 calMask = (UInt32)(Mykonos.CALMASK.TX_BB_FILTER) |
                             (UInt32)(Mykonos.CALMASK.ADC_TUNER) |
                             (UInt32)(Mykonos.CALMASK.TIA_3DB_CORNER) |
                             (UInt32)(Mykonos.CALMASK.DC_OFFSET) |
                             (UInt32)(Mykonos.CALMASK.FLASH_CAL) |
                             (UInt32)(Mykonos.CALMASK.PATH_DELAY) |
                             (UInt32)(Mykonos.CALMASK.TX_LO_LEAKAGE_INTERNAL) |
                             (UInt32)(Mykonos.CALMASK.TX_QEC_INIT) |
                             (UInt32)(Mykonos.CALMASK.LOOPBACK_RX_LO_DELAY) |
                             (UInt32)(Mykonos.CALMASK.LOOPBACK_RX_RX_QEC_INIT) |
                             //(UInt32)(Mykonos.CALMASK.DPD_INIT) |
                             (UInt32)(Mykonos.CALMASK.RX_QEC_INIT);

            settings.calMask = calMask;

            //Call Test Setup
            TestSetup.DpdTestSetupInit(settings);

            //Test Setup Ensure now in Init State
            Link.hw.Connect(TestSetupConfig.ipAddr, TestSetupConfig.port);
            byte spiData1 = Link.spiRead(0xD40);

            Console.WriteLine("SPI Addr: 0xD40:" + spiData1.ToString("X"));
            Assert.AreEqual(0x2, (spiData1 & 0x3), "Myk: Test Setup Failed  Radio State is Not in INIT STATE");
            Link.hw.Disconnect();
        }
 public JESDFunctionalTests(string RxProfile, string TxProfile, string OrxProfile)
 {
     settings        = new TestSetupConfig();
     this.RxProfile  = RxProfile;
     this.TxProfile  = TxProfile;
     this.OrxProfile = OrxProfile;
 }
Exemplo n.º 3
0
        public static void SweepTxPllFrequency(TestSetupConfig settings)
        {
            AdiCommandServerClient Link = AdiCommandServerClient.Instance;

            Link.hw.Connect(TestSetupConfig.ipAddr, TestSetupConfig.port);
            Link.setSpiChannel(1);
            Link.Mykonos.init_clocks(settings.mykSettings.DeviceClock_kHz, 9830400, Mykonos.VCODIV.VCODIV_1, 4);

            double[] freq = { 1.2605E+10, 1.2245E+10, 1.1906E+10, 1.1588E+10, 1.1288E+10, 1.1007E+10, 1.0742E+10, 1.0492E+10, 1.0258E+10, 1.0036E+10, 9.8278E+09, 9.6311E+09, 9.4453E+09, 9.2698E+09, 9.1036E+09, 8.9463E+09, 8.7970E+09, 8.6553E+09, 8.5206E+09, 8.3923E+09, 8.2699E+09, 8.1531E+09, 8.0414E+09, 7.9344E+09, 7.8318E+09, 7.7332E+09, 7.6384E+09, 7.5471E+09, 7.4590E+09, 7.3740E+09, 7.2919E+09, 7.2124E+09, 7.1355E+09, 7.0610E+09, 6.9887E+09, 6.9186E+09, 6.8506E+09, 6.7846E+09, 6.7205E+09, 6.6582E+09, 6.5978E+09, 6.5392E+09, 6.4823E+09, 6.4270E+09, 6.3734E+09, 6.3214E+09, 6.2709E+09, 6.2220E+09, 6.1745E+09, 6.1284E+09, 6.0836E+09, 6.0401E+09, 5.9977E+09 };

            byte pllStatus = 0;

            for (int i = 0; i <= 52; i++)
            {
                Link.Mykonos.setRfPllFrequency(Mykonos.PLLNAME.TX_PLL, (UInt64)(freq[i] / 4));
                System.Threading.Thread.Sleep(100);

                pllStatus = Link.Mykonos.checkPllsLockStatus();
                //Console.WriteLine("Frequency: " + freq[i]/4 + ", PLL Status: 0x" + pllStatus.ToString("X"));


                byte vcoOutLevel  = (byte)(Link.spiRead(0x2BA) & 0x0F);
                byte vcoVar       = (byte)(Link.spiRead(0x2B9) & 0xF);
                byte vcoBiasRef   = (byte)(Link.spiRead(0x2C2) & 0x7);
                byte vcoBiasTcf   = (byte)((Link.spiRead(0x2C2) >> 3) & 0x3);
                byte vcoCalOffset = (byte)((Link.spiRead(0x2B8) >> 3) & 0xF);
                byte vcoVarRef    = (byte)(Link.spiRead(0x2D1) & 0xF);
                byte iCp          = (byte)(Link.spiRead(0x2BB) & 0x3F);
                byte lfC2         = (byte)((Link.spiRead(0x2BE) >> 4) & 0xF);
                byte lfC1         = (byte)(Link.spiRead(0x2BE) & 0xF);
                byte lfR1         = (byte)((Link.spiRead(0x2BF) >> 4) & 0xF);
                byte lfC3         = (byte)(Link.spiRead(0x2BF) & 0xF);
                byte lfR3         = (byte)(Link.spiRead(0x2C0) & 0xF);

                Console.WriteLine(freq[i] + "\t" + vcoOutLevel + "\t" + vcoVar + "\t" + vcoBiasRef + "\t" + vcoBiasTcf + "\t" + vcoCalOffset + "\t" + vcoVarRef + "\t" + iCp + "\t" + lfC2 + "\t" + lfC1 + "\t" + lfR1 + "\t" + lfC3 + "\t" + lfR3);
            }

            Link.Disconnect();
        }
Exemplo n.º 4
0
        public void ApiTestInit()
        {
            //Set Test Parameters
            TestSetupConfig settings = new TestSetupConfig();

            settings.mykSettings.DeviceClock_kHz = 245760;
            settings.mykSettings.rxChannel       = 3;
            settings.mykSettings.rxProfileName   = "Rx 100MHz, IQrate 122.88MHz, Dec5";
            settings.mykSettings.txProfileName   = "Tx 75/200MHz, IQrate 245.76MHz, Dec5";
            settings.mykSettings.orxProfileName  = "ORX 200MHz, IQrate 245.75MHz, Dec5";
            settings.mykSettings.srxProfileName  = "SRx 20MHz, IQrate 30.72MHz, Dec5";
            settings.mykSettings.ArmFirmwareName = "Mykonos_M3.bin";
            byte deframerM       = 4;
            byte desLanesEnabled = 0x0F;

            settings.mykTxDeFrmrCfg.deviceID                 = 0;
            settings.mykTxDeFrmrCfg.laneID                   = 0;
            settings.mykTxDeFrmrCfg.bankID                   = 0;
            settings.mykTxDeFrmrCfg.M                        = deframerM;
            settings.mykTxDeFrmrCfg.K                        = 32;
            settings.mykTxDeFrmrCfg.scramble                 = 1;
            settings.mykTxDeFrmrCfg.externalSysref           = 1;
            settings.mykTxDeFrmrCfg.deserializerLanesEnabled = desLanesEnabled;
            settings.mykTxDeFrmrCfg.deserializerLaneCrossbar = 0xE4;
            settings.mykTxDeFrmrCfg.eqSetting                = 1;
            settings.mykTxDeFrmrCfg.invertLanePolarity       = 0;
            settings.mykTxDeFrmrCfg.enableAutoChanXbar       = 0;
            settings.mykTxDeFrmrCfg.lmfcOffset               = 0;
            settings.mykTxDeFrmrCfg.newSysrefOnRelink        = 0;

            byte framerM = 4;
            byte serializerLanesEnabled = 0x03;

            settings.mykRxFrmrCfg.bankId                 = 0;
            settings.mykRxFrmrCfg.deviceId               = 0;
            settings.mykRxFrmrCfg.laneId                 = 0;
            settings.mykRxFrmrCfg.M                      = framerM;
            settings.mykRxFrmrCfg.K                      = 32;
            settings.mykRxFrmrCfg.scramble               = 1;
            settings.mykRxFrmrCfg.externalSysref         = 1;
            settings.mykRxFrmrCfg.serializerLanesEnabled = serializerLanesEnabled;
            settings.mykRxFrmrCfg.serializerLaneCrossbar = 0xE4;
            settings.mykRxFrmrCfg.serializerAmplitude    = 22;
            settings.mykRxFrmrCfg.preEmphasis            = 4;
            settings.mykRxFrmrCfg.invertLanePolarity     = 0;
            settings.mykRxFrmrCfg.lmfcOffset             = 0;
            settings.mykRxFrmrCfg.obsRxSyncbSelect       = 0;
            settings.mykRxFrmrCfg.newSysrefOnRelink      = 0;
            settings.mykRxFrmrCfg.overSample             = 0;
            settings.mykRxFrmrCfg.enableAutoChanXbar     = 0;

            byte obsRxframerM = 2;
            byte obsRxserializerLanesEnabled = 0xC;


            settings.mykObsRxFrmrCfg.bankId                 = 1;
            settings.mykObsRxFrmrCfg.deviceId               = 0;
            settings.mykObsRxFrmrCfg.laneId                 = 0;
            settings.mykObsRxFrmrCfg.M                      = obsRxframerM;
            settings.mykObsRxFrmrCfg.K                      = 32;
            settings.mykObsRxFrmrCfg.scramble               = 1;
            settings.mykObsRxFrmrCfg.externalSysref         = 1;
            settings.mykObsRxFrmrCfg.serializerLanesEnabled = obsRxserializerLanesEnabled;
            settings.mykObsRxFrmrCfg.serializerLaneCrossbar = 0xE4;
            settings.mykObsRxFrmrCfg.serializerAmplitude    = 22;
            settings.mykObsRxFrmrCfg.preEmphasis            = 4;
            settings.mykObsRxFrmrCfg.invertLanePolarity     = 0;
            settings.mykObsRxFrmrCfg.lmfcOffset             = 0;
            settings.mykObsRxFrmrCfg.newSysrefOnRelink      = 0;
            settings.mykObsRxFrmrCfg.enableAutoChanXbar     = 0;
            settings.mykObsRxFrmrCfg.obsRxSyncbSelect       = 1;
            settings.mykObsRxFrmrCfg.overSample             = 1;
            settings.rxPllLoFreq    = 2400000000;
            settings.txPllLoFreq    = 2500000000;
            settings.obsRxPllLoFreq = 2600000000;


            //Start Calibration
            UInt32 calMask = (UInt32)(Mykonos.CALMASK.TX_BB_FILTER) |
                             (UInt32)(Mykonos.CALMASK.ADC_TUNER) |
                             (UInt32)(Mykonos.CALMASK.TIA_3DB_CORNER) |
                             (UInt32)(Mykonos.CALMASK.DC_OFFSET) |
                             (UInt32)(Mykonos.CALMASK.TX_ATTENUATION_DELAY) |
                             (UInt32)(Mykonos.CALMASK.RX_GAIN_DELAY) |
                             (UInt32)(Mykonos.CALMASK.FLASH_CAL) |
                             (UInt32)(Mykonos.CALMASK.PATH_DELAY) |
                             (UInt32)(Mykonos.CALMASK.TX_LO_LEAKAGE_INTERNAL) |
                             (UInt32)(Mykonos.CALMASK.TX_QEC_INIT) |
                             (UInt32)(Mykonos.CALMASK.LOOPBACK_RX_LO_DELAY) |
                             (UInt32)(Mykonos.CALMASK.LOOPBACK_RX_RX_QEC_INIT) |
                             (UInt32)(Mykonos.CALMASK.RX_LO_DELAY) |
                             (UInt32)(Mykonos.CALMASK.RX_QEC_INIT);

            settings.calMask = calMask;
            //Call Test Setup
            TestSetup.TestSetupInit(settings);
        }