




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、; : ALL96.ASM; Author: Carl Nuzman, Hemanth Sampath, Hayden Metz, Chris Buehler,; Jonas Keating; Date:; Last revision:;*; Description: Main program: data and control for the entire receiver; Algorithm: The receiver is considered a state machine. Each state is; defined by the subroutines stored in a
2、jump table. The program;cycles through the subroutines at the sampling rate, 7200 Hz.;The receiver changes from one state to the next by rewriting the; jump table. The state changes occur when a timing counter gets;to zero or in response to signals from the transmitter.;This contains two interrupt r
3、outines.;INT1 is used in communicating between the PC and theEVM.; XINT, the transmit interrupt, is used to sample the incoming;analog signal at the sample rate and control sampling clock.;*;*; DESCRIPTION OF RESERVED AUXILARY REGISTERS;The following auxilary registers may not be modified by any;rou
4、tine other than xint:; AR3 - running count 2,1,0 , which keeps track of where we are in a baud.; AR5 - used by interrupt (xint) to write to inpbuffer.;All other aux registers may be modified by any routine. Each;routine is responsable for saving and restoring auxilary register;contents between calls
5、.;*;DATA FORMAT NOTATION; The position of the binary point in our data is indicated with; the following notation:; x:y:z indicates that there are x sign bits, y integer bits, and; z fractional bits.; Examples:; Form 1:1:15 means that the variable has 1 sign bit, 1 integer bit; and 15 fractional bits
6、.; Form 1:5:10 means that the variable has 1 sign bit, 5 integer bits; and 10 fractional bits.;*.include macros.inc; subroutines.global sym_clock.global slicer.global decode.global equalize.global eq_adapt; dual access intprog variables.global hr1.global hr2.global hr3.global hrend.global hi1.global
7、 sintab; main variables.global inpbuffer.global endbuffer; symclock variables.global NL.global NH.global TEMP0.global TEMP1.global TEMP2.global DELTAH.global DELTAL.global COUNTL.global SC_WAIT.global VN.global final.global dc_0.global dc_1.global dc_bit.global ac_0.global ac_1.global ac_2.global ac
8、_bit.global x.global L.global thresh.global SC_FIRST.global SC_AR1.global SC_AR2; equalizer variables.global N1.global eq_t0.global eq_t1.global eq_t2.global eq_t3.global sigR.global sigI.global gamma.global Mu.global Munum.global errorR .global errorI .global cospre .global sinpre .global modR .glo
9、bal modI .global cnR .global cnI .global diffR .global diffI .global k1 .global k2 .global wcT .global angle_acc .global angle_accl .global angle .global angle_inc .global twoPi .global invPi .global sl_rind .global sl_iind .global sl_ims .global sl_bits .global sl_c_ims .global tapinit; Carrier det
10、ect variables.global cdetectcdetect例程在cdetect.asm文件中.global powercalc.global power; p(n-1)form 1:15:0.global c ; 1:15:0; may be replaced by constant.global one_minus_c; 1:15:0; may be replaced by constant.global high_power; turn-on power threshold.global low_power; turn-off power threshold.global ti
11、me_over ; time power high_thresh.global time_under; time power low_thresh.global high_time; time above h.p.t. before turn-on.global low_time; time below l.p.t. before turn-off.global signal; set if signal is present; extra stuff.global bit_rate.global viterbR1,viterbR2.global viterbI1, viterbI2.glob
12、al adapt_shift.global quadrant.global descram_in.global Chrisx.global Chrisy .global pack .global pack_word; fast training variables.global fft.global inverse.global unscramble.global fast_equalise.global fr.global fi.global gr.global bitable.global ft_inv.global ft_temp.global ft_br.global ft_bi.gl
13、obal ft_maxindex.global three.global num.global den.global ans_sign.global div_disaster.global denom.global my_numerator.global stop_baby; fft data.global t0r.global t0i.global t1r.global t1i.global t2r.global t2i.global t3r.global t3i.global t4r.global t4i.global aar.global aai.global bbr.global bb
14、i.global ccr.global cci.global ddr.global ddi.global w1r.global w1i.global w2r.global w2i.global count4b.global wtable3b.global wr.global inpdebug, inpdebug2; decode data .globalrecvdata1; .globalget_new_point .globalquantize4,calculate_errors,viterbi_fill .globalget_binary_subset_label,trace_back .
15、globalprecoder_filter_imag,round_precoder_output,precoder_filter_real .globalbuild_bitstream96,rotate90_ccw,compute_ibits .globalcalc_branch_errors,unshell_map .globalupdate_path_metrics,compute_un,find_point_index,compute_xn .globalun_shell_map,quantize96 .global parm0,parm1,parm2 .globalm .globalx
16、1,y1,x2,y2 .globalerror1,error2 .globalbptr,bpts,bend,bitstream .globalznew,ci,cr,pi,pr,w,yx,yy,ytx,yty .globalpptr, stateptr, cmm, states, vt_cpm_curr, upm_finish .globalrandstat,bitbuf .globalzold,vt_ppp0,bptr,oldpptr,vt_cpm1,vt_cpm2,vt_ppp15 .globalvt_cpm_prev,bit_addr .globalbuild_bitstream96,bu
17、ild_bitstream144,build_bitstream192 .globalg2_addr,g4_addr,z8_addr,build_bitstream .globalg2,g4,z8,g2_14_19,g4_14_19,z8_14_19,q,qmask,numshell.mmregs; constants to initialize the Analog Interface Circuit (AIC);For 7200 Hz: A= 24 , B = 30 , upper cutoff frequency = 5400 Hz:aiccommand0 .set 03c78h ; s
18、et A = 24; (注釋是不是錯了,好象應(yīng)該A=30)aiccommand1 .set 00205h ; set A register to smallest levelaiccommand2 .set 03062h ; set B = 30; (注釋是不是錯了,好象應(yīng)該B=24)aiccommand3 .set 02c7hsl_unit .set 512A=30,B=24,將使A/D的采樣頻率是7200Hz,因EVM板上TLC32046的MCLK是10.368MHz10.368*106/(2*30*24)=7200Hz;*; DUAL-ACCESS MEMORY;*.sect intda
19、tahr1: .space 72*16; Real equalizer coefficients, upper word,144階hr1cen: .word 04000h ; 1:1:14 formathr1是均衡器的實系數(shù),它的各階系數(shù)的初始值除了中心點的系數(shù)是1外,其余都是0hr1plus: .space 70*16hrend: .word 0hr2: .space 144*16 ; Real equalizer coefficients, lower word; Imaginary equalizer coefficients, upper word. 1:1:14 format.; I
20、nitialized with a Hilbert transformhi1的系數(shù)的初始值是hr1系數(shù)的Hilbert變換在本文件稍后處,有一個hilbert表,表中數(shù)據(jù)和以下的hi1完全一樣, 而注釋說這是144 point hilbert transform using kaiser window, 40db attenuation, center at line 73hi1:.word00000h, 0ffeah, 00000h, 0ffedh, 00000h, 0fff8h, 00000h, 00009h.word00000h, 0001fh, 00000h, 00030h, 0000
21、0h, 00037h, 00000h, 0002dh.word00000h, 00012h, 00000h, 0ffebh, 00000h, 0ffc0h, 00000h, 0ff9dh.word00000h, 0ff92h, 00000h, 0ffa7h, 00000h, 0ffdch, 00000h, 00028h.word00000h, 00079h, 00000h, 000b7h, 00000h, 000cah, 00000h, 000a3h.word00000h, 00042h, 00000h, 0ffb7h, 00000h, 0ff22h, 00000h, 0feaeh.word0
22、0000h, 0fe87h, 00000h, 0fecah, 00000h, 0ff80h, 00000h, 00092h.word00000h, 001ceh, 00000h, 002e3h, 00000h, 00375h, 00000h, 00321h.word00000h, 0017ch, 00000h, 0fde8h, 00000h, 0f66ch, 00000h, 0d8a8h.word00000h, 02758h, 00000h, 00994h, 00000h, 00218h, 00000h, 0fe84h.word00000h, 0fcdfh, 00000h, 0fc8bh, 0
23、0000h, 0fd1dh, 00000h, 0fe32h.word00000h, 0ff6eh, 00000h, 00080h, 00000h, 00136h, 00000h, 00179h.word00000h, 00152h, 00000h, 000deh, 00000h, 00049h, 00000h, 0ffbeh.word00000h, 0ff5dh, 00000h, 0ff36h, 00000h, 0ff49h, 00000h, 0ff87h.word00000h, 0ffd8h, 00000h, 00024h, 00000h, 00059h, 00000h, 0006eh.wo
24、rd00000h, 00063h, 00000h, 00040h, 00000h, 00015h, 00000h, 0ffeeh.word00000h, 0ffd3h, 00000h, 0ffc9h, 00000h, 0ffd0h, 00000h, 0ffe1h.word00000h, 0fff7h, 00000h, 00008h, 00000h, 00013h, 00000h, 00016hhi2: .space 144*16 ;Imaginary equalizer coefficients, lower word; pad out to next data page .space 64*
25、16;*; INTERNAL DATA MEMORY;*.data;-data page 2 and 3-;main routine variablesmain_page0.set2main_page1.set 3disaster: .word 0 .space 20*16testxf: .word 0int_AR4: .word 0int_called: .word 0; circular buffer for storing received samples. 144 samples longinpbuffer: .word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
26、0,0,0,0,0,0,0,0 .word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .word 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0endbuffer: .word
27、0.space 88*16;-;-DATA PAGE 4-;symbol clock recovery variables;-;sc_page0.set 4eq_page0.set 4;q15 format, inverse magnitude squared of constellation pointssl_ims:.word04000h, 00ccch, 004ech, 0028fh, 0018fh, 0010ch.word00ccch, 0071ch, 003c3h, 00234h, 0016ch, 000fch.word004ech, 003c3h, 0028fh, 001bah,
28、00135h, 000e0h.word0028fh, 00234h, 001bah, 0014eh, 000fch, 000c0h.word0018fh, 0016ch, 00135h, 000fch, 000cah, 000a2h.word0010ch, 000fch,000e0h, 000c0h, 000a2h, 00087h;sl_ims是對稱的, 第一行的值和第一列的值相等, 第二行的值和第二列的值也相等.;這些數(shù)的格式到底是1:0:15還是1:1:14呢?NL: .word 0,0,0NH: .word 0,0,0TEMP0: .word 0TEMP1: .word 0TEMP2:
29、.word 0DELTAH: .word 0DELTAL: .word 0COUNTL:.word 012c0h ; 2 second counter12c0h=4800, 在sc.asm中每一個符號(1/2400秒), countl將減1, 所以4800/2400=2, 當(dāng)countl減到0時, 表示過了2秒SC_WAIT: .word 1;SC_WAIT的初始值為1表示未達到符號同步VN: .word 0final: .word 0dc_0:.word 0dc_1:.word 0dc_bit: .word 0ac_0:.word 0ac_1:.word 0ac_2:.word 0ac_bi
30、t: .word 0x: .word 0L:.word 0018h ; threshold value for random walk filterthresh: .word 0SC_FIRST: .word 1SC_AR0:.word 0SC_AR1:.word 0SC_AR2:.word 0SC_AR4:.word 0SC_AR6:.word 0SC_AR7:.word 0SC_AR22:.word 0;-;equalizer variables;-N1:.word 144eq_t0: .word 0eq_t1: .word 0eq_t2: .word 0eq_t3:.word 0sigR
31、:.word 0 ; form= 1:15:0sigI: .word 0 ; form= 1:15:0; use 1:1:14 format:gamma:.word 02fffhMu:.word 01000h ; form = 1:1:14Munum: .word 040d0h ; 7 second delayerrorR:.word 0 ; form: 1:4:11errorI: .word 0 ; form : 1:4:11cospre: .word 0 ; form : 1:1:14 sinpre: .word 0 ; form : 1:1:14 為什么cospre和sinpre會都是0
32、呢? 難道不應(yīng)該一個是0,一個是1嗎?modR: .word 0 ; form : 1:4:11modI: .word 0 ; form : 1:4:11cnR: .word 0cnI: .word 0diffR: .word 0 ; form : 1:4:11diffI: .word 0 ; form : 1:4:11k1: .word 00400hk2: .word 00040h ; form : 1:1:14wcT: .word 025b2h ; form : 1:4:11 ; 3*Pi/2angle_acc: .word 0angle_accl: .word 0angle: .word
33、 0angle_inc: .word 0twoPi: .word 03243h ; form 1:4:11 ; 2*PiinvPi: .word 028beh ; 1/Pi form 1:0:15sl_rind.word0; real indexsl_iind .word0; imaginary indexsl_bits .word 0sl_c_ims .word 0tapinit.word 0;-;carrier detect variables;-power.word 0c.word 07a00h;form 1:0:15one_minus_c.word 00600h;form 1:0:15
34、high_power.word 00040h ; threshold to turn on recieverform=1:15:0 (64)low_power.word 00020h ; threshold to turn off receiverform=1:15:0 (32)time_over.word 0time_under.word 0;high_time.word 360high_time.word 60low_time.word 96;96/9600=0.01s=10mssignal.word 0xycount.word 0ysend.word 0;-;other variable
35、s;-lvltst.word 0bit_rate_start .set 3bit_rate.word bit_rate_startviterbR2.word 0 ; input to viterbi decoderviterbI2 .word 0viterbR1.word 0viterbI1.word 0adapt_shift.word adapt_shift_startadapt_shift_start .set 1 ;0quadrant.word 0descram_in.word 0Chrisx.word 0Chrisy.word 0pack_word.word 0,0 ; latest
36、32 received bits.space 0*16;-; -DATA PAGE 5-;-; PC-EVM interface variables;-debug_temp.word 0debug_buffer.space 12*16int1data:; table of routines PC can callint1jtable:.word sendx, sendy, readhr, readhi, readp, scaleup, scaledn.word readdb, readb, data_to_PC,readbb,badcommandi1comm .word 0i1commadd.
37、word badcommandysave:.word 0filtadd:.word 0filtr:.word hr1filti:.word hi1i1saveAR0:.word 0bitptr:.word bitbuftcont:.word 030hMAXCOMMAND:.set 11 ; number of routines in int1jtable;-; main control variables;-mainjtable:.space 24*16maincounter:.word 0timing_count:.word 0timing_count2: .word 0randstat.w
38、ord 0, 0;bitbuf.word 0ffffh,0ffffh,0ffffh,0ffffhshoot.word 0;-; fast training data;-ft_inv: .word 0ft_temp: .word 0ft_br: .word 0ft_bi: .word 0ft_maxindex: .word 0three: .word 3num: .word 0den: .word 0ans_sign: .word 0div_disaster .word 0 ; divide by zero warning flagdenom:.word 0my_numerator.word 0
39、0040h ; Shift up to increase output from ; equation A8. Shift down to decrease ; it. (See fast.asm).;-;fft variables;-t0r.word 0t0i .word 0t1r.word 0t1i.word 0t2r.word 0t2i.word 0t3r.word 0t3i.word 0t4r.word 0t4i.word 0aar.word 0aai .word 0bbr.word 0bbi.word 0ccr.word 0cci.word 0ddr.word 0ddi.word 0
40、w1r.word 0w1i.word 0w2r.word 0w2i.word 0count4b.word 0wtable3b .word 0, 0,48,96,96,48 .word 16,32,64,128,112,80 .word 32,64,80,16,128,112.space 11*16;*; EXTERNAL DATA MEMORY;*.sect extdatapcum:.space 205*16;-; 144 point hilbert transform using kaiser window, 40db attenuation; center at line 73; 1:1:
41、14 format;-hilbert:.word00000h, 0ffeah, 00000h, 0ffedh, 00000h, 0fff8h, 00000h, 00009h.word00000h, 0001fh, 00000h, 00030h, 00000h, 00037h, 00000h, 0002dh.word00000h, 00012h, 00000h, 0ffebh, 00000h, 0ffc0h, 00000h, 0ff9dh.word00000h, 0ff92h, 00000h, 0ffa7h, 00000h, 0ffdch, 00000h, 00028h.word00000h,
42、00079h, 00000h, 000b7h, 00000h, 000cah, 00000h, 000a3h.word00000h, 00042h, 00000h, 0ffb7h, 00000h, 0ff22h, 00000h, 0feaeh.word00000h, 0fe87h, 00000h, 0fecah, 00000h, 0ff80h, 00000h, 00092h.word00000h, 001ceh, 00000h, 002e3h, 00000h, 00375h, 00000h, 00321h.word00000h, 0017ch, 00000h, 0fde8h, 00000h,
43、0f66ch, 00000h, 0d8a8h.word00000h, 02758h, 00000h, 00994h, 00000h, 00218h, 00000h, 0fe84h.word00000h, 0fcdfh, 00000h, 0fc8bh, 00000h, 0fd1dh, 00000h, 0fe32h.word00000h, 0ff6eh, 00000h, 00080h, 00000h, 00136h, 00000h, 00179h.word00000h, 00152h, 00000h, 000deh, 00000h, 00049h, 00000h, 0ffbeh.word00000
44、h, 0ff5dh, 00000h, 0ff36h, 00000h, 0ff49h, 00000h, 0ff87h.word00000h, 0ffd8h, 00000h, 00024h, 00000h, 00059h, 00000h, 0006eh.word00000h, 00063h, 00000h, 00040h, 00000h, 00015h, 00000h, 0ffeeh.word00000h, 0ffd3h, 00000h, 0ffc9h, 00000h, 0ffd0h, 00000h, 0ffe1h.word00000h, 0fff7h, 00000h, 00008h, 00000h, 00013h, 00000h, 00016h; fast training data spacefr: .space 144*16fi:.space 144*16gr: .space 144*16;-; 48-point fft of V.34 standard PP sequence V.34的標(biāo)準周期序列的fft?;-bitable:.word01800h, 00ddbh, 0199ah, 00a9ah, 01bb6h, 00000h, 015fch, 0ef22h.word017ffh, 00ddbh, 01b79h, 0fc62h, 00ddbh, 0e800h,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 人教A版高一(下)數(shù)學(xué)必修第二冊6.2.3向量的數(shù)乘運算【教學(xué)設(shè)計】
- 六年級上冊數(shù)學(xué)教案:第2單元-第5課時 分數(shù)混合運算練習(xí)(2) 北師大版
- 《上學(xué)時間》(教案)2024-2025學(xué)年數(shù)學(xué)二年級下冊
- 一年級數(shù)學(xué)下冊教案-4.3 動手做(二)2-北師大版
- 《找規(guī)律》(教案)三年級下冊數(shù)學(xué)北師大版
- 一年級上數(shù)學(xué)教案-認識物體(7)-西師大版
- 第十章浮力單元教學(xué)設(shè)計 2023-2024學(xué)年人教版八年級下冊物理
- 2024年人工心肺機項目資金籌措計劃書代可行性研究報告
- 河北隆化縣第二中學(xué)人教版八年級上冊歷史與社會第三單元第一課 秦始皇開創(chuàng)大一統(tǒng)教學(xué)設(shè)計
- 2025年吉林省延邊朝鮮族自治州單招職業(yè)適應(yīng)性測試題庫審定版
- 部編版八年級物理(上冊)期末試卷(帶答案)
- NB-T10342-2019水電站調(diào)節(jié)保證設(shè)計導(dǎo)則
- 當(dāng)代世界經(jīng)濟與政治 第八版 課件 第四章 發(fā)展中國家的經(jīng)濟與政治
- 平面構(gòu)成(普通高等院校藝術(shù)設(shè)計專業(yè))全套教學(xué)課件
- DZ∕T 0289-2015 區(qū)域生態(tài)地球化學(xué)評價規(guī)范(正式版)
- 2020年5月天津高考英語聽力試題-(試題+MP3+答案)-
- DB32T 4400-2022《飲用水次氯酸鈉消毒技術(shù)規(guī)程》
- 學(xué)校校園禁煙處罰管理方案
- 少兒美術(shù)教育知識講座
- 外科學(xué)教學(xué)課件:頸、腰椎退行性疾病
- 2023-2024屆高考語文復(fù)習(xí)小說訓(xùn)練(含答案)-孫犁《風(fēng)云初記》
評論
0/150
提交評論