关闭

关闭

关闭

封号提示

内容

首页 spdif.pdf

spdif.pdf

spdif.pdf

上传者: peter 2011-10-10 评分 0 0 0 0 0 0 暂无简介 简介 举报

简介:本文档为《spdifpdf》,可适用于IT/计算机领域,主题内容包含SPDIFSpecificationAuthor:GeirDrangegedraopencoresorgRevJuly,OpenCoresSPDIF符等。

SPDIFSpecificationAuthor:GeirDrangegedraopencoresorgRevJuly,OpenCoresSPDIFInterfacewwwopencoresorgReviiThispagehasbeenintentionallyleftblankOpenCoresSPDIFInterfacewwwopencoresorgReviiiRevisionHistoryRevDateAuthorDescriptionGeirDrangeFirstDraftGeirDrangeUpdatedGeirDrangeRenamedgenericsandmodifiedreceiverconfigurationregisterGeirDrangeCorrectedafewtypo’sGeirDrangeChangedtwointerruptsintransmitterGeirDrangeCorrectedsometypo’sGeirDrangeFinalcorrectionsbeforereleaseOpenCoresSPDIFInterfacewwwopencoresorgRevivContentsSPDIFRECEIVERSPDIFTRANSMITTERRECEIVERResettingCaptureregistersEnablereceiverTransferringdataTRANSMITTERResettingSelectingtransmitdatarateSelectingdataformatSettingupchannelstatusbitsSettingupuserdatabitsPreparingsamplebufferStarttransmissionGENERICSFORBOTHTRANSMITTERANDRECEIVERGENERICSFORTHERECEIVERGENERICSFORTHETRANSMITTERSPDIFRECEIVERReceiverregistersoverviewRxVersion–DescriptionRxConfig–DescriptionRxStatus–DescriptionRxIntMask–DescriptionRxIntStat–DescriptionChStCap<n>–DescriptionChStData<n>–DescriptionReceivesampledata–DescriptionSPDIFTRANSMITTERTransmitterregistersoverviewTxVersion–DescriptionTxConfig–DescriptionTxChStat–DescriptionTxIntMask–DescriptionTxIntStat–DescriptionUserData–DescriptionChStat–DescriptionTransmitsampledata–DescriptionOpenCoresSPDIFInterfacewwwopencoresorgRevvWISHBONEINTERFACESIGNALS(RECEIVERTRANSMITTER)SPDIFRECEIVERSIGNALSSPDIFTRANSMITTERSIGNALSOpenCoresSPDIFInterfacewwwopencoresorgRevofIntroductionTheSPDIF(orAESEBU,IECstandards)isapointtopointprotocolforserialtransmissionofdigitalaudiothroughasingletransmissionlineThetransmissionmediumcanbeeitherelectricaloroptical(egTosLink)Itprovidestwochannelsforaudiodata,amethodforcommunicatingcontrolinformation,andsomeerrordetectioncapabilitiesThecontrolinformationistransmittedasonebitpersampleandaccumulatesinablockstructureThedataisbiphaseencoded,whichenablesthereceivertoextractaclockfromthedataCodingviolations,definedaspreambles,areusedtoidentifysampleandblockboundariesSPDIFinterfacesarefoundonmostCDDVDplayers,audioequipmentandcomputersoundcardsOpenCoresSPDIFInterfacewwwopencoresorgRevofArchitectureTheSPDIFinterfaceconsistsoftwoseparatecores,atransmitterandareceiverSPDIFReceiverThereceiverarchitectureisshownbelowFigure:ReceiverBlockDiagramWishboneBusInterruptSPDIFInRegistersPhasedetectorDatacaptureregistersFramedecoderSamplebufferSampleextractorOpenCoresSPDIFInterfacewwwopencoresorgRevofThebiphaseencodedSPDIFsignalisdecodedbyanoversamplingphasedetectorThewishbonebusclockisusedtosampletheinputsignal,andmustbeatleasttimeshigherthanthenSPDIFdatarateThelowestSPDIFbitratesupportediskHzAframedecoderlocksontothecodeviolations(preambles)thatmarkthestartofframesandsubframesAudiodataisextractedandplacedintothesamplebufferThesizeofthesamplebufferisdeterminedbytheWishboneaddressbuswidthMinimumsamplebuffersizeisbytesThesamplebufferisaddressedbysettingthemostsignificantaddressbitto‘’Thesamplebufferisdividedintwoequalparts,lowerandupper,andtheuserwillbenotifiedwheneitherisfilledwithaudiodataSubframestatusbitscanoptionallybeincludedinthesamplebufferSPDIFTransmitterThetransmitterarchitectureisshownbelowFigure:TransmitterBlockDiagramThesubframeassemblercreatesbitdatawordsfromsampledata,registersettingsandoptionallychannelstatususerdatabuffersAparitybitisaddedineachsubframeTheframeassembleraddspreamblestocreateaframeoftwosubframesframesadduptoablockTheblockstructureisbiphaseencodedbeforetransmittingWishboneBusInterruptSPDIFoutRegistersPhaseencoderChannelstatususerdatabuffersFrameassemblerSamplebufferSubframeassemblerBuffercopyOpenCoresSPDIFInterfacewwwopencoresorgRevofThesizeofthesamplebufferisdeterminedbytheWishboneaddressbuswidthMinimumsamplebuffersizeisbytesThesamplebufferisaddressedbysettingthemostsignificantaddressbitto‘’Thesamplebufferisdividedintwoequalparts,lowerandupper,andtheuserwillbenotifiedwheneitherisemptiedofaudiodataChannelstatuscanbegeneratedfromadedicatedbitbufferTwointerruptscanbegeneratedwhenthetransmitterreadsfromthebuffer,oneinthemiddleandoneattheendTheuserdatabufferoperatesinanidenticalwayOpenCoresSPDIFInterfacewwwopencoresorgRevofOperationThischaptercontainsoperationalguidelinesforthecoresReceiverSomefeaturesarenotavailablewhenthecoreissynthesizedinbitmodeResettingExceptfortheWishbonereset,thereceivercanbedisabledbyclearingtheRXENbitintheRxConfigregisterCaptureregistersBeforethereceiverisenabled,thecaptureregistersshouldbesetuptocapturebitfieldsofinterest,likesamplefrequency(bitinconsumermode)EnablereceiverSetRXENbitinRxConfigregistertoenablethereceiverThenwaituntiltheLOCKbitissetintheRxStatusRegisterExaminetheotherstatusbitsinRxStatusregistertoidentifythetypeofsignalbeingreceived,andsetuptheotherbitsintheRxConfigregisterFinallysettheSAMPLEbittostartdatatransfertothesamplebuffersTransferringdataThebestwaytoreadoutdataistosetupaninterrupttobegeneratedwhenthelowerorupperbufferisfull,andthenexecuteablockreadofthedataTransmitterResettingExceptfortheWishbonereset,thetransmittercanbedisabledbyclearingtheTXENbitintheTxConfigregisterOpenCoresSPDIFInterfacewwwopencoresorgRevofSelectingtransmitdatarateThedatarateoftheSPDIFsignalisafunctionoftheWishbonebusclockandtheRATIObitsintheTxConfigregisterThebitrateistimesthesamplingfrequency–eachsampleisencodedasbitsandtherearetwochannelsSamplefrequencyisgivenbythefollowingequation:)(=RATIOfrequencyclockWishboneSfreqExample:DatarateiskHzandWishboneclockfrequencyisMHzTheRATIObitsmustthenbesettoOutputdatarateisMbpsSelectingdataformatIftheWishbonedatabusisbit,itisonlypossibletosendbitaudiodataInbitmode,anysampleresolutionfromtobitcanbetransmittedDataformatisselectedbytheMODEbitsintheTxConfigregisterSettingupchannelstatusbitsIfoutputformatisstandardconsumeraudio,setCHSTENtoinTxConfig,andsetTxChStattodesiredformatOtherwisesetuptheChStatusbufferwithdesiredchannelstatusdata(bits)Ifthechannelstatusbitsarenotchangingfromblocktoblock,itisonlynecessarytoprogramthebufferonceOtherwisetheHCSBFLCSBFbitsinTxIntMaskmustbeset,andthebufferwillneedtobeupdatedforeveryhalfblocktransmittedSettingupuserdatabitsUserdatabitsarenormallysettozero,butifrequireduserdatacanbetransmittedusingtheUserDatabufferIftheuserdatabitsarenotchangingfromblocktoblock,itisonlynecessarytoprogramthebufferonceOtherwisetheHCSBFLCSBFbitsinTxIntMaskmustbeset,andthebufferwillneedtobeupdatedforeveryblockPreparingsamplebufferBeforetheTXDATAbitinTxConfigisset,fillupthecompletesamplebufferwithaudiodataThetransmitterwillgenerateaninterruptwhenlowerhalforupperhalfofsamplebufferisemptied,StarttransmissionTransmissionofSPDIFsignalstartswhentheTXENbitinTxConfigissetIfTXDATAbitisnotset,thetransmitteddatawillbeallzeroeswiththesubframevaliditybitsetOpenCoresSPDIFInterfacewwwopencoresorgRevofOncetheTXDATAbitisset,audiodatafromthesamplebufferwillbetransmittedandthevaliditybitisclearedOpenCoresSPDIFInterfacewwwopencoresorgRevofGenericsTheSPDIFinterfacehasanumberofgenericsthatcanbeusedtotailortheinterfaceforvariousneedsGenericsforbothtransmitterandreceiverNameTypeRangeDescriptionDATAWIDTHIntegerWishbonedatabuswidthIfusingbitbus,somefunctionalityislostADDRWIDTHIntegerWishboneaddressesbuswidthThesamplebufferoccupieshalftheaddressrangeTable:GenericsfortransmitterandreceiverGenericsforthereceiverNameTypeRangeDescriptionCHSTCAPTUREInteger–SpecifiesthenumberofchannelstatuscaptureregistersOnlyapplicableinbitmodeWISHBONEFREQNaturalWishBonebusfrequencyinMHzThisgenericisusedtooptimizethephasedetectorTable:GenericsforreceiverGenericsforthetransmitterNameTypeRangeDescriptionUSERDATABUFInteger–:Nouserdatabufferisgenerated:UserdatabufferisgeneratedCHSTATBUFInteger–:Nochannelstatusdatabufferisgenerated:ChannelstatusdatabufferisgeneratedTable:GenericsfortransmitterOpenCoresSPDIFInterfacewwwopencoresorgRevofRegistersThissectionspecifiesallinternalregistersoftheSPDIFinterfaceSPDIFReceiverReceiverregistersoverviewNameAddressWidthAccessDescriptionRxVersionxRVersionregisterRxConfigxRWConfigurationregisterRxStatusxRSignalStatusRegisterRxIntMaskxRWInterruptmaskregisterRxIntStatxRWInterruptstatusregisterThefollowingregistersareoptionaldependingonthevalueofCHSTCAPTUREChStCapxRWChannelstatuscaptureregisterChStDataxRChannelstatusdataregisterChStCapxRWChannelstatuscaptureregisterChStDataxRChannelstatusdatadataregisterChStCapxRWChannelstatuscaptureregisterChStDataxRChannelstatusdatadataregisterChStCapxRWChannelstatuscaptureregisterChStDataxRChannelstatusdatadataregisterChStCapxRWChannelstatuscaptureregisterChStDataxRChannelstatusdatadataregisterChStCapxaRWChannelstatuscaptureregisterChStDataxbRChannelstatusdatadataregisterChStCapxcRWChannelstatuscaptureregisterChStDataxdRChannelstatusdatadataregisterChStCapxeRWChannelstatuscaptureregisterChStDataxfRChannelstatusdatadataregisterTable:ReceiverregistersOpenCoresSPDIFInterfacewwwopencoresorgRevofRxVersion–DescriptionTheversionregisterallowstheSWtoreadoutalltheparameterthat’swasusedtogeneratethereceiverBit#AccessNameDescriptionUnusedCAPNOThevalueofCHSTCAPTUREUnusedADRWThevalueofADDRWIDTHDATW:DATAWIDTHisbit:DATAWIDTHisbitRVERSPDIFVersionnumber=ResetValue:RxVersion:DependsongenericsRxConfig–DescriptionTheconfigurationregistercontrolstheoperationofthereceiverBit#AccessNameDescriptionRUnusedRWBLKEN:Donotuseblockboundarymarking:MarkthefirstsampleineachblockwithainbitMODE:Storesamplesasbit:Storesamplesasbit:Storesamplesasbit:Storesamplesasbit:Storesamplesasbit:Storesamplesasbit:Storesamplesasbit:Storesamplesasbit:Storesamplesasbit:ReservedPAREN:Donotstoreparitybit:StoreparitybitinbitinsamplebufferSTATEN:Donotstorechannelstatusbit:StorechannelstatusbitinbitinsamplebufferUSEREN:Donotstoreuserdatabit:StoreuserdatabitinbitinsamplebufferRWVALEN:Donotstorevaliditybit:StorevaliditybitinbitinsamplebufferRUnusedOpenCoresSPDIFInterfacewwwopencoresorgRevofBit#AccessNameDescriptionVALID:SampledatastoredinbuffersregardlessofsubframeValiditybit:SampledatastoredonlywhensubframeValiditybitisCHAS:RxStatusregisterholdsstatusfromchannelB:RxStatusregisterholdsstatusfromchannelARINTEN:Interruptoutputisdisabled:InterruptoutputisenabledSAMPLE:Nodataisstoredinthesamplebuffer:DataisstoredinthesamplebufferRWRXEN:Receiverisdisabled:ReceiverisenabledResetValue:RxCo

用户评论(0)

0/200

精彩专题

上传我的资料

每篇奖励 +2积分

资料评价:

/26
0下载券 下载 加入VIP, 送下载券

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部