⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sparams.bsv

📁 MIT编写的OFDM仿真程序
💻 BSV
字号:
//----------------------------------------------------------------------//// The MIT License // // Copyright (c) 2007 Alfred Man Cheuk Ng, mcn02@mit.edu // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation // files (the "Software"), to deal in the Software without // restriction, including without limitation the rights to use,// copy, modify, merge, publish, distribute, sublicense, and/or sell// copies of the Software, and to permit persons to whom the// Software is furnished to do so, subject to the following conditions:// // The above copyright notice and this permission notice shall be// included in all copies or substantial portions of the Software.// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR// OTHER DEALINGS IN THE SOFTWARE.//----------------------------------------------------------------------//import Complex::*;import FixedPoint::*;import FPComplex::*;import Vector::*;import Parameters::*;//  //////////////////////////////////////////  // Synchronizer parameters (changable)//  //////////////////////////////////////////  // specific for OFDM specification//  typedef 16  SSLen;        // short symbol length (auto correlation delay 16)//  typedef 64  LSLen;        // long symbol length (auto correlation delay 64)//  typedef 160 LSStart;      // when the long symbol start//  typedef 320 SignalStart;  // when the signal (useful data) start//  typedef 80  SymbolLen;    // one symbol length//  typedef 64  NoCPLen;      // symbol length after removing CP//  // implementation parameters//  typedef 96  SSyncPos;      // short symbol synchronization position ( 2*SSLen <= this value < LBStart) //  typedef 224 LSyncPos;      // long symbol synchronization position  ( LSStart <= this value < SinglaStart)       //  typedef 2   SyncIntPrec;   // number of integer bits for internal arithmetic//  typedef 14  SyncFractPrec; // number of fractional bits for internal arithmetic //  typedef 16  FreqMeanLen;   // how many samples we collect to calculate CFO (power of 2, at most 32, bigger == more tolerant to noise)//  typedef 480 TimeResetPos;  // reset time if coarCounter is larger than this, must be bigger than SignalStart//  typedef 2   CORDICPipe;    // number of pipeline stage of the cordic//  typedef 16  CORDICIter;    // number of cordic iterations (max 16 iterations, must be multiple of CORDICPIPE)//////////////////////////////////////////////////// Types automatic defined by parameters/////////////////////////////////////////////////// for alltypedef TLog#(TimeResetPos)                          CounterSz;typedef TAdd#(TMul#(2,SyncIntPrec),1)                MulIntPrec;// types for auto-correlatortypedef TSub#(LSLen, SSLen)                          LSLSSLen;              // LSLen - SSLentypedef TSub#(TAdd#(SSLen, SSLen),1)                 CoarTimeCorrPos;       // first pos to able detect high correlationtypedef TAdd#(TSub#(SSyncPos, CoarTimeCorrPos),1)    CoarTimeAccumDelaySz;  //typedef TAdd#(TLog#(SSLen), MulIntPrec)              CoarTimeAccumIntPrec;  // int precisiontypedef TAdd#(TMul#(2,CoarTimeAccumIntPrec),1)       CoarTimeCorrIntPrec;   // precision for power and correlation squaretypedef TLog#(TAdd#(CoarTimeAccumDelaySz,1))         CoarTimeAccumIdx;      // no of bit to hold the accumulated value// types for fine time estimatortypedef TSub#(LSyncPos, LSStart)                     FineTimeCorrDelaySz;   // no of element to delaytypedef TAdd#(FineTimeCorrDelaySz, 1)                FineTimeCorrSz;        // no of element to cross correlatetypedef TAdd#(TLog#(FineTimeCorrSz), 3)              FineTimeCorrResSz;     // the type for corr result typedef TAdd#(1,TMul#(2,FineTimeCorrResSz))          FineTimeCorrFullResSz; // typedef TAdd#(TLog#(LSLen), MulIntPrec)              CorrIntPrec;typedef FPComplex#(CorrIntPrec, SyncFractPrec)       CorrType;// Freq. Offset Estimatortypedef TLog#(FreqMeanLen)                           FreqMeanLenIdxSz;typedef TAdd#(FreqMeanLenIdxSz, 1)                   FreqOffAccumIntPrec;typedef TLog#(SymbolLen)                             RotAngCounterSz;typedef TAdd#(FreqMeanLenIdxSz,TLog#(SSLen))         CoarFreqOffAccumRShift;typedef TAdd#(FreqMeanLenIdxSz,TLog#(LSLen))         FineFreqOffAccumRShift;  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -