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

📄 interfaces.bsv

📁 基于MATLAB的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 DataTypes::*;import FPComplex::*;import GetPut::*;import Vector::*;// Generic OFDM Module Interfaceinterface Block#(type in_t, type out_t);    interface Put#(in_t) in;    interface Get#(out_t) out;endinterface// Transmitter Modules// Scrmablertypedef Block#(ScramblerMesg#(i_ctrl_t,i_n),	       EncoderMesg#(o_ctrl_t,o_n))        Scrambler#(type i_ctrl_t,		   type o_ctrl_t,		   numeric type i_n,		   numeric type o_n);		   // FEC Encoder		   		   typedef Block#(EncoderMesg#(ctrl_t,i_n),	       EncoderMesg#(ctrl_t,o_n))        Encoder#(type ctrl_t,		 numeric type i_n,		 numeric type o_n);// Reed Solomon Encodertypedef Encoder#(ctrl_t,i_n,o_n)        ReedEncoder#(type ctrl_t,		     numeric type i_n,		     numeric type o_n);		     // Convolutional Encoder		     typedef Encoder#(ctrl_t,i_n,o_n)	ConvEncoder#(type ctrl_t,		     numeric type i_n,		     numeric type o_n);// Puncturer		     typedef Encoder#(ctrl_t,i_n,o_n)        Puncturer#(type ctrl_t,            // ctrl		   numeric type i_n,       // input size		   numeric type o_n,       // output size		   numeric type i_buf_sz,  // input buffer size		   numeric type o_buf_sz); // output buffer size// InterleaveBlock (common for Interleaver and Deinterleaver)typedef Block#(Mesg#(ctrl_t,Vector#(i_n,data_t)),	       Mesg#(ctrl_t,Vector#(o_n,data_t)))        InterleaveBlock#(type ctrl_t,			 numeric type i_n,			 numeric type o_n,			 type data_t,			 numeric type minNcbps);// Interleavertypedef Block#(InterleaverMesg#(ctrl_t,i_n),	       MapperMesg#(ctrl_t,o_n))	Interleaver#(type ctrl_t,		     numeric type i_n,		     numeric type o_n,		     numeric type minNcbps);// Mappertypedef Block#(MapperMesg#(ctrl_t,i_n),	       PilotInsertMesg#(ctrl_t,n,i_prec,f_prec))	Mapper#(type ctrl_t,		numeric type i_n,		numeric type n,		numeric type i_prec,		numeric type f_prec);// PilotInserttypedef Block#(PilotInsertMesg#(ctrl_t,i_n,i_prec,f_prec),	       IFFTMesg#(ctrl_t,o_n,i_prec,f_prec)) 	PilotInsert#(type ctrl_t,          // ctrl		     numeric type i_n,     // fft sz - guards/pilots		     numeric type o_n,     // fft sz		     numeric type i_prec,  // integer precision		     numeric type f_prec); // fractional precision// IFFTtypedef Block#(IFFTMesg#(ctrl_t,n,i_prec,f_prec),	       CPInsertMesg#(ctrl_t,n,i_prec,f_prec))	IFFT#(type ctrl_t,	      numeric type n,	      numeric type i_prec,	      numeric type f_prec);// CPInserttypedef Block#(CPInsertMesg#(ctrl_t,n,i_prec,f_prec),	       DACMesg#(i_prec,f_prec))        CPInsert#(type ctrl_t,          // ctrl		  numeric type n,       // fft sz		  numeric type i_prec,  // integer precision		  numeric type f_prec); // fractional precision// Transmittertypedef Block#(ScramblerMesg#(ctrl_t,n),	       DACMesg#(i_prec,f_prec))	Transmitter#(type ctrl_t,		     numeric type n,		     numeric type i_prec,		     numeric type f_prec);// Receiver Modules// Synchronizertypedef Block#(SynchronizerMesg#(i_prec,f_prec),	       UnserializerMesg#(i_prec,f_prec))	Synchronizer#(numeric type i_prec,		      numeric type f_prec);// Unserializertypedef Block#(UnserializerMesg#(i_prec,f_prec),	       SPMesgFromSync#(n,i_prec,f_prec))	Unserializer#(numeric type n,		      numeric type i_prec,		      numeric type f_prec);// ReceiverPreFFTtypedef Block#(SynchronizerMesg#(i_prec,f_prec),	       SPMesgFromSync#(n,i_prec,f_prec))	ReceiverPreFFT#(numeric type n,			numeric type i_prec,			numeric type f_prec);// FFT		      		      typedef Block#(FFTMesg#(ctrl_t,n,i_prec,f_prec),	       ChannelEstimatorMesg#(ctrl_t,n,i_prec,f_prec))	FFT#(type ctrl_t,	     numeric type n,	     numeric type i_prec,	     numeric type f_prec);// Channel Estimatortypedef Block#(ChannelEstimatorMesg#(ctrl_t,i_n,i_prec,f_prec),	       DemapperMesg#(ctrl_t,o_n,i_prec,f_prec))	ChannelEstimator#(type ctrl_t,			  numeric type i_n,			  numeric type o_n,			  numeric type i_prec,			  numeric type f_prec);// Demappertypedef Block#(DemapperMesg#(ctrl_t,i_n,i_prec,f_prec),	       DeinterleaverMesg#(ctrl_t,o_n, decode_t))	Demapper#(type ctrl_t,		  numeric type i_n,		  numeric type o_n,		  numeric type i_prec,		  numeric type f_prec,		  type decode_t);// Deinterleavertypedef Block#(DeinterleaverMesg#(ctrl_t,i_n,decode_t),	       DecoderMesg#(ctrl_t,o_n,decode_t))	Deinterleaver#(type ctrl_t,		       numeric type i_n,		       numeric type o_n,		       type decode_t,		       numeric type minNcbps);// Decodertypedef Block#(DecoderMesg#(ctrl_t,i_n,i_decode_t),	       DecoderMesg#(ctrl_t,o_n,o_decode_t))	Decoder#(type ctrl_t,		 numeric type i_n,		 type i_decode_t,		 numeric type o_n,		 type o_decode_t);		 // Depuncturertypedef Decoder#(ctrl_t,i_n,ViterbiMetric,o_n,ViterbiMetric)	Depuncturer#(type ctrl_t,		     numeric type i_n,		     numeric type o_n,		     numeric type i_buf_sz,		     numeric type o_buf_sz);// Viterbitypedef Decoder#(ctrl_t,i_n,ViterbiMetric,o_n,Bit#(1))	Viterbi#(type ctrl_t,		 numeric type i_n,		 numeric type o_n);// Reed Solomon Decodertypedef Decoder#(ctrl_t,i_n,Bit#(1),o_n,Bit#(1))	ReedDecoder#(type ctrl_t,		     numeric type i_n,		     numeric type o_n);// ReceiverPreDescramblertypedef Block#(FFTMesg#(ctrl_t,i_n,i_prec,f_prec),	       DecoderMesg#(ctrl_t,o_n,o_t))	ReceiverPreDescrambler#(type ctrl_t,				numeric type i_n,				numeric type i_prec,				numeric type f_prec,				numeric type o_n,				type o_t);// Descramblertypedef Scrambler#(ctrl_t,ctrl_t,i_n,o_n)        Descrambler#(type ctrl_t,		     numeric type i_n,		     numeric type o_n);	   		     

⌨️ 快捷键说明

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