ebook img

BSTJ 60: 7. September 1981: Digital Signal Processor: Software Simulator. (Aagesen, J.) PDF

3.2 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview BSTJ 60: 7. September 1981: Digital Signal Processor: Software Simulator. (Aagesen, J.)

Digital Signal Processor: Software Simulator By J. AAGESEN (atanusript nove sine 29, 960) One ofthe development aus forthe digital signal processor (us?) fs w software simulator, dspeim, which rans interactively under the UNIX" aerating aster, Lisa programe debuaging tool which can be used without access tothe DSP hardioare environment. Te allows ‘he user to monitor run-time characteristics of DSP programs whick cannot be observed using the device itself is very flexible m roviding capabilites or single or maliple program stopping, setting ‘and modivine conditional brealyiats, examining register contents ‘and wenerating data plote on the terminal 1. wtRoDUCTION [A number of development tools ve been designe forthe single hip digital signal processor (bat). This article deneribes software malar for the BS, dapeim, which runs under the UINZX operating ‘system, The simulator provides an incerative program development tnd debuering facility which operates exclusively in the UNIX envi- ‘ronment with no need for the Ds and aseociated hardware It include fponeralinpaoutput handling and offers great exbiity in is ability {0 acces region, at breakpoints, and take specified wetion when prestribed condivione are met Also, i has the eapobity of printing x ‘Files on the terminal. Execution ca be inberaplal wt any Line for “bservation of reginter content, change in breakpoint conditions et. ffier which execution can be recumul without loss of enntinuty Creation of program is fecliteted hy the DaP assembler? which gen- trates @ file that the simulator ean Toad direcly ino ils progeara 475 rmeory. Dingnwstie messages smu printed in responce to xzoneous ‘operations anil special OS condons. "This paper covers the achileciareof the amelator, the handling of par eonditional aura instructions, and a discuscion of the simulator ‘mnmands, Te concludes with a brief terminal session iustrating the ‘aperation of the azulator A bck diagram of depen i shown i Fig.l The use box represents the sirmulacion of the basic Dsr architecture as deecribed in Ref. 1, excloding the ext and the nox. ‘The operation of the simulator ic tontrlled by che simulator executive ayatem shich interpre com mands and invokes roquinsl wily routines, A number of ies re sevocated wih the simulator, Thu Rad fil correspond othe radon seeess memory ofthe bse, The program fie Wom) provides the read only memory fureton. The input stuck (s), performing the function of signal source contains data that are to be reed into the input Fg (Blak sire v0" swat 1476 IH BELL SYSTEM TECENCAL JOURNAL, SEPTEMBEN 188) butfer, UF, of the nsP. The ourpar stack (os) collet watt data fromthe mst output buffer, em. The trace fle (onc) hoops w record of program branches. The simulator can acces files in the UNTE file ‘stem, This provides for off-line rorage of ust fies wo thal ns flea ‘om be laced from and writlen to UND flex 2.2 ota formate Tata to be entered into registers directly from the terminal a from. UNTK flee may be hexadecimal, octal, biney, derimal integer, or tlecimal fned-point numbers, Also, data can be entored in 256 enn purving ormat (chord and mantissa! and aa linear data with a special profit indicating conversion ta 1-255 upon loading, The latter i eon Yenint when a linear input data Mle exists and the 288 peucessing performance of he nse program isu be evaluated, 12.3 Fle formate Piles for the osp are arrays in memory. They are clasiid into Ble typeein acuorlaree with the word length of the data they aceommo- deve. The ie types, characterized by their data structure and simulator ‘plication ae as fllows + lo-bit addrote dota (ra fe) = LB-it date (Pew Me) 20 bit dats (nase He) {ined date word length finpt and output stacks) "The nee chip eanafors dats from and to the outside word vin serial channels, The 1/0 contol register determines the number of itso be transferred in a particular operation Data words are stored in the more signiticane bits of the 2bbit 1auv. When a 16-bit ward, for ferample, ig traneilied vo 18, an inherent sealing by the factor 16 takes place. Since he simstor cannet tell for a data word, ne fohat ies intended Iie-length is file of miced dui Tengthe have & Tength identifier neoriated with each word, specifying 8, 16, oF 20 bite When dota ave read from 19 into mUF, the simulator fee ehecks for jayccement becmeen the word lengh Wentiier and the ippur number Geld ofthe 1/0 eonsel resister: no discrepancy i detected, te data ‘cancer takes plaoe with the proper hit alignment, otherwice an error message mil be given, The dala words in che Ds OBC ugo right laljsted sp no bit-ahifing ie required on transfer to 0s. The word. Tenth infarmation from the output number field of the 1/0 vontrol register is however, cared over to The ns. The idensical formals of 15 ‘ao allow output data te wl a input in a aubsaquent run of a se program, SOFTWARE SIWULATON 1477 ‘The UNIX fles are in ascat format, They contain 9, FILETYPE declavetion vehich must match tho filetype ofthe Ds fie into which itis londed. Appropriate word length symbols are appended to dat i UND files contsining mized data word lengths. A ata Tine where data is Hinear) may have the format datal+ sale factor][+ offer). This can be used in editing an exiting fle into a new one with sealed and offset data values The appropriate arithmtie ix performed when the fe elon {UNEX files may contain more input ot output data than the core sponding simulator 18 or 08 exn aeoommodate, The igput Me will be atomically loaded into the 18 when the sack i exhausted; his will fontinae uni all UNIX fle data have been used. Repeated "wted” fotthe os toa UNI fl, sithin the execution of @ ose program, will “end dat to that file atl exeoution of the peticular as program, is terminate. IW. CONDITIONAL OPERATIONS ‘The nse has four control/atais Tine which correspond to Ube follwing four bits of the synchronisation eonrol register uw Input Buffer Full 08 Output Buller Frapty of Fxteral Control Signal 1 Lxternal Control Signal ‘These control lines are hardware driven and, therefore, havo no predictable logieal suave daring Une exeeulion oft DsP program. [fan Aula insiraction is edition, control bits mee be available at the time the instruction is executed. The simulator handles the control Tic setting through it communications links with the external oper ating environment, namely the tren or the UNEX fle eretem, i he following ways: (i) Defaule. A request is printed on the terminal for the value of ‘the control bic us, 082, cl, oF CL. Bxocution resumes when che entrol Dit value bs entered, (Gi) Optional The control bits can be read from a UNIX fle speci fied as an argument co che GO command, "This i used when the szecution ofthe use program requires input of numerous control bit, 1. COMMANDS ‘The command repercoie includes VEX type commands for fle Ihandling and editing Ic leo includes commands for re-inkiliation of 4475 THE BELL SYSTEM TECHNICAL JOURNAL, SEPTEMBER 1961 the simulator, setting and renting OSM registers, and transl of Hes Ttwern the simulator and UNIX environmen "The WHEN operation is used to perform checks on breakpoint ‘ariables daring execution of Uns ns program and invoke simulator ‘ommands when breakpoint condilions are wet A breakpoint ean be ‘etn any bse register value, un accumulabor overflow, and on the fhumber of bub exeles uxecute ie can alan be sec to occur aflar a Specified numberof input or output operations have taken place and "an be niplemented forthe nth time the proyrata counter, oF input oF output date, mateh their correponvlng Ineakpoine parameters. ‘This permits the execution of complex test soma. "There are three simulator commande associated with the WHEN coperstion. SC sts the breakpoint parameters and DC sts the table of turrent parawneter values. ‘The WHEN command itself sets the test Conditions and wanulaor commands t be carried ot ding execution fot the program, It has the format WHEN (expression) {commanes) “The expression has tho structure ‘ond op ons ap cond +» ‘where cond is en tet variable name, Tie immpie that ce variable i the logical expression hecomes “true” when tho breakpoint variable Iatches the check value. The logical operstor NOT, OF, a AND is ‘Gosignated by op. As an example, the following simulator command Tines sepe= 0 sea= aK sehen (pela) fd pes dmp 9} will result in the printing uf ube nev program counter value and v evista, Y, woe the program counter, Pe, equals Ia theaccurnlator, requis AGS. ‘The ED command invokes the UTX text edicorshich operates on sett fs, Thus, the LINLX fle canbe edited ditectly, whereas Ure imnlator and ns files are translated ino Ascii during the eiting Drocess ad back into mimerial format on completion ofthe iting "The translations are cone astomatically and are ot visible wo the user "The editor is uselul, for exon, in erating or altering inpat data fle olla cotficene files forthe simalator's kau "The DMP command is used to print the contents of al or, through sonended arguments, selec nae register ‘The plot command, PLT, produces xy plots nf data files. Ie faiitates autowutie or specified SOFTWARE SIMULATOR 1479 ‘sealing and sifting of date origin. Iecanbe ued in comparing segments ‘oF inpuc dste with the coreapanding proceased det ‘The GO command initiates execution and, through a number of arguments, controls various 1/0 and diagnostics options, While the GO command provides for cominuous execution of «DSP progea, the STEP command execuves the number of ose cycles specified in ies ‘sspoiated argument. TERMINAL SESSION “The usage of the simulator ie lusraved by on upplicntion ofthe Ds 1 8 tone generator. The terminal sesion is recured in Fig. 2. The simulator is invuked from the UNIX shell level by the DSPSIM feummand, The simulator command level is indieated hy a" prompt therncler Fi, Ue shuulator's program memory i loaded, using the LD command, with the hexadecimal object file tonedd0, which was ‘encrated previously by the bse assembler from a source program. Next, a breakpwine set on an accumulated numberof outputs equal 170 The WHEN command is used to specify the ations tobe caken ‘when the breakpoint is reached. ‘The actions are 1, Write the o8 into the INT fle tonos40.0nt 2, Plo he data in toneddoul on the erin 3. Stop execution, Finally, the execution i initstived withthe GO command (dhe —m ag suppresses certain dignostic messages), AlUhough this teres 1480 THE BELL SYSTEM TECHNICAL JOURNAL, SEPTEMBER 1901 session is nota exhaustive demonstration of the simulator fences, iteheuld given genera favor of che simulator operation Vi. ACKNOWLEDGMENT ‘Grate thanks goto Stephen M. Watters, who di some preliminary work in tranelatng the ns function iro simulator sofware: both he tnt Tames Tt. Boal offered hell augzection® on the operation of (he simulator Also, special thanks goto Htobert L, Farah who. chrough Stigenc use of Uwe slater, diseavered a number of abnormalities ‘which were subsequently diagnosed und corrected REFERENCES To Bei fy "heal Soa Pre Arta ad a 2 cle ft bg Sit Prom: et te Aemte” BT OFTWARE SIMULATOR 1481,

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.