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

📄 tonegen.lst

📁 基于TMS320C54X的语音处理源码(输入语音数据)。
💻 LST
📖 第 1 页 / 共 2 页
字号:
     183            ;       programs execution.  Since we will be servicing the 
     184            ;       synchronous serial port TRANSMIT interrupt in this program, we
     185            ;       place a branch instruction at location 0Ah that points to the 
     186            ;       xmitIsr function.  All other interrupt vectors branch to the 
     187            ;   the reset vector at location 0 which will effectively restart
     188            ;   the monitor.
     189            ;
     190 0000                       .text
     191            
     192 0000 7980                  b       0000h                   ;00; restart the monitor
         0001 0000  
     193 0002 7980                  b       0000h                   ;02; restart the monitor
         0003 0000  
     194 0004 7980                  b       0000h                   ;04; restart the monitor
         0005 0000  
     195 0006 7980                  b   0000h                   ;06; restart the monitor
         0007 0000  
     196 0008 7980                  b       0000h                   ;08; restart the monitor
         0009 0000  
     197 000a 7980                  b       xmitIsr                 ;0a; restart the monitor
         000b 006b' 
     198 000c 7980                  b       0000h                   ;0c; restart the monitor
         000d 0000  
     199 000e                       .space 2*16                 ;0e; Reserved Space
     200 0010 7980                  b       0000h                   ;10; restart the monitor
         0011 0000  
     201 0012 7980                  b       0000h                   ;12; restart the monitor
         0013 0000  
     202 0014 7980                  b       0000h                   ;14; restart the monitor
         0015 0000  
     203 0016 7980                  b       0000h                   ;16; restart the monitor
         0017 0000  
     204 0018 7980                  b       0000h                   ;18; restart the monitor
         0019 0000  
     205 001a 7980                  b       0000h                   ;1a; restart the monitor
         001b 0000  
     206 001c 7980                  b       0000h                   ;1c; restart the monitor
         001d 0000  
     207 001e 7980                  b       0000h                   ;1e; restart the monitor
TMS320C1x/C2x/C2xx/C5x COFF Assembler       Version 6.60     Sat Dec 22 17:29:53 2001
Copyright (c) 1987-1995  Texas Instruments Incorporated 

Include file with I/O register declarations                          PAGE    5

         001f 0000  
     208 0020 7980                  b       0000h                   ;20; restart the monitor
         0021 0000  
     209 0022 7980                  b       0000h                   ;22; restart the monitor
         0023 0000  
     210 0024 7980                  b       0000h                   ;24; restart the monitor
         0025 0000  
     211 0026                       .space 2*16                 ;26; Reserved Space
     212 0028 7980                  b       0000h                   ;28; restart the monitor
         0029 0000  
     213 002a 7980                  b       0000h                   ;2a; restart the monitor
         002b 0000  
     214 002c 7980                  b       0000h                   ;2c; restart the monitor
         002d 0000  
     215 002e 7980                  b       0000h                   ;2e; restart the monitor
         002f 0000  
     216 0030 7980                  b       0000h                   ;30; restart the monitor
         0031 0000  
     217 0032 7980                  b       0000h                   ;32; restart the monitor
         0033 0000  
     218 0034 7980                  b       0000h                   ;34; restart the monitor
         0035 0000  
     219 0036 7980                  b       0000h                   ;36; restart the monitor
         0037 0000  
     220 0038 7980                  b       0000h                   ;38; restart the monitor
         0039 0000  
     221 003a 7980                  b       0000h                   ;3a; restart the monitor
         003b 0000  
     222 003c 7980                  b       0000h                   ;3c; restart the monitor
         003d 0000  
     223 003e 7980                  b       0000h                   ;3e; restart the monitor
         003f 0000  
     224            
     225            ;
     226            ;       ======== start ========
     227            ;
     228            ;       This is the main entry point for the program and is responsible 
     229            ;       for configuring the DSP before allowing the SSP interrupts 
     230            ;       to be serviced. 
     231            ;
     232            
     233 0040 be41  start:          setc    intm                            ; INTM = 1, disable global interrupts
     234 0041 be44                  clrc    cnf                                     ; CNF = 0,  map DARAM to data space (0x200-0x2ff
     235 0042 be47                  setc    sxm                                     ; SXM = 1, use sign extension mode
     236 0043 be42                  clrc    ovm                                     ; OVM = 0, results overflow normally in accumula
     237 0044 bf01                  spm             1                                       ; set ALU to handle fractional multiplic
     238            
     239 0045 bc06                  ldp             #06h                    ; use the DARAM block with Direct Addressing
     240            
     241 0046 ae01"                 splk    #0000h, data2aic        ; data2aic = 0
         0047 0000  
     242            
     243                            ; set all wait-states to zero
     244 0048 ae00"                 splk    #0000h, cinfo           ; cinfo = 0
         0049 0000  
TMS320C1x/C2x/C2xx/C5x COFF Assembler       Version 6.60     Sat Dec 22 17:29:53 2001
Copyright (c) 1987-1995  Texas Instruments Incorporated 

Include file with I/O register declarations                          PAGE    6

     245 004a 0c00"                 out             cinfo, WSGR                     ; Set all wait states to zero
         004b fffc  
     246            
     247                            ; setup the Sync Serial Port
     248 004c ae00"                 splk    #SSPCFG1, cinfo         ; place the ssp into reset and set it
         004d 4000  
     249 004e 0c00"                 out             cinfo, SSPCR            ; up for continuous mode operation.
         004f fff1  
     250 0050 ae00"                 splk    #SSPCFG2, cinfo
         0051 4c30  
     251 0052 0c00"                 out             cinfo, SSPCR            ; take the ssp out of reset
         0053 fff1  
     252            
     253                            ; reset the AIC so any old settings get wiped out
     254 0054 af00"                 in      cinfo, IOSR         ; read IOSR
         0055 fff6  
     255 0056 6900"                 lacl    cinfo               ; acc = cinfo
     256 0057 bfb0                  and     #0fff7h             ; make IO3 = 0
         0058 fff7  
     257 0059 9000"                 sacl    cinfo               ; store acc to cinfo
     258 005a 0c00"                 out     cinfo, IOSR         ; write to IOSR, put AIC in reset
         005b fff6  
     259            
     260 005c af00"                 in      cinfo, IOSR         ; read IOSR
         005d fff6  
     261 005e 6900"                 lacl    cinfo               ; acc = cinfo
     262 005f bfc0                  or      #08h                ; make IO3 = 1
         0060 0008  
     263 0061 9000"                 sacl    cinfo               ; store acc to cinfo
     264 0062 0c00"                 out     cinfo, IOSR         ; write to IOSR, take AIC out of reset
         0063 fff6  
     265            
     266                            ; unmask required interrupts
     267 0064 bc00                  ldp     #0h                             ; set data page pointer
     268 0065 ae04                  splk    #EN_XINT | EN_TXRXINT, IMR      ; enable the XINT interrupts
         0066 0030  
     269                                                                    ; also enable the TXRXINT (Async Serial Port)
     270                                                                    ; interrupt (required by the monitor)
     271 0067 be40                  clrc    intm                            ; enable global interrupts
     272            
     273 0068 be22  loop:   idle                                            ; enter loop and allow DSP to process
     274 0069 7980                  b               loop                    ; XINT interrupts
         006a 0068' 
     275                            
     276            
     277            ;       ======== xmitIsr ========
     278            ;
     279            ;       This is the interrupt service routine called when the transmit
     280            ;       FIFO of the F206 is empty (something needs to be sent).  It
     281            ;       will write data to the transmit FIFO which will send it back out to the
     282            ;       TLC320AC02C audio codec.  Also this is the routine that will generate
     283            ;       the actual sine wave data.
     284            ;
     285            
     286 006b       xmitIsr:  
TMS320C1x/C2x/C2xx/C5x COFF Assembler       Version 6.60     Sat Dec 22 17:29:53 2001
Copyright (c) 1987-1995  Texas Instruments Incorporated 

Include file with I/O register declarations                          PAGE    7

     287 006b bc06                  ldp             #06h                            ; set data page pointer
     288            
     289                            ; start calculating sine wave data
     290 006c bf08                  lar             ar0, #(COEFFS+2)        ; ar0 = COEFFS+2
         006d 0004" 
     291 006e b200                  lar             ar2, #0000h                     ; ar2 = 0
     292 006f 8b8a                  mar             *, ar2                          ; ARP = ar2
     293 0070 bf80                  lacc    #0                                      ; acc = 0
         0071 0000  
     294 0072 8be0                  mar             *0+                                     ; ar2 += ar0
     295 0073 3f90                  sub             *-, 15                          ; ah = -(1/2)*y(n-2)
     296 0074 7780                  dmov    *                                       ; y(n-2) = y(n-1)
     297 0075 7390                  lt              *-                                      ; TREG = y(n-1)
     298 0076 54a0                  mpy             *+                                      ; PREG = coeff*y(n-1)
     299 0077 be04                  apac                                            ; ah = coeff*y(n-1) - (1/2)*y(n-2)
     300 0078 be09                  sfl                                                     ; ah = 2*coeff*y(n-1) - (1/2)*y(n-2)
     301 0079 9880                  sach    *                                       ; y(n-1) = ah
     302 007a 9801"                 sach    data2aic                        ; data2aic = y(n)
     303                            ; sine wave calculation complete
     304            
     305 007b 6901"         lacl    data2aic                        ; acc = data2aic
     306 007c bfb0                  and             #0fffch                         ; need to keep control bits set to 0
         007d fffc  
     307 007e 9001"                 sacl    data2aic                        ; store acc to data2aic
     308 007f 0c01"                 out             data2aic,  SDTR         ; send the sine wave data to the AIC
         0080 fff0  
     309            
     310 0081 bc00                  ldp             #0h                                     ; set data page pointer
     311 0082 be40                  clrc    intm                            ; re-enable global interrupts
     312 0083 ae06                  splk    #CLR_XINT, IFR          ; mark the interrupt as serviced 
         0084 002f  
     313 0085 ef00                  ret                                                     ; return to caller
     314            
     315                            .end                                            ; signify end of program

 No Errors,  No Warnings

⌨️ 快捷键说明

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