SMS045 - DSP Systems in Practice. Lab 2 - ADSP-2181 EZ-KIT Lite and VisualDSP++ Due date: Tuesday Nov 18, 2003

Size: px
Start display at page:

Download "SMS045 - DSP Systems in Practice. Lab 2 - ADSP-2181 EZ-KIT Lite and VisualDSP++ Due date: Tuesday Nov 18, 2003"

Transcription

1 SMS045 - DSP Systems in Practice Lab 2 - ADSP-2181 EZ-KIT Lite and VisualDSP++ Due date: Tuesday Nov 18, 2003 Lab Purpose This lab will introduce the ADSP-2181 EZ-KIT Lite development board for the Analog Devices 218x range of digital signals processors (DSPs), along with the Analog Devices VisualDSP++ software for DSP program code development. Both the FIR low-pass filter desgined in Lab 1, and a digital delay, will be implemented. Preparations Read through the lab instructions carefully. Bring a print-out of the Bode plot of the FIR low-pass filter from Lab 1 to the lab session. Required Hand-ins Hand in one report per group, consisting of the following: An introductory paragraph that summarizes what you have done in the lab (about 1/2 A4 page). Assignment 3: The assembler source code to the digital delay implementation. Your oppinions about the lab and the lab instructions. Too easy? Too difficult? Suggestions on changes. Required Presentations Assignment 2: Demonstrate your implemented FIR low-pass filter to the lab instructor. Assignment 3: Demonstrate your implemented digital delay to the lab instructor.

2 Include your names and addresses on the titlepage of the report. Begin included assembler code with comments that show your names and an explanation of what the code does. This could for example look like: // Robert Plant E3, Ron Wood D4 // // Lab 2, Assignment 3. // Code for implementing a digital delay.

3 About Digital Signal Processors ag replacements A digital signal processor (DSP) is a microprocessor that is specially designed to perform fast calculations on digital data in real-time. Some typical DSP applications are: Digital filtering of an analog signal. Calculating the FFT (Fast Fourier Transform) of an analog signal. Real-time adaptive signal processing. A DSP typically consists of three arithmetic units: an adder, a multiplier, and a barrel shifter. It also contains some RAM memory and one or more serial ports. All internal operations are synchronized by an internal core clock. The frequency of the core clock determines the rate at which operations are done. Most operations consume one clock cycle; while in some cases, several operations can be done in the same cycle. Figure 1 shows a block diagram of a DSP application, where an input signal is scaled by a factor 0.5. The DSP is connected to an analog-to-digital converter (ADC) and a digital-to-analog converter (DAC) via a serial port on the DSP. DSP RAM (1) (2) (3) (4) SPORT ADC DAC y = 0.5 x (Arithmetic units) Figure 1: Scaling of a time-continuous signal using a DSP. The typical flow of signals and operations is as follows: The ADC samples a time-continuous signal, producing samples at some fixed rate. The samples are continuously transferred to the DSP over the serial port. Once a sample has been received by the DSP, it performs some operations on it, producing an output sample. In Figure 1, each incoming sample is scaled by a factor of 0.5, following this scheme: 1. The input sample is stored in the internal memory (RAM) as a variable, x. 2. The contents of the variable x is sent to the arithmetic units, where it gets multiplied by th November 2003

4 3. The result is stored as a new variable, y, in the internal memory. 4. The output sample is sent to the serial port for transfer to the DAC. The DAC then converts the samples back to time-continuous form. Normally, the serial port (SPORT) is pre-configured to automatically transfer samples between the DSP and the ADC and DAC. Only the remaining operations (1-4 in the example above) are user defined. DSP operations are normally called routines (e.g. filter routines, scaling routines, etc.). To implement signal processing routines on a DSP, the associated program code handling the routines must first be written. The program code consists of instructions telling the DSP to perform some operations. Once the program code is written, it must be compiled and loaded into the DSP s RAM memory. The DSP may then execute the code. In this lab, the Analog Devices VisualDSP++ software will be used to generate and debug program code to two simple DSP programs. A DSP itself is typically only capable of processing numbers in real time. It has, for instance, no capability by itself to sample a time-continuous signal, etc. Therefore, DSP programs are often designed using a development board. These boards typically contain the DSP chip, a codec (AD/DA converter) for analog input/output, some serial PC interface and some simple user interface (e.g. pushbuttons, LED s, etc.). In this lab, the Analog Devices ADSP-2181 EZ-KIT Lite development board will be used. The ADSP-2181 EZ-KIT Lite and VisualDSP++ The ADSP-2181 EZ-KIT Lite consists of a PCB board with the ADSP-2181 DSP, along with the AD1847 audio codec, a RS232 serial controller (allowing serial communication with the PC), an EPROM interface, plus some other devices. Figure 2 shows the board layout. Program code can be loaded into the DSP from a PC through the RS232 serial link. The audio input and output jacks connect to the codec which is serially connected to the DSP. Program code implementing routines can be written and debugged using the VisualDSP++ (VDSP) software. The code can be written in either assembler language or C/C++. For this course, however, only assembler will be used. Figure 3 shows a block diagram of the lab setup. The PC communicates with the DSP through the serial port (COM1). When a DSP program has been written in VDSP, it is downloaded into the DSP s internal RAM memory via the RS232 serial link. VDSP can then tell the processor to execute the code by sending a Run instruction over the serial link. The DSP will run the program until VDSP sends a Halt instruction. After the processor has halted, the current contents of the DSP s internal registers and memory can be monitored in VDSP for debugging purposes. 4 6th November 2003

5 PSfrag replacements Figure 2: The ADSP-2181 EZ-KIT Lite board layout. (VDSP) PC Serial com. [Debugger instructions] 2181 EZ-KIT Lite Audio out Audio in Figure 3: The PC - EZ-KIT Lite lab setup. VisualDSP++ Projects The assembler or C/C++ files containing the DSP program code are called source files. One or more source files are integrated into VDSP projects. A project also contains a linker definition file, which defines the usage of internal RAM memory and memory-mapped registers on the DSP. VDSP projects may also contain header files (.h files) defining assembler macros and constants, and.dat files containing data; such as filter coefficients, etc. Before a program can be executed on the DSP, VisualDSP must first perform a build of the project. This procedure preprocesses the source code, links it to specified DSP RAM memory locations, and creates an executable file. This file can then be loaded into the DSP s internal memory for execution. 5 6th November 2003

6 VisualDSP++ Assembler Basics This section will introduce some useful assembler instructions and notations used by VisualDSP++. For detailed information, refer to the ADSP-2100 Family Users Manual, or the help function in VisualDSP++. Assembler source code can be stored in one or several.asm files. In the simplest case, using a single file, the source code is usually organized in the following way: First, some definitions of assembler constants are made. Then, variables are defined and possibly initialized. The rest of the source code contains the actual program code. Program Flow An assembler program consists of instructions which are executed sequentially, line by line. All instructions end with a semicolon (;). For example, the following code: AX0 = 2; stores the value 2 in the register called AX0. To control program flow, several different instructions can be used. JUMP A JUMP <label> instruction tells the program to jump to a specific section of the code, marked <label>, and continue execution there. Labels can be placed anywhere in the code, and they end with a colon (:). For example, the following code: AR = AR + 1; JUMP increment; AR = 0; increment: AR = AR + 2; will increment the value of the register AR with one, and then jump to the label increment:, where, in this example, AR is incremented by two. Hence, the instruction AR = 0; will not be executed. CALL A CALL <label> instruction tells the program to jump to a subroutine labeled <label>. The program will continue execution at the address <label> and return to the line after the subroutine 6 6th November 2003

7 call upon an RTS instruction. For example, the following code: CALL reset_ar; AR = AR + 1; reset_ar: AR = 0; nop; RTS; will first call the subroutine labeled reset ar. This makes the program jump to the label reset ar:, where, in this example, AR is set to zero. The nop (no operation) instruction is a dummy instruction which does nothing. The trailing RTS instruction causes the program to return to the line directly after the subroutine call, where, in this example, AR is incremented by one. DO UNTIL Quite often, certain instructions have to be repeatedly executed a certain number of times. This can be done with a DO <label> UNTIL CE instruction. For example, the following code will execute the operations AR = AR + 1 and SR = SR + 3 ten times: CNTR = 10; DO inc loop UNTIL CE; AR = AR + 1; inc loop: SR = SR + 3; AX0 = 2; The loop counter register, CNTR, defines the number of loop iterations. After each iteration, the loop counter value is decremented by one. The inc loop: label marks the last instruction to be done before the loop starts over again. UNTIL CE means until counter expires. In this case, the program exits the loop after ten iterations, continuing with the next instruction after the loop, which, in this example, sets AX0 = 2. Interrupts To allow external units (i.e. codecs, buttons) to interact with the program flow, interrupts can be used. An interrupt from an external unit causes the current program to halt while the interrupt is serviced. 7 6th November 2003

8 For example, a DSP serial port may communicate with an ADC, which samples some timecontinuous signal at a fixed sample rate. When a new sample has been collected, it is transferred to the DSP over the serial port; which then generates an interrupt, telling the DSP that a new sample is ready to be processed. The program will then stop any ongoing process and jump to an interrupt service routine (ISR). In the ISR, the new sample is perhaps stored in some variable, before the program continues from where it got interrupted, upon an RTI (return from interrupt) instruction. For example, the following code: scaling loop: idle; AX0 = AR; JUMP scaling loop; SPORT0 ISR: AX0 = 1; RTI; is an infinite loop which starts with an idle instruction. The idle instruction causes the program flow to stop until an interrupt occurs. An interrupt from serial port 0 causes the program to jump to the interrupt service routine SPORT0 ISR, where AX0 is set to one. The RTI instruction returns execution to the loop, where, in this example, AX0 is set equal to AR. Assembler Constants Assembler constants can be defined using the following syntax: #define GAIN 36 which, in this example, associates the constant GAIN with the number 36. All occurrences of the exact word GAIN in the source code will be replaced with 36 upon build. A constant definition does not end with a semicolon. Assembler Variables Assembler variables are created using the following syntax:.var Input_Var = 0x7FFF; which, in this case, creates a variable called Input Var and intializes its contents to the value 0x7FFF. The syntax: 8 6th November 2003

9 .var Input_Var; creates the variable, but does not initialize it. A buffer containing an arbitrary number of elements can be created similarly by:.var Sample_Buffer[3] = 0x4000, 0x002F, 0x0000; which, in this case, creates a buffer with three elements, and initializes it. About the ADSP-2181 Digital Signal Processor PSfrag replacements This section will cover some of the essential features of the ADSP-2181 digital signal processor. For detailed information, refer to the ADSP-2100 Family User s Manual or the ADSP-218x Hardware Reference. Number Representations The ADSP-2181 is a fixed point processor. This means that the processor can only handle numbers that are represented with a fixed number of decimals. All numbers that are processed by the DSP s arithmetic units are binary numbers. However, when writing program code, alternative number formats may be used. The fixed point numbers used by the arithmetic units in the ADSP-2181 are 16 bit binary numbers in 1.15 fractional format. In this format, the most significant bit (MSB) is a sign bit, which signals whether the number is positive or negative. The other 15 bits are decimal bits. Figure 4 shows the bit weights of a 16 bit number in 1.15 format MSB LSB Figure 4: Bit weights of a 1.15 binary number. For example, the 1.15 binary number b# is equal to the decimal number Numbers in the 1.15 format range from 1 to When writing program code, 1.15 fractional numbers may be entered using three different representations: Binary Format - Binary numbers are entered as b#bbbbbbbbbbbbbbbb, where each of the 16 digits B is any of {0, 1}. 9 6th November 2003

10 Hexadecimal numbers - Hexadecimal (hex) numbers are entered as 0xNNNN, where each digit N is any of {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }. Fractional numbers - Fractional numbers are entered as decimal numbers with a trailing r (e.g. 0.5r). Table 1 shows some examples of 1.15 fractional numbers using the three representations (confirm with Figure 4). Table 1: Examples of 1.15 numbers in binary, hexadecimal and decimal format. Bin Hex Decimal Equivalent b# x b# x b# x7FFF b# x b# xC b# x7FFF If an ordinary number without a decimal point is entered (e.g. 11), it is interpreted as a signed integer. Signed integers are typically used when defining buffer lengths etc. Signed integers range from to Memory Structure The internal RAM memory of the 2181 DSP is divided into two blocks: Data Memory - The data memory stores variables used in the DSP program. The size of the data memory is 8 kwords, where each word is 16 bits wide. Program Memory - The program memory stores the actual program code being executed and, optionally, some variables. The size of the program memory is 8 kwords, where each word is 24 bits wide. The contents of variables stored in data or program memory can be accessed using the syntax DM(<variable name>) or PM(<variable name>) for a variable called <variable name> placed in the data memory or program memory respectively. For example: AR = DM(Sample); loads the contents of the data memory variable Sample into the AR register. Similarly: PM(temp) = SR; stores the value of the register SR in the program memory variable temp. 10 6th November 2003

11 The Arithmetic Logic Unit (ALU) The arithmetic logic unit (ALU) in the ADSP-2181 performs addition or subtraction of two numbers. The ALU can also negate, increment, decrement or take the absolute value of a single number. The ALU has four 16-bit input registers: AX0, AX1, AY0 and AY1. Addition and subtraction can be performed between one of the X registers, (AX0, AX1), and one of the Y registers, (AY0, AY1). The result of the operation is placed in the 16-bit result register, AR. The input registers can be loaded either directly with a value: AX0 = 0x7FFF; or with the value of a variable: AX0 = DM(Input_Var); or with a constant: AX0 = GAIN; As an example, an addition of the hex numbers 1 and A0 can be done by: AX0 = 0x0001; AY0 = 0x00A0; AR = AX0 + AY0; which places the result A1 in AR. A subtraction is done by using a - instead of a +. The Multiplier Accumulator (MAC) The multiplier/accumulator in the ADSP-2181 can multiply two numbers and accumulate results from several multiplications. The MAC has four 16-bit input registers: MX0, MX1, MY0 and MY1. Since the result of a multiplication between two 16-bit numbers is up to 32 bits long, the result register has to be at least 32 bits wide. Furthermore, summing up results of several multiplications may cause the final result to exceed 32 bits. Therefore, the MAC result register, MR, is 40 bits wide. Multiplication can be performed between one of the X registers, (MX0, MX1), and one of the Y registers, (MY0, MY1). A basic multiplication between the hex numbers FF and 2 can be done by: MX0 = 0x0002; MY0 = 0x00FF; MR = MX0 * MY0 (SS); 11 6th November 2003

12 which places the result 0x01FE in MR. The (SS) argument tells the MAC that both the X input and the Y input should be treated as signed numbers. The MR register is divided into two 16-bit registers, MR0 and MR1, and one eight-bit register, MR2. Figure 5 shows the layout of MR. Since almost all other computational registers and all data variables are 16 bits wide, the MAC result often has to be truncated to 16 bits before being stored in some other register or variable. If the result is small enough to be represented using PSfrag replacements only 16 bits, it can be taken from MR0. If the result is more than 16 bits wide, it will use both MR0 and MR1. In this case, a 16 bit rounded result can be taken from MR1 (most significant bits of result). If the result is too big to be represented using 32 bits, the result will use part of the MR2 register as well. The MAC will detect if the MAC result is wider than 32 bits, so that appropriate down-scaling of the result can be implemented in the code. Bit # MSB 39:32 31:16 15:0 MR2 MR1 MR0 Figure 5: The MR register. LSB The result from one multiplication is often added to the result of previous multiplications. If the MR register contains data to be added to a new MAC result, the syntax: MR = MR + MX0 * MY0 (SS); will add the result of MX0 * MY0 to the previous contents of MR. Data Address Generators (DAGs) The data address generators in the ADSP-2181 are used to move data between data or program memory and the arithmetic units with automatic memory-address generation. The DAGs are very useful when addressing consecutive elements in buffers. The ADSP-2181 has eight DAGs. Each DAG consists of three registers: The I register - The I register is a pointer to an address in data or program memory. The L register - The L register specifies the length of a buffer indexed by the DAG register. The M register - The M register specifies the increment value for the I register. Circular Buffer Addressing The most common usage of DAGs is when implementing circular buffers. Figure 6 shows a buffer of length three called Circ Buffer and its contents. The buffer is initialized in data memory 12 6th November 2003

13 with:.var/circ Circ Buffer[3] = 0x1111, 0x3333, 0xAAAA; where the /circ declaration makes the buffer circular. The register I0 is initialized to point to the first element of the buffer by writing I0 = Circ Buffer; The L0 register is set to: L0 = length(circ Buffer); which, in this case, makes L0 = 3. To access consecutive elements in the buffer, M0 is set to: M0 = 1; PSfrag replacements I0 Circ Buffer 0x1111 0x3333 0xAAAA Figure 6: A buffer of length three with an associated I pointer. After the DAG registers have been initialized, the following instruction: AX0 = DM(I0,M0); stores the value pointed to by I0 in AX0, (AX0 = 0x1111). Each time an I register is used, its value is incremented by the value of the corresponding M register. In this case, if the next instruction is: AY0 = DM(I0,M0); the value 0x3333 will be stored in AY0, and I0 will be updated to point to the last element in Circ Buffer. After I0 is used the third time, the pointer will wrap around to once again point to the first element in the buffer. Hence, with each invoke of this DAG, the sequence {0x1111, 0x3333, 0xAAAA, 0x1111, 0x3333, 0xAAAA, 0x } will be produced. By letting M0 = 2, the sequence will instead be {0x1111, 0xAAAA, 0x3333, 0x1111, 0xAAAA, 0x }. If M0 is negative the sequence will be reversed. M0 = -1 gives the sequence {0x1111, 0xAAAA, 0x3333, 0x1111, 0xAAAA, 0x3333, 0x }. Of course, DAGs can be similarly used to store numbers in circular buffers. The syntax: 13 6th November 2003

14 DM(I0,M0) = AX0; will store the contents of AX0 in the memory location pointed to by I0, and then increment I0 with the value of M0. Multifunction Multiply/Accumulate One of the key features of the ADSP-2181 (any many other DSPs), is the ability to perform multiplication and accumulation and do two memory reads, all in a single core clock cycle. The syntax MR = MR + MX0 * MY0 (SS), MX0 = DM(I0,M0), MY0 = PM(I4,M4); first performs a multiplication between the contents of MX0 and MY0 and adds the result to the previous value of MR. Then, the input registers are loaded with new values from data memory and program memory. Multifunction multiply/accumulate is very useful when implementing fast convolutions sums, as done in the following program example. An FIR Filter Example Program The example code to be used in the following assignments is an FIR filter implementation. This VDSP project, FIRexample, can be downloaded from the course webpage. It consists of the following files: FIRexample.dpj - Project file. Automatically created for new projects. FIRexample.asm - Assembler source code. User defined. ADSP-2181.ldf - Linker definition file. Automatically created or user defined. def2181.h - Header file. User defined. FIRtaps.dat - Filter coefficients for an FIR filter. User defined. The only files that need to be edited in this lab are FIRexample.asm and FIRtaps.dat. FIRexample.asm The FIRexample.asm file contains the source code for an FIR filter implementation on the ADSP The code begins with some definitions of constants and variables to be used in the code. The constant 14 6th November 2003

15 #define M 32 defines the number of filter coefficents (filter order + 1). The first variable being initialized is a circular buffer containing the coefficients (taps) to an FIR filter. The coefficients are loaded from the file FIRtaps.dat. /******************** Program Memory Variables ************/.section/pm seg code; /*-- Put all program memory variables under this.section label --*/.var/circ FIRtaps[M] = "FIRtaps.dat"; The declaration.section/pm seg code; is a directive that places all the trailing code and variables in program memory (PM), in a memory section called seg code. Note: Comments in assembler code start with /* and end with */. A single line starting with // is also treated as a comment. The next.section directive places variables in data memory (DM): /******************** Data Memory Variables **************/.section/dm data1; /*-- Put all data memory variables under this.section label --*/ // Delay lines.var/circ DelaylineL[M];.var/circ DelaylineR[M]; // Temporary sample variables.var Sample_L=0;.var Sample_R=0; // Flag for indicating new samples received from ADC.var New_Samples=0; This section initializes two circular delay line buffers for the FIR filter: one for the left stereo channel, DelaylineL, and one for the right channel, DelaylineR. The delay lines store the N + 1 most recent consecutive input samples, x[n i], i = 0, 1,..., N of the filter input signal. The Sample L and Sample R variables store the current samples for the left and right stereo channel respectively. The New Samples variable is a flag used to signal that new samples from the ADC have been received into the DSP. Other variables for the codec are also set up. The next part of the source code is the interrupt vector table which basically tells the processor what to to when specific interrupts occur. Commonly, a JUMP instruction to an interrupt service 15 6th November 2003

16 routine is executed. For example, an interrupt generated by the codec upon the reception of new samples, causes a JUMP to the interrupt service routine labeled input samples:.section/pm IVsport0recv; jump input_samples; Next, a.section directive to program memory is done, after which the actual program code starts. /******************** Program Code ***********************/.section/pm seg_code; start: The start: label defines the line at which execution of the program code starts. Figure 7 shows the program flow. The program starts with some configurations of the DSP and its serial port (SPORT0). The program then starts to communicate with the AD1847 codec, initializing it and setting the sampling frequency to khz. Once the codec and the DSP has been set up, some DAG registers used by the program are initialized. //***** FIR filter variables setup ***************** // FIRtaps DAG register setup I4 = FIRtaps; L4 = M; M4 = 1; // DelaylineL DAG register setup L0 = M; // DelaylineL DAG register setup L1 = M; // DAG M-register setup M1 = 1; M0 = 0; M2 = -1; Next, the delay line buffers for the FIR filter are initialized (all values x[n i] are reset to zero). // Clear Delaylines I0 = DelaylineL; 16 6th November 2003

17 (Program start) SPORT0 setup AD1847 codec setup Initialize DAGs Clear delay lines (ADC interrupt) PSfrag replacements Idle until an interrupt has occurred Send filtered samples to DAC Fetch new samples from ADC main loop No New samples? Yes (RTI) Filter LEFT sample Filter RIGHT sample Figure 7: Program flow of the FIRexample program. 17 6th November 2003

18 AX0 = 0; CNTR = M; DO Clear_DelaylineL UNTIL CE; Clear_DelaylineL: DM(I0,M1) = AX0; I1 = DelaylineR; AX0 = 0; CNTR = M; DO Clear_DelaylineR UNTIL CE; Clear_DelaylineR: DM(I1,M1) = AX0; The program then enters an infinite loop called main loop. The program flow of this loop is marked in Figure 7. Essentially, the program continously checks for new samples from the codec. The codec will send two new samples (one for the left, and one for the right stereo channel) to the DSP every 1/f s second (where f s is the sampling frequency). When new input samples have been received from the ADC, a codec interrupt is generated, and the program jumps to the codec interrupt service routine, labeled input samples:. input_samples: ENA sec_reg; // use shadow register bank // *** Send the latest processed samples to DAC *** AX0 = DM(Sample_L); DM(tx_buf + LEFT) = AX0; // Send Left sample AX0 = DM(Sample_R); DM(tx_buf + RIGHT) = AX0; // Send Right sample // *** Get new samples from ADC *** AX0 = DM(rx_buf + LEFT); // Get Left sample DM(Sample_L) = AX0; AX0 = DM(rx_buf + RIGHT); // Get Right sample DM(Sample_R) = AX0; // Set New_Samples flag to indicate that // new samples have been received AR = 1; DM(New_Samples) = AR; DIS sec_reg; RTI; 18 6th November 2003

19 In the ISR, the output samples, stored in the Sample L (left sample) and Sample R (right sample) variables, are sent to the DAC. The Sample L and Sample R variables are then loaded with the new input samples from the ADC. Finally, the New Samples flag is set, to indicate that new input samples have been received. The program then exits the ISR with an RTI instruction. When the program returns to the main loop loop, it detects (by checking the New Samples flag) that new input samples have been received. The new samples are then processed in two consecutive FIR filter routines. The following section gives a detailed description of the FIR filter routine for the left sample. The routine filtering the right sample works in exactly the same way, but uses a different delay line. FIR Filtering of a Sample The FIR filter routine uses two circular buffers: DelaylineL (the delay line), containing the N +1 most recent consecutive input samples x[n i], i = 0, 1,..., N, and FIRtaps, containing the N +1 filter coefficents b i, i = 0, 1,..., N, where N is the filter order. Initially, the DAG register I4 points to the first filter coefficient, b 0 in the FIRtaps buffer. Figure 8PSfrag shows replacements the initial contents of the FIRtaps buffer and the location of the I4 pointer for a filter of order N = 5. FIRtaps b 0 b 1 b 2 b 3 b 4 b 5 I4 Figure 8: The filter coefficient buffer of a 5th order FIR filter. The sequential instructions in the FIR routine are described below. 1. Initially, the DAG register I0 points to the oldest sample, x[n N], in the DelaylineL buffer. The routine starts by overwriting this sample by the most recent input sample from the ADC, x[n]. AX0 = DM(Sample_L); DM(I0,M0) = AX0; Note that since M0 has been set to zero, I0 is not updated, and will therefore point to the new x[n]. Figure 9 shows the contents of the DelaylineL buffer and the position of I0 for a filter of order N = 5 after these first instructions. 19 6th November 2003

20 PSfrag replacements DelaylineL x[n] x[n 1] x[n 2] x[n 3] x[n 4] x[n 5] I0 Figure 9: The delay line buffer of a 5th order FIR filter. 2. The MAC input registers are loaded with the values currently pointed to by I0 and I4: x[n] and b 0 respectively. I0 and I4 are both incremented by one (since both M1 and M4 are set to one). I0 will now point to x[n 1] and I4 will point to b 1. The MAC result register, MR is set to zero. MX0 = DM(I0,M1); MY0 = PM(I4,M4); MR = 0; 3. A DO UNTIL instruction creates a loop which, in each loop turn, multiplies the contents of MX0 and MY0, adds the result to MR, and updates MX0 and MY0 with new values from DelaylineL and FIRtaps respectively. The loop performs M-1 such multiplies/accumulates, where M is the length of the DelaylineL and FIRtaps buffers. The last multiply/accumulate is done just after the loop. CNTR = M-1; DO FIRloopL UNTIL CE; FIRloopL: MR = MR + MX0 * MY0 (SS), MX0=DM(I0,M1), MY0=PM(I4,M4); MR = MR + MX0 * MY0 (SS); Confirm from Figures 8 and 9 that, in the case M = 6, this really corresponds to the convolution sum 5 y[n] = x[n i]b i, (1) with the output signal, y[n], stored in MR. i=0 After the loop has finished, both the I0 and the I4 pointers have wrapped around their buffers, resuming the states shown in Figures 8 and I0 must now be modified so that it again points to the oldest sample, x[n N], in the delay line, as it did at the beginning of the FIR filter routine. Thus, the next time the FIR routine is used, the new input sample will overwrite the oldest sample. To update an I register without actually transferring any data, the MODIFY instruction may be used: MODIFY(I0,M2); 20 6th November 2003

21 This instruction modifies I0 by M2. In this case, since M2 is set to -2, I0 is moved one step back in the delay line, and now points to x[n N] (confirm with Figure 9). 5. Finally, the filtered output sample, y[n] is stored in Sample L, by taking the rounded MAC result from the MR1 register. AX0 = MR1; DM(Sample_L) = AX0; Assignment 1 - Opening, Loading and Running the FIRexample Project In the first assignment, you will open the existing VDSP project FIRexample and load the program into the DSP for execution. The filter coefficents in FIRtaps.dat consist of just a single filter tap, a one in 1.15 hexadecimal representation (0x7FFF), followed by 31 zeros (confirm this by inspecting the contents of FIRtaps.dat, select Open from the File menu). This will produce an output signal that is equal to the input signal. 1. From the course webpage, download the five FIRexample files (FIRexample.dpj, FIRexample.asm, def2181.h, ADSP-2181.ldf, FIRtaps.dat) and place them in a folder on the hard drive of your lab PC. Also download the quimby.wav file. 2. Make sure your DSP board is powered and connected to the PC with the serial cord. Start VisualDSP (Start Programs VisualDSP VisualDSP++ Environment). 3. Press the Reset button on the EZ-KIT Lite board when asked, and click OK. 4. Check that the audio cable from the PC sound card output (line out) is connected to the J1 IN jack on the DSP card. 5. Connect speakers or headphones to the J2-OUT jack. 6. From the Project menu, select Open. Browse to the folder where you stored the downloaded files and select the file named FIRexample.dpj. This will open the project. 7. Figure 10 shows the VDSP environment. From the project window on the right side of the screen, double-click FIRexample.asm located in the source files folder (if the project window is not visible, select Project Window from the View menu). The editor window now shows the source code for the FIR filter program. 8. Build the project by clicking the Build Project icon or by pressing F7 on the keyboard. The output window displays the status of the build. If there are errors in the source code, they will be displayed in the output window, and the build will not be successful. If there are no errors, the program automatically loads into DSP RAM. When the output window shows Load complete, the DSP is ready to run the program. 21 6th November 2003

22 PSfrag replacements Project window Disassembly Output window Editor window Figure 10: The VisualDSP environment. 9. Click the Run button or press F5 to run the DSP. 10. Play the quimby.wav file using, for example, the media player in Windows. You should now hear the sound in your headphones or speakers. 11. You can halt the DSP by clicking the Halt button or by pressing Shift+F5. Once you have halted the program, it can be restarted by first reloading it into DPS RAM by pressing (Ctrl+R) and then running it (F5). Assignment 2 - Implementing an FIR Low-Pass Filter In this assignment, you will implement your FIR low-pass filter from Lab 1 using the FIRexample project, and test it, using a tone generator. 1. Use the MATLAB dvec2hvec function to convert the coefficients of your FIR low-pass filter from Lab 1 from decimal to hex 1.15 format (type help dvec2hvec for instructions). 2. Open FIRtaps.dat and replace the existing filter coefficients with your converted FIR lowpass filter coefficients. 3. If necessary, change the assembler constant M to match the length of your filter. Changing M will also change the lengths of the delay lines, since they are defined using M. // Delay lines.var/circ DelaylineL[M];.var/circ DelaylineR[M]; 22 6th November 2003

23 4. Save your files and build (and debug?) the project. 5. Run the program (F5). 6. Connect a tone generator to the analog input jack (J1 IN) on the EZ-KIT Lite board. Note: Make sure that the tone generator amplitude is 0.3 V max. 7. Generate a sinus wave. Vary the frequency and listen to the output signal in your headphones or speakers. Verify your Bode plot of the FIR filter from Lab 1 by checking that frequencies in the pass band go through the filter un-attenuated, and that frequencies in the stop band are attenuated. You can also try the quimby.wav file with your filter. 8. Demonstrate your filter implementation to the lab instructor. Assignment 3 - Creating a new Digital Delay Project A simple digital delay (echo) can be constructed by filtering the input samples with a two-tap FIR filter. The structure of such a delay is shown in Figure 11. The output sample, y[n], is the sum of the input sample, x[n], scaled by b 0, and a delayed input sample, x[n N], scaled by b N. Suitable values for b 0 and b N are 0.6 and 0.3 respectively. The FIRexample project can be used x[n N] x[n] z N PSfrag replacements b 0 b N Σ y[n] Figure 11: A simple digital delay. as a base for a new digital delay project. Do the following: 1. Create a new folder with a suitable name (e.g. delay project ) on your hard drive. 23 6th November 2003

24 2. Again download the four assembler files used in the previous assignment (FIRexample.asm, def2181.h, ADSP-2181.ldf, FIRtaps.dat), and place them in the new folder (you don t need to download FIRexample.dpj, since you will create a new project). 3. Rename the source file, FIRexample.asm, to delay.asm. 4. Close the current VDSP project by selecting Close from the Project menu. Close all open source windows. 5. Start a new project by selecting New from the Project menu. 6. Browse to your delay project folder, and save the new project as delay. This will create a new project file called delay.dpj. 7. From the Project Options window that pops up, select ADSP-2181 from the Processor list. Select OK. 8. Add the source file (delay.asm), the header file (def2181.h), and the linker file (ADSP ldf) to your project by selecting Add to project File(s) from the Project menu. Select all three files and click Add. 9. Open the source file and edit the code to produce the digital delay shown in Figure 11 (see hints below). 10. Save your files, build (and debug?) the project, and run the program. 11. Once the program is working, test your digital delay with the quimby.wav file. 12. Demonstrate your digital delay to the lab instructor. Hints: To produce a reasonable delay, the length of the delay (e.g. the length of the echo) has to be fairly long. The number N in Figure 11 decides the length of the delay in number of samples. The delay time, t d (in seconds), will be dependent on the sampling frequency, f s (in Hz), and N (in number of samples), as t d = N f s. (2) To increase t d, lower the sampling frequency of the codec to khz and increase the filter length constant M to The sampling frequency of the codec is determined by the 9th value in the init cmds buffer: 0xC853,/* data format register b7 : res b5-6: 0=8-bit unsigned linear PCM 24 6th November 2003

25 1=8-bit u-law companded 2=16-bit signed linear PCM 3=8-bit A-law companded b4 : 0=mono, 1=stereo b0-3: 0= 8. 1= = 16. 3= = = = 32. 7= =. 9= 37.8 a=. b= 44.1 c= 48. d= e= 9.6 f= (b0) : 0=XTAL MHz; 1=XTAL MHz Changing the value 0xC853 to 0xC851 sets the sampling frequency to khz. Changing the filter coefficients to a two-tap, length 2000 filter, is best done by not using the FIRtaps.dat file. Instead, define the FIRtaps buffer without initializing it:.var/circ FIRtaps[N]; and then set the first and last coeficcient to 0.6 and 0.3 respectively, and the other coefficients to zero. This is preferably done using a DO UNTIL loop. This loop can be placed just prior to the main loop: label in the source code. 25 6th November 2003

DSP Platforms Lab (AD-SHARC) Session 05

DSP Platforms Lab (AD-SHARC) Session 05 University of Miami - Frost School of Music DSP Platforms Lab (AD-SHARC) Session 05 Description This session will be dedicated to give an introduction to the hardware architecture and assembly programming

More information

Instruction Set Reference

Instruction Set Reference .1 QUICK LIST OF INSTRUCTIONS This chapter is a complete reference for the instruction set of the ADSP-2100 family. The instruction set is organized by instruction group and, within each group, by individual

More information

Programming Model 12.1 OVERVIEW 12 1

Programming Model 12.1 OVERVIEW 12 1 Programming Model 12 12.1 OVERVIEW From a programming standpoint, the ADSP-21xx processors consist of three computational units, two data address generators, and a program sequencer, plus on-chip peripherals

More information

ADSP-2100A DSP microprocessor with off-chip Harvard architecture. ADSP-2101 DSP microcomputer with on-chip program and data memory

ADSP-2100A DSP microprocessor with off-chip Harvard architecture. ADSP-2101 DSP microcomputer with on-chip program and data memory Introduction. OVERVIEW This book is the second volume of digital signal processing applications based on the ADSP-00 DSP microprocessor family. It contains a compilation of routines for a variety of common

More information

University of Saskatchewan 5-1 EE 392 Electrical Engineering Laboratory III

University of Saskatchewan 5-1 EE 392 Electrical Engineering Laboratory III University of Saskatchewan 5-1 DSP Safety The voltages used in this experiment are less than 15 V and normally do not present a risk of shock. However, you should always follow safe procedures when working

More information

Introduction ADSP-2100 FAMILY OF PROCESSORS

Introduction ADSP-2100 FAMILY OF PROCESSORS Introduction 1 1.1 OVERVIEW This book presents a compilation of routines for a variety of common digital signal processing applications based on the ADSP-2100 DSP microprocessor family. These routines

More information

ADSP-218x. DSP Instruction Set Reference. First Edition, February Part Number

ADSP-218x. DSP Instruction Set Reference. First Edition, February Part Number ADSP-218x DSP Instruction Set Reference First Edition, February 2001 Part Number 82-002000-01 Analog Devices, Inc. Digital Signal Processor Division One Technology Way Norwood, Mass. 02062-9106 a Copyright

More information

Simple Experiments Involving External Control of Algorithm Parameters for an EET Undergraduate DSP Course

Simple Experiments Involving External Control of Algorithm Parameters for an EET Undergraduate DSP Course Simple Experiments Involving External Control of Algorithm Parameters for an EET Undergraduate DSP Course Anthony J A Oxtoby, Gerard N Foster Purdue University, West Lafayette/Kokomo Session 2649 Abstract

More information

Graduate Institute of Electronics Engineering, NTU 9/16/2004

Graduate Institute of Electronics Engineering, NTU 9/16/2004 / 9/16/2004 ACCESS IC LAB Overview of DSP Processor Current Status of NTU DSP Laboratory (E1-304) Course outline of Programmable DSP Lab Lab handout and final project DSP processor is a specially designed

More information

ADSP-2181 Experiments

ADSP-2181 Experiments RUTGERS UNIVERSITY The State University of New Jersey School of Engineering Department of Electrical and Computer Engineering 94 Brett Road, Piscataway, NJ 08854-8058 Tel. 732-445-5017, e-mail: orfanidi@ece.rutgers.edu

More information

Computer Organisation CS303

Computer Organisation CS303 Computer Organisation CS303 Module Period Assignments 1 Day 1 to Day 6 1. Write a program to evaluate the arithmetic statement: X=(A-B + C * (D * E-F))/G + H*K a. Using a general register computer with

More information

EE-123. An Overview of the ADSP-219x Pipeline Last modified 10/13/00

EE-123. An Overview of the ADSP-219x Pipeline Last modified 10/13/00 a Engineer To Engineer Note EE-123 Technical Notes on using Analog Devices DSP components and development tools Phone: (800) ANALOG-D, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com, FTP: ftp.analog.com,

More information

SECTION 5 ADDRESS GENERATION UNIT AND ADDRESSING MODES

SECTION 5 ADDRESS GENERATION UNIT AND ADDRESSING MODES SECTION 5 ADDRESS GENERATION UNIT AND ADDRESSING MODES This section contains three major subsections. The first subsection describes the hardware architecture of the address generation unit (AGU); the

More information

,1752'8&7,21. Figure 1-0. Table 1-0. Listing 1-0.

,1752'8&7,21. Figure 1-0. Table 1-0. Listing 1-0. ,1752'8&7,21 Figure 1-0. Table 1-0. Listing 1-0. The ADSP-21065L SHARC is a high-performance, 32-bit digital signal processor for communications, digital audio, and industrial instrumentation applications.

More information

538 Lecture Notes Week 1

538 Lecture Notes Week 1 538 Clowes Lecture Notes Week 1 (Sept. 6, 2017) 1/10 538 Lecture Notes Week 1 Announcements No labs this week. Labs begin the week of September 11, 2017. My email: kclowes@ryerson.ca Counselling hours:

More information

Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711

Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711 Digital Signal Processing Laboratory 7: IIR Notch Filters Using the TMS320C6711 PreLab due Wednesday, 3 November 2010 Objective: To implement a simple filter using a digital signal processing microprocessor

More information

3 TUTORIAL. In This Chapter. Figure 1-0. Table 1-0. Listing 1-0.

3 TUTORIAL. In This Chapter. Figure 1-0. Table 1-0. Listing 1-0. 3 TUTORIAL Figure 1-0. Table 1-0. Listing 1-0. In This Chapter This chapter contains the following topics: Overview on page 3-2 Exercise One: Building and Running a C Program on page 3-4 Exercise Two:

More information

Chapter 7 Central Processor Unit (S08CPUV2)

Chapter 7 Central Processor Unit (S08CPUV2) Chapter 7 Central Processor Unit (S08CPUV2) 7.1 Introduction This section provides summary information about the registers, addressing modes, and instruction set of the CPU of the HCS08 Family. For a more

More information

ECE4703 B Term Laboratory Assignment 2 Floating Point Filters Using the TMS320C6713 DSK Project Code and Report Due at 3 pm 9-Nov-2017

ECE4703 B Term Laboratory Assignment 2 Floating Point Filters Using the TMS320C6713 DSK Project Code and Report Due at 3 pm 9-Nov-2017 ECE4703 B Term 2017 -- Laboratory Assignment 2 Floating Point Filters Using the TMS320C6713 DSK Project Code and Report Due at 3 pm 9-Nov-2017 The goals of this laboratory assignment are: to familiarize

More information

A Microprocessor Systems Fall 2009

A Microprocessor Systems Fall 2009 304 426A Microprocessor Systems Fall 2009 Lab 1: Assembly and Embedded C Objective This exercise introduces the Texas Instrument MSP430 assembly language, the concept of the calling convention and different

More information

CHAPTER 1 Numerical Representation

CHAPTER 1 Numerical Representation CHAPTER 1 Numerical Representation To process a signal digitally, it must be represented in a digital format. This point may seem obvious, but it turns out that there are a number of different ways to

More information

NEW CEIBO DEBUGGER. Menus and Commands

NEW CEIBO DEBUGGER. Menus and Commands NEW CEIBO DEBUGGER Menus and Commands Ceibo Debugger Menus and Commands D.1. Introduction CEIBO DEBUGGER is the latest software available from Ceibo and can be used with most of Ceibo emulators. You will

More information

ADSP-218x. DSP Hardware Reference. First Edition, February Part Number

ADSP-218x. DSP Hardware Reference. First Edition, February Part Number ADSP-218x DSP Hardware Reference First Edition, February 2001 Part Number 82-002010-01 Analog Devices, Inc. Digital Signal Processor Division One Technology Way Norwood, Mass. 02062-9106 a Copyright Information

More information

The following revision history lists the anomaly list revisions and major changes for each anomaly list revision.

The following revision history lists the anomaly list revisions and major changes for each anomaly list revision. a SHARC Processor ADSP-21366 ABOUT ADSP-21366 SILICON ANOMALIES These anomalies represent the currently known differences between revisions of the SHARC ADSP-21366 product(s) and the functionality specified

More information

ADDRESS GENERATION UNIT (AGU)

ADDRESS GENERATION UNIT (AGU) nc. SECTION 4 ADDRESS GENERATION UNIT (AGU) MOTOROLA ADDRESS GENERATION UNIT (AGU) 4-1 nc. SECTION CONTENTS 4.1 INTRODUCTION........................................ 4-3 4.2 ADDRESS REGISTER FILE (Rn)............................

More information

2 TUTORIAL. Overview. VisualDSP Getting Started Guide 2-1 for SHARC DSPs

2 TUTORIAL. Overview. VisualDSP Getting Started Guide 2-1 for SHARC DSPs 2 TUTORIAL This chapter contains the following topics. Overview on page 2-1 Exercise One: Building and Running a C Program on page 2-3 Exercise Two: Calling an Assembly Routine and Creating an LDF on page

More information

4 DEBUGGING. In This Chapter. Figure 2-0. Table 2-0. Listing 2-0.

4 DEBUGGING. In This Chapter. Figure 2-0. Table 2-0. Listing 2-0. 4 DEBUGGING Figure 2-0. Table 2-0. Listing 2-0. In This Chapter This chapter contains the following topics: Debug Sessions on page 4-2 Code Behavior Analysis Tools on page 4-8 DSP Program Execution Operations

More information

REAL TIME DIGITAL SIGNAL PROCESSING

REAL TIME DIGITAL SIGNAL PROCESSING REAL TIME DIGITAL SIGNAL PROCESSING UTN - FRBA 2011 www.electron.frba.utn.edu.ar/dplab Introduction Why Digital? A brief comparison with analog. Advantages Flexibility. Easily modifiable and upgradeable.

More information

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA) CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA) Aleksandar Milenković Email: milenka@uah.edu Web: http://www.ece.uah.edu/~milenka Objective Introduce MSP430 Instruction Set Architecture (Class of ISA,

More information

This section discusses resources available from Analog Devices to help you develop applications using ADSP Family digital signal processors.

This section discusses resources available from Analog Devices to help you develop applications using ADSP Family digital signal processors. Introduction This applications handbook is intended to help you get a quick start in developing DSP applications with ADSP-2000 Family digital signal processors. This chapter includes a summary of available

More information

Better sharc data such as vliw format, number of kind of functional units

Better sharc data such as vliw format, number of kind of functional units Better sharc data such as vliw format, number of kind of functional units Pictures of pipe would help Build up zero overhead loop example better FIR inner loop in coldfire Mine more material from bsdi.com

More information

Lab 1 Introduction to TI s TMS320C6713 DSK Digital Signal Processing Board

Lab 1 Introduction to TI s TMS320C6713 DSK Digital Signal Processing Board Lab 1 Introduction to TI s TMS320C6713 DSK Digital Signal Processing Board This laboratory introduces you to the TMS320C6713 DSK board module with: An overview of the functional blocks of the board Code

More information

4 MAC INSTRUCTIONS. Figure 4-0. Table 4-0. Listing 4-0.

4 MAC INSTRUCTIONS. Figure 4-0. Table 4-0. Listing 4-0. 4 MAC INSTRUCTIONS Figure 4-0. Table 4-0. Listing 4-0. The instruction set provides MAC instructions for performing high-speed multiplication and multiply with cumulative add/subtract operations. MAC instructions

More information

The C Programming Language Guide for the Robot Course work Module

The C Programming Language Guide for the Robot Course work Module The C Programming Language Guide for the Robot Course work Module Eric Peasley 2018 v6.4 1 2 Table of Contents Variables...5 Assignments...6 Entering Numbers...6 Operators...7 Arithmetic Operators...7

More information

Lab 6 : Introduction to Simulink, Link for CCS & Real-Time Workshop

Lab 6 : Introduction to Simulink, Link for CCS & Real-Time Workshop Lab 6 : Introduction to Simulink, Link for CCS & Real-Time Workshop September, 2006 1 Overview The purpose of this lab is to familiarize you with Simulink, Real Time Workshop, Link for CCS and how they

More information

Four Categories Of 8085 Instructions That >>>CLICK HERE<<<

Four Categories Of 8085 Instructions That >>>CLICK HERE<<< Four Categories Of 8085 Instructions That Manipulate Data When the data byte isloaded by CPU the transmitter will stop transmitting synchronous List the four categories of 8085 instructions. manipulate

More information

Audio Controller i. Audio Controller

Audio Controller i. Audio Controller i Audio Controller ii Contents 1 Introduction 1 2 Controller interface 1 2.1 Port Descriptions................................................... 1 2.2 Interface description.................................................

More information

8051 Overview and Instruction Set

8051 Overview and Instruction Set 8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different

More information

ADSP-2181 EZ-KIT Lite Evaluation System Manual

ADSP-2181 EZ-KIT Lite Evaluation System Manual ADSP-2181 EZ-KIT Lite Evaluation System Manual Revision 2.1, October 2003 Part Number 82-000543-01 Analog Devices, Inc. One Technology Way Norwood, Mass. 02062-9106 a Copyright Information 2003 Analog

More information

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING CHAPTER 2 8051 ASSEMBLY LANGUAGE PROGRAMMING Registers Register are used to store information temporarily: A byte of data to be processed An address pointing to the data to be fetched The vast majority

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-134 Phone: (800) ANALOG-D, FAX: (781) 461-3010, EMAIL: dsp.support@analog.com, FTP: ftp.analog.com, WEB: www.analog.com/dsp Copyright 2001, Analog Devices, Inc. All rights

More information

Graduate Institute of Electronics Engineering, NTU FIR Filter Design, Implement, and Applicate on Audio Equalizing System ~System Architecture

Graduate Institute of Electronics Engineering, NTU FIR Filter Design, Implement, and Applicate on Audio Equalizing System ~System Architecture FIR Filter Design, Implement, and Applicate on Audio Equalizing System ~System Architecture Instructor: Prof. Andy Wu 2004/10/21 ACCESS IC LAB Review of DSP System P2 Basic Structure for Audio System Use

More information

Microcontrollers. Microcontroller

Microcontrollers. Microcontroller Microcontrollers Microcontroller A microprocessor on a single integrated circuit intended to operate as an embedded system. As well as a CPU, a microcontroller typically includes small amounts of RAM and

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (October 4, 2017) 1/18 538 Lecture Notes Week 5 Announements Midterm: Tuesday, October 25 Answers to last week's questions 1. With the diagram shown for a port (single bit), what

More information

REAL TIME DIGITAL SIGNAL PROCESSING

REAL TIME DIGITAL SIGNAL PROCESSING REAL TIME DIGITAL SIGNAL PROCESSING UTN-FRBA 2010 Introduction Why Digital? A brief comparison with analog. Advantages Flexibility. Easily modifiable and upgradeable. Reproducibility. Don t depend on components

More information

SECTION 5 PROGRAM CONTROL UNIT

SECTION 5 PROGRAM CONTROL UNIT SECTION 5 PROGRAM CONTROL UNIT MOTOROLA PROGRAM CONTROL UNIT 5-1 SECTION CONTENTS SECTION 5.1 PROGRAM CONTROL UNIT... 3 SECTION 5.2 OVERVIEW... 3 SECTION 5.3 PROGRAM CONTROL UNIT (PCU) ARCHITECTURE...

More information

An introduction to Digital Signal Processors (DSP) Using the C55xx family

An introduction to Digital Signal Processors (DSP) Using the C55xx family An introduction to Digital Signal Processors (DSP) Using the C55xx family Group status (~2 minutes each) 5 groups stand up What processor(s) you are using Wireless? If so, what technologies/chips are you

More information

CS311 Lecture: The Architecture of a Simple Computer

CS311 Lecture: The Architecture of a Simple Computer CS311 Lecture: The Architecture of a Simple Computer Objectives: July 30, 2003 1. To introduce the MARIE architecture developed in Null ch. 4 2. To introduce writing programs in assembly language Materials:

More information

G GLOSSARY. Terms. Figure G-0. Table G-0. Listing G-0.

G GLOSSARY. Terms. Figure G-0. Table G-0. Listing G-0. G GLOSSARY Figure G-0. Table G-0. Listing G-0. Terms Autobuffering Unit (ABU). (See I/O processor and DMA) Arithmetic Logic Unit (ALU). This part of a processing element performs arithmetic and logic operations

More information

The MARIE Architecture

The MARIE Architecture The MARIE Machine Architecture that is Really Intuitive and Easy. We now define the ISA (Instruction Set Architecture) of the MARIE. This forms the functional specifications for the CPU. Basic specifications

More information

CS401 - Computer Architecture and Assembly Language Programming Glossary By

CS401 - Computer Architecture and Assembly Language Programming Glossary By CS401 - Computer Architecture and Assembly Language Programming Glossary By absolute address : A virtual (not physical) address within the process address space that is computed as an absolute number.

More information

The following revision history lists the anomaly list revisions and major changes for each anomaly list revision.

The following revision history lists the anomaly list revisions and major changes for each anomaly list revision. a SHARC Processor ABOUT SILICON ANOMALIES These anomalies represent the currently known differences between revisions of the SHARC product(s) and the functionality specified in the data sheet(s) and the

More information

Embedded Systems - FS 2018

Embedded Systems - FS 2018 Institut für Technische Informatik und Kommunikationsnetze Prof. L. Thiele Embedded Systems - FS 2018 Lab 0 Date : 28.2.2018 Prelab Filling the gaps Goals of this Lab You are expected to be already familiar

More information

ADSP EZ-KIT Lite Evaluation System Manual. Part Number: Revision 3.0 January 2003

ADSP EZ-KIT Lite Evaluation System Manual. Part Number: Revision 3.0 January 2003 ADSP-21061 EZ-KIT Lite Evaluation System Manual Part Number: 82-000570-01 Revision 3.0 January 2003 a Notice Analog Devices, Inc. reserves the right to make changes to or to discontinue any product or

More information

Notes: The Marie Simulator

Notes: The Marie Simulator The Accumulator (AC) is the register where calculations are performed. To add two numbers together, a) load the first number into the accumulator with a Load instruction b) Add the second number to the

More information

DSP VLSI Design. Addressing. Byungin Moon. Yonsei University

DSP VLSI Design. Addressing. Byungin Moon. Yonsei University Byungin Moon Yonsei University Outline Definition of addressing modes Implied addressing Immediate addressing Memory-direct addressing Register-direct addressing Register-indirect addressing with pre-

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (Sept. 30, 2013) 1/15 538 Lecture Notes Week 5 Answers to last week's questions 1. With the diagram shown for a port (single bit), what happens if the Direction Register is read?

More information

FALSIM. FALSIM is the name of the software application which consists of the FALCON-A assembler and the FALCON-A simulator. It runs under Windows XP.

FALSIM. FALSIM is the name of the software application which consists of the FALCON-A assembler and the FALCON-A simulator. It runs under Windows XP. Lecture Handouts Computer Architecture Appendix Reading Material Handouts Summary 1. Introduction to FALSIM 2. Preparing source files for FALSIM 3. Using FALSIM 4. FALCON-A assembly language techniques

More information

Digital Signal Processor Core Technology

Digital Signal Processor Core Technology The World Leader in High Performance Signal Processing Solutions Digital Signal Processor Core Technology Abhijit Giri Satya Simha November 4th 2009 Outline Introduction to SHARC DSP ADSP21469 ADSP2146x

More information

Laboratory Exercise 3 Comparative Analysis of Hardware and Emulation Forms of Signed 32-Bit Multiplication

Laboratory Exercise 3 Comparative Analysis of Hardware and Emulation Forms of Signed 32-Bit Multiplication Laboratory Exercise 3 Comparative Analysis of Hardware and Emulation Forms of Signed 32-Bit Multiplication Introduction All processors offer some form of instructions to add, subtract, and manipulate data.

More information

ECOM 2325 Computer Organization and Assembly Language. Instructor: Ruba A.Salamah INTRODUCTION

ECOM 2325 Computer Organization and Assembly Language. Instructor: Ruba A.Salamah INTRODUCTION ECOM 2325 Computer Organization and Assembly Language Instructor: Ruba A.Salamah INTRODUCTION Overview Welcome to ECOM 2325 Assembly-, Machine-, and High-Level Languages Assembly Language Programming Tools

More information

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language The x86 Microprocessors Introduction 1.1 Assembly Language Numbering and Coding Systems Human beings use the decimal system (base 10) Decimal digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Computer systems use the

More information

MC9S12 Address Space

MC9S12 Address Space MC9S12 Address Space MC9S12 has 16 address lines MC9S12 can address 2 16 distinct locations For MC9S12, each location holds one byte (eight bits) MC9S12 can address 2 16 bytes 2 16 = 65536 2 16 = 2 6 2

More information

ECE 5655/4655 Laboratory Problems

ECE 5655/4655 Laboratory Problems Assignment #1 ECE 5655/4655 Laboratory Problems Make note of the following: Due Monday February 10, 2014 Each team of two will turn in documentation for the assigned problem(s), that is, assembly or C

More information

Question Bank Part-A UNIT I- THE 8086 MICROPROCESSOR 1. What is microprocessor? A microprocessor is a multipurpose, programmable, clock-driven, register-based electronic device that reads binary information

More information

FEATURE ARTICLE. Michael Smith

FEATURE ARTICLE. Michael Smith In a recent project, Mike set out to develop DSP algorithms suitable for producing an improved sound stage for headphones. Using the Analog Devices 21061 SHARC, he modified the phase and amplitude of the

More information

Mr. Sapan Naik 1. Babu Madhav Institute of Information Technology, UTU

Mr. Sapan Naik 1. Babu Madhav Institute of Information Technology, UTU 5 Years Integrated M.Sc.(IT) Semester 4 060010402 System Programming Question Bank Unit 1: Introduction 1. Write the decimal equivalent for each integral power of 2 from 2! to 2!". 2. Convert the following

More information

Computer Organization and Assembly Language. Lab Session 01

Computer Organization and Assembly Language. Lab Session 01 Objective: Lab Session 01 Introduction to Assembly Language Tools and Familiarization with Emu8086 environment To be able to understand Data Representation and perform conversions from one system to another

More information

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory

More information

Microcontroller Systems

Microcontroller Systems µcontroller systems 1 / 43 Microcontroller Systems Engineering Science 2nd year A2 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/2co Michaelmas 2014 µcontroller

More information

APPLICATION NOTE AN001. a simple audio level meter for the chameleon. revision chameleon S.D.K. v1.2

APPLICATION NOTE AN001. a simple audio level meter for the chameleon. revision chameleon S.D.K. v1.2 APPLICATION NOTE AN001 a simple audio level meter for the chameleon revision 3 04.2004 chameleon S.D.K. v1.2 Copyright 2001-2002 Soundart Highly Original Technologies www.soundart-hot.com Soundart makes

More information

Mechatronics Laboratory Assignment 4 Parallel Communication Glue Logic, Hardware Interrupts, Analog to Digital Conversions, and Board Fab

Mechatronics Laboratory Assignment 4 Parallel Communication Glue Logic, Hardware Interrupts, Analog to Digital Conversions, and Board Fab Mechatronics Laboratory Assignment 4 Parallel Communication Glue Logic, Hardware Interrupts, Analog to Digital Conversions, and Board Fab Goals for this Lab Assignment: 1. Gain a better understanding of

More information

The SHARC in the C. Mike Smith

The SHARC in the C. Mike Smith M. Smith -- The SHARC in the C Page 1 of 9 The SHARC in the C Mike Smith Department of Electrical and Computer Engineering, University of Calgary, Alberta, Canada T2N 1N4 Contact Person: M. Smith Phone:

More information

4 Categories Of 8085 Instructions That Manipulate Data

4 Categories Of 8085 Instructions That Manipulate Data 4 Categories Of 8085 Instructions That Manipulate Data 4 I OW of 8257 isconnected to the MEMR of system bus. A4 A15 lines to List categories of8085 instructions that manipulate data. Ans. 8085instruction,

More information

E3940 Microprocessor Systems Laboratory. Introduction to the Z80

E3940 Microprocessor Systems Laboratory. Introduction to the Z80 E3940 Microprocessor Systems Laboratory Introduction to the Z80 Andrew T. Campbell comet.columbia.edu/~campbell campbell@comet.columbia.edu E3940 Microprocessor Systems Laboratory Page 1 Z80 Laboratory

More information

ECE 3120 Lab 1 Code Entry, Assembly, and Execution

ECE 3120 Lab 1 Code Entry, Assembly, and Execution ASSEMBLY PROGRAMMING WITH CODE WARRIOR The purpose of this lab is to introduce you to the layout and structure of assembly language programs and their format, as well as to the use of the Code Warrior

More information

Instruction Set Architecture

Instruction Set Architecture Chapter 5 The LC-3 Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization address space -- how may locations can be addressed? addressibility

More information

Number Systems CHAPTER Positional Number Systems

Number Systems CHAPTER Positional Number Systems CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of

More information

Application Note, V1.0, November AP XC2000/XE166 family. ADC Result Handling on XC2000/XE166 family of Microcontrollers.

Application Note, V1.0, November AP XC2000/XE166 family. ADC Result Handling on XC2000/XE166 family of Microcontrollers. Application Note, V1.0, November. 2008 AP16155 XC2000/XE166 family ADC Result Handling on XC2000/XE166 family of Microcontrollers Microcontrollers Edition 2008-11-11 Published by Infineon Technologies

More information

ORG ; TWO. Assembly Language Programming

ORG ; TWO. Assembly Language Programming Dec 2 Hex 2 Bin 00000010 ORG ; TWO Assembly Language Programming OBJECTIVES this chapter enables the student to: Explain the difference between Assembly language instructions and pseudo-instructions. Identify

More information

Lab Experiment 9: LCD Display

Lab Experiment 9: LCD Display Lab Experiment 9: LCD Display 1 Introduction Liquid Crystal Displays (LCDs) provide an effective way for processors to communicate with the outside world. The LPC2148 board used in the lab is equipped

More information

Application Note. Introduction AN2471/D 3/2003. PC Master Software Communication Protocol Specification

Application Note. Introduction AN2471/D 3/2003. PC Master Software Communication Protocol Specification Application Note 3/2003 PC Master Software Communication Protocol Specification By Pavel Kania and Michal Hanak S 3 L Applications Engineerings MCSL Roznov pod Radhostem Introduction The purpose of this

More information

Software Examples 14.1 OVERVIEW 14 1

Software Examples 14.1 OVERVIEW 14 1 Software Examples 14 14.1 OVERVIEW This chapter provides a brief summary of the development process that you use to create executable programs for the ADSP-2100 family processors. The summary is followed

More information

Chapter 1 Introduction

Chapter 1 Introduction Chapter 1 Introduction The Motorola DSP56300 family of digital signal processors uses a programmable, 24-bit, fixed-point core. This core is a high-performance, single-clock-cycle-per-instruction engine

More information

Outline: System Development and Programming with the ADSP-TS101 (TigerSHARC)

Outline: System Development and Programming with the ADSP-TS101 (TigerSHARC) Course Name: Course Number: Course Description: Goals/Objectives: Pre-requisites: Target Audience: Target Duration: System Development and Programming with the ADSP-TS101 (TigerSHARC) This is a practical

More information

VIII. DSP Processors. Digital Signal Processing 8 December 24, 2009

VIII. DSP Processors. Digital Signal Processing 8 December 24, 2009 Digital Signal Processing 8 December 24, 2009 VIII. DSP Processors 2007 Syllabus: Introduction to programmable DSPs: Multiplier and Multiplier-Accumulator (MAC), Modified bus structures and memory access

More information

History and Basic Processor Architecture

History and Basic Processor Architecture History and Basic Processor Architecture History of Computers Module 1 Section 1 What Is a Computer? An electronic machine, operating under the control of instructions stored in its own memory, that can

More information

COSC121: Computer Systems: Review

COSC121: Computer Systems: Review COSC121: Computer Systems: Review Jeremy Bolton, PhD Assistant Teaching Professor Constructed using materials: - Patt and Patel Introduction to Computing Systems (2nd) - Patterson and Hennessy Computer

More information

Embedded Systems - FS 2018

Embedded Systems - FS 2018 Institut für Technische Informatik und Kommunikationsnetze Prof. L. Thiele Embedded Systems - FS 2018 Sample solution to Lab 0 Date : 28.2.2018 Prelab Filling the gaps Goals of this Lab You are expected

More information

Introduction to Microprocessor

Introduction to Microprocessor Introduction to Microprocessor The microprocessor is a general purpose programmable logic device. It is the brain of the computer and it performs all the computational tasks, calculations data processing

More information

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS UNIT I INTRODUCTION TO 8085 8085 Microprocessor - Architecture and its operation, Concept of instruction execution and timing diagrams, fundamentals of

More information

Programming Model 2 A. Introduction

Programming Model 2 A. Introduction Programming Model 2 A. Introduction Objectives At the end of this lab you should be able to: Use direct and indirect addressing modes of accessing data in memory Create an iterative loop of instructions

More information

Lode DSP Core. Features. Overview

Lode DSP Core. Features. Overview Features Two multiplier accumulator units Single cycle 16 x 16-bit signed and unsigned multiply - accumulate 40-bit arithmetic logical unit (ALU) Four 40-bit accumulators (32-bit + 8 guard bits) Pre-shifter,

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-2 Using ADSP-218x I/O Space Last modified 11/08/96 Introduction Digital Signal Processors (DSPs) are often chosen by designers performing arithmetic operations on binary data.

More information

WS_CCESSH-OUT-v1.00.doc Page 1 of 8

WS_CCESSH-OUT-v1.00.doc Page 1 of 8 Course Name: Course Code: Course Description: System Development with CrossCore Embedded Studio (CCES) and the ADI SHARC Processor WS_CCESSH This is a practical and interactive course that is designed

More information

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle CS 224: Computer Organization S.KHABET CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle Memory Reference Instructions

More information

ADSP-2100 Family DSP Microcomputers ADSP-21xx

ADSP-2100 Family DSP Microcomputers ADSP-21xx a SUMMARY 16-Bit Fixed-Point DSP Microprocessors with On-Chip Memory Enhanced Harvard Architecture for Three-Bus Performance: Instruction Bus & Dual Data Buses Independent Computation Units: ALU, Multiplier/

More information

OBSOLETE. ADSP-2100 Family DSP Microcomputers. This data sheet describes the following ADSP-2100 Family processors: ADSP-2105

OBSOLETE. ADSP-2100 Family DSP Microcomputers. This data sheet describes the following ADSP-2100 Family processors: ADSP-2105 a SUMMARY 16-Bit Fixed-Point DSP Microprocessors with On-Chip Memory Enhanced Harvard Architecture for Three-Bus Performance: Instruction Bus & Dual Data Buses Independent Computation Units: ALU, Multiplier/

More information

4 bits Microcontroller

4 bits Microcontroller EM MICROELECTRONIC - MARIN SA Question & answer 4 bits Microcontroller Questions and s Copyright 2001, EM Microelectronic-Marin SA 1 www.emmicroelectronic.com 1 Q: Is there an instruction to rotate left

More information

REAL TIME DIGITAL SIGNAL PROCESSING

REAL TIME DIGITAL SIGNAL PROCESSING REAL TIME DIGITAL SIGNAL PROCESSING SASE 2010 Universidad Tecnológica Nacional - FRBA Introduction Why Digital? A brief comparison with analog. Advantages Flexibility. Easily modifiable and upgradeable.

More information