当前位置:文档之家› 毕业设计_外文文献翻译

毕业设计_外文文献翻译

毕业设计_外文文献翻译本科毕业设计外文文献翻译(题目:packethandlinghardwaresupport学生姓名:学院:系别:专业:班级:指导教师:二〇一四年六月packethandlinghardwaresupport参考文献:texasinstruments1101low-powersub-1ghzrftransceiver.ti.2013the1101hasbuilt-inhardwaresupportforpacketorientedradioprotocols.intransmitmode,thepackethandlercanbeconfiguredtoaddthefollowingel ementstothepacketstoredinthetxfifo:aprogrammablenumberofpreamblebytesatwobytesynchronization(sync)word.canbeduplicatedtogivea4 -bytesyncword(remended).itisnotpossibletoonlyinsertpreambleoro nlyinsertasyncwordacrcchecksumputedoverthedatafield.theremendedsettingis4-bytepreambleand4-bytesyncword,exceptfor500kbauddataratewheretheremended preamblelengthis8bytes.inaddition,thefollowingcanbeimplem entedonthedatafieldandtheoptional2-bytecrcchecksum: whiteningofthedatawithapn9sequenceforwarderrorcorrection(fec)bytheuseofinterleavingandcoding ofthedata(convolutionalcoding)inreceivemode,thepackethandlingsupportwillde-constructthedatapacketbyimplementingthefollowing(ifenable d):preambledetectionsyncworddetectioncrcputationandcrccheckonebyteaddresscheckpacketlengthcheck(lengthbytecheckedagainstaprogrammable maximumlength)de-whiteningde-interleavinganddecodingoptionally,twostatusbytes(seetable27andtable28)withrssivalue ,linkqualityindication,andcrcstatuscanbeappendedintherxfifo.1.datawhiteningfromaradioperspective,theidealovertheairdataarerandomandd cfree.thisresultsinthesmoothestpowerdistributionovertheoupi edbandwidth.thisalsogivestheregulationloopsinthereceiveruni formoperationconditions(ondatadependencies).realdataoftencontainlongsequencesofzerosandones.intheseca ses,performancecanbeimprovedbywhiteningthedatabeforetra nsmitting,andde-whiteningthedatainthereceiver.with1101,thiscanbedoneautomatically.bysettingpktctrlo.white _data=1,alldata,exceptthepreambleandthesyncwordwillbexor-edwitha9-bitpseudo-random(pn9)sequencebeforebeingtransmitted.thisisshowninfi gure16.atthereceiverend,thedataarexor-edwiththesamepseudorandomsequence.inthisway,thewhiteni ngisreversed,andtheoriginaldataappearinthereceiver.thepn9se quenceisinitializedtoall1’s.2.packetformattheformatofthedatapacketcanbeconfiguredandconsistsofthef ollowingitems(seefigure17):preamblesynchronizationwordoptionallengthbyteoptionaladdressbytepayloadoptional2bytecrcthepreamblepatternisanalternatingsequence ofonesandzeros(10101010…).theminimumlengthofthepreamb leisprogrammablethroughthevalueofmdmcfg1.num_preamble .whenenablingtx,themodulatorwillstarttransmittingthepreamb le.whentheprogrammednumberofpreamblebyteshasbeentransmitted,themodulatorwillsendthesyncwordandthendatafr omthetxfifoifdataisavailable.ifthetxfifoisempty,themodulatorw illcontinuerosendpreamblebytesuntilthefirstbyteiswrittentothe txfifo.themodulatorwillthensendthesyncwordandthenthedata bytes.thesynchronizationwordisatwo-bytevaluesetinthesync1andsync0registers.thesyncwordprovid esbytesynchronizationoftheiningpacket.aone-bytesyncwordcanbeemulatedbysettingtheaync1valuetothepre amblepattern.itisalsopossibletoemulatea32bitsyncwordbysetti ngmdmcfg2.sync_modeto3or7.thesyncwordwillthenberepeate dtwice.1101supportsbothconstantpacketlengthprotocolsandvariablel engthprotocols.variableorfixedpacketlengthmodecanbeusedf orpacketsupto255bytes.forlongerpackets,infinitepacketlength modemustbeused.fixedpacketlengthmodeisselectedbysettingpktctrl0.length_con fig=0.thedesiredpacketlengthissetbythepktlenregister.thisvaluemustbedifferentfrom0.invariablepacketlengthmode,pktctrl0.length_config=1,thepack etlengthisconfiguredbythefirstbyteafterthesyncword.thepacke tlengthisdefinedasthepayloaddata,excludingthelengthbytean doptionalcrc.thepktlenregisterisusedtosetthemaximumpacketl engthallowedinrx.anypacketreceivedwithalengthbytewithaval uegreaterthanpktlenwillbediscarded.thepktlenvaluemustbedif ferentfrom0.thebytewrittentothetxfifomustbedifferentfrom0.withpktctrl0.length_config=2,thepacketlengthissettoinfinitean dtransmissionandreceptionwillcontinueuntilturnedoffmanuall y.asdescribedinthenextsection,thiscanbeusedtosupportpacket formatswithdifferentlengthconfigurationthannativelysupporte dby1101.oneshouldmakesurethattxisnotturnoffduringthetransmissionofthefirsthalfofanybyte.refertothe11012.1arbitrarylengthfieldconfigurationthepacketlengthregister,pktlen,canbereprogrammedduringrec eiveandtransmit.inbinationwithfixedpacketlengthmode(pktctrl 0.length_config=0),thisopensthepossibilitytohaveadifferentlen gthfieldconfigurationcansupportedforvariablelengthpackets(i nvariablepacketlengthmodethelengthbyteisthefirstbyteafterth esyncword).atthestartofreception,thepacketlengthissetalargev alue.themcureadsoutenoughbytestointerpretthelengthfieldint hepacket.thenthepktlenvalueissetaordingtothisvalue.theendof packetwillourwhenthebytecounterinthepackethandlerisequalt othepktlenregister.thus,themcumustbeabletoprogramthecorre ctlength,beforetheinternalcounterreachesthepacketlength.2.2packetlength>255thepacketautomationcontrolregister,pktctrl0,canbereprogram medduringtxandrx.thisopensthepossibilitytotransmitandrecei vepacketsthatarelongerthan256bytesandstillbeabletousethep ackethandlinghardwaresupport.atthestartofthepacket,theinfin itepacketlengthmode(pktctrl0.length_config=2)mustbeactive. onthetxside,thepktlenregisterissettomod(length,256).ontherxs idethemcureadsoutenoughbytestointerpretthelengthfieldinth epacketandsetsthepktlenregistertomod(length,256).whenlesst han256bytesremainsofthepacket,themcudisablesinfinitepacke tlengthmodeandactivatesfixedpacketlengthmode.whentheint ernalbytecounterreachesthepktlenvalue,thetransmissionorrec eptionends(theradioentersthestatedeterminedbytxoff_modeo rrxoff_mode).automaticcrcappending/checkingcanalsobeused (bysettingpktctrl0.crc_en=1).whenforexamplea600-bytepacketistobetransmitted,themcushoulddothefollowing(se ealsofigure18)setpktctrl0.length_config=2.pre-programthepktlenregistertomod(600,256)=88.transmitatleast345bytes(600-255),forexamplebyfillingthe64-bytetxfifosixtimes(384bytestransmitted).setpktctrl0.length_config=0.thetransmissionendswhenthepacketcounterreaches88.atotalof 600bytesaretransmitted.3packetfilteringinreceivemode1101supportsthreedifferenttypesofpacket-filtering;addressfiltering,maximumlengthfiltering,andcrcfiltering.3.1addressingfilteringsettingpktctrl1.adr_chktoanyothervaluethanzeroenablesthepa cketaddressfilter.thepackethandlerenginewillparethedestinatio naddressbyteinthepacketwiththeprogrammednodeaddressint headdrregisterandthe0*00broadcastaddresswhenpktctrl1.adr_ chk=10orboththe0*00and0*ffbroadcastaddresseswhenpktctrl 1.adr_chk=11.ifthereceivedaddressmatchesavalidaddress,thep acketisreceivedandwrittenintotherxfifo.iftheaddressmatchfails, thepacketisdiscardedandreceivemoderestarted(regardlessofth emcsm1.rxoff_modesetting).ifthereceivedaddressmatchesavalidaddresswhenusinginfinitep acketlengthmodeandaddressfilteringisenabled,0*ffwillbewrittenintotherxfifofollowedbytheaddressbyteandthenthepayload data.3.2maximumlengthfilteringinvariablepacketlengthmode,pktctrl0.length_config=1,thepktl en.packet_lengthregistervalueisusedtosetthemaximumallowe dpacketlength.ifthereceivedlengthbytehasalargervaluethanthi s,thepacketisdiscardedandreceivemoderestarted(regardlessoft hemcsm1.rxoff_modesetting).3.3crcfilteringthefilteringofapacketwhencrccheckfailsisenabledbysettingpktc trl1.crc_autoflush=1.thecrcautoflushfunctionwillflushtheentirer xfifoifthecrccheckfails.afterautoflushingtherxfifo,thenextstated ependsonthemcsm1.rxoff_modesetting.whenusingtheautoflushfunction,themaximumpacketlengthis6 3bytesinvariablepacketlengthmode.notethatwhenpktctrl1app end_statusisenabled,themaximumallowedpacketlengthisreduc edbytwobytesinordertomakeroomintherxfifoforthetwostatusb ytesappendedattheendofthepacket.sincetheentirerxfifoisflush edwhenthecrccheckfails,thepreviouslyreceivedpacketmustber eadoutofthefifobeforereceivingthecurrentpacket.themcumust notreadfromthecurrentpacketuntilthecrchasbeencheckedasok. 4packethandlingintransmitmodethepayloadthatistobetransmittedmustbewrittenintothetxfifo.t hefirstbytewrittenmustbethelengthbytewhenvariablepacketle ngthisenabled.thelengthbytehasavalueequaltothepayloadofth epacket(includingtheoptionaladdressbyte).ifaddressrecognitionisenabledonthereceiver,thesecondbytewrittentothetxfifomus tbetheaddressbyte.iffixedpacketlengthisenabled,thefirstbytewrittentothetxfifosho uldbetheaddress(assumingthereceiverusesaddressrecognition ).themodulatorwillfirstsendtheprogrammednumberofpreamble bytes.ifdataisavaibleinthetxfifo,themodulatorwillsendthetwo-bytes(optionally4-byte)syncwordfollowedbythepayloadinthetxfifo.ifcrcisenabled,thec hecksumiscalculatedoverallthedatapulledfromthetxfifo,andthe resultissentastwoextrabytesfollowingthepayloaddata.ifthetxfif orunsemptybeforethepletepackethasbeentransmitted,theradiowillentertxfifo_underflowstate.theonlywaytoexitthisstateisbyi ssuingansftxstrobe.writingtothetxfifoafterithasbeenunderflow edwillnotrestarttxmode.ifwhiteningisenabled,everythingfollowingthesyncwordswillbe whitened.thisisdonebeforetheoptionalfec/interleaverstage.whi teningisenabledbysettingpktctrl0.white_data=1.iffec/interleavingisenabled,everythingfollowingthesyncwords willbescrambledbytheinterleaverandfecencodedbeforebeing modulated.fecisenabledbysettingmdmcfg1.fec_en=1.5packethandlinginreceivemodeinreceivemode,thedemodulatorandpackethandlerwillsearchfo ravalidpreambleandthesyncword.whenfound,thesynchronismandwillreceivethefirstpayloadbyte.iffec/interleavingisenabled,thefecdecoderwillstarttodecodeth efirstpayloadbyte.theintrerleaverwillde-scramblethebitsbeforeanyotherprocessingisdonetothedata.ifwhiteningisenabled,thedatawillbede-whitenedatthisstage.whenvariablepacketlengthmodeisenabled,thefirstbyteisthelen gthbyte.thepackethandlerstoresthisvalueasthepacketlengthan dreceivesthenumberofbytesindicatedbythelengthbyte.iffixedp acketlengthmodeisused,thepackethandlerwillaepttheprogram mednumberofbytes.next,thepackethandleroptionallycheckstheaddressandonlycontinuesthereceptioniftheaddressmatches.ifautomaticcrccheckis enabled,thepackethandlerputescrcandmatchesitwiththeappen dedcrcchecksum.attheendofthepayload,thepackethandlerwilloptionallywhitetw oextrapacketstatusbytes(seetable27andtable28)thatcontaincrc status,linkqualityindication,andrssivalue.6packethandlinginfirmwarewhenimplementingapacketorientedradioprotocolinfirmware,t hemcuneedstoknowwhenapackethasbeenreceived/transmitte d.additionally,forpacketslongerthan64bytes,therxfifoneedstob erefilledwhiteintx.thismeansthatthemcuneedstoknowthenumb erofbytesthatcanbereadfromorwrittentotherxfifoandtxfiforesp ectively.therearetwopossiblesolutionstogetthenecessarystatusinformation:a)interruptdrivensolutionthegdopinscanbeusedinbothrxandtxtogiveaninterruptwhenas yncwordhasbeenreceived/transmittedorwhenapletepackethas beenreceived/transmittedbysettingiofgx.gdox_cfg=0*06.inad dition,therearetwoconfigurationsfortheiocfgx.gdox_cfgregiste rthatcanbeusedasaninterruptsourcetoprovideinformationonh owmanybytesthatareintherxfifoandtxfiforespectively.theiocfgx .gdox_cfg=0*02andiocfgx.gdox_cfg=0*03configurationsareas sociatedwiththetxfifo.seetable41formoreinformation.b)spipollingthepktststusregistercanbepolledatagivenratetogetinformation aboutthecurrentgdo2andgdo0valuesrespectively.therxbytesandtxbytesregisterscanbepolledatagivenratetogetinformationab outthenumberofbytesintherxfifoandtxfiforespectively.alternati vely,thenumberofbytesintherxfifoandthetxfifocanbereadfromt hechipstatusbytereturnedonthemisolineeachtimeaheaderbyte ,databyte,ormandstrobeissentonthespibus.itisremendedtoemployaninterruptdrivensolutionsincehighrate spipollingreducestherxsensitivity.furthermore,asexplainedinse ction10.3andthe1101erratanotes[4],whenusingspipolling,ther eisasmall,butfinite,probabilitythatasinglereadfromregisterspks tatus,rxbytesandtxbytesisbeingcorrupt.thesameisthecasewhen readingthechipstatusbyte.refertothetiwebsiteforswexamples([9]and[10]).数据包处理的硬件支持1101提供了对数据包导向无线协议的内置硬件支持。

相关主题