Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
ELEN 33 Introduction to Digital Signal Processing Systems Course Summary 31 May 2000 The processor is a circuit. It is controlled by stored instructions in memory. It performs a cycle of fetching an instruction from memory using the program counter as the address and executing the instruction. Instructions: The four components of an instruction are the label, mnemonic, operands, and comment. Some instructions access and modify data. Load and store instructions move data between registers and memory. For the RISC machine, which is a "load and store" machine, only these instructions can access memory. Arithmetic and logic instructions perform operations on data such as addition and subtraction, Boolean logic functions, and shifting. An ALU performs these operations. The RISC machine performs these operations on registers only, but the TI TMS320C31 can use operands from memory. Some instructions change the flow of the program. Instructions are executed in the order they are stored unless one of the following types of instructions is executed: Branch, jump and link, call, return These instructions may depend on condition codes set be arithmetic, logical, shift, and load instructions. The format of an instruction defines the meaning of each bit in the instruction word. Instructions are executed by controlling the register output enables to control the input to the ALU and controlling the write enables so that the result is stored in the correct register. Data Representations: In order to interpret stored data, the set of values represented by the data must be known. This is a data type. Bit patterns can represent integers, fixed point numbers, floating point numbers, and ASCII character codes. Arithmetic Operations: Integer addition of n-bit unsigned integers creates an overflow if the carry is set. Integer addition of n-bit signed integers in 2's complement form creates an overflow if the carry into and out of the sign bit are different. This is equivalent to testing for the wrong sign in the result. Addition of floating point numbers requires a normalization step. A barrel shifter implements shifts with logic. Multiplication of two n-bit integers produces a 2n bit result. Copyright May 2000, Sally L. Wood ELEN 033 Course Summary Data Addressing Modes: For immediate and direct addressing, the operand information is in the instruction. This means that the operand information is known at the time of assembly. Immediate mode: the operand value is in the instruction. Direct Addressing mode: the operand address is in the instruction. For register and indirect addressing, the operand information is in a register. Fewer instruction bits are needed to specify operands when the operand information is in a register rather than in the instruction. Register mode: the operand value is in a register. Indirect Addressing mode: the operand address is a register. Indirect addressing may allow displacements and indexing. Data Structures: Individual variables: usually accessed with direct addressing Arrays or lists: usually accessed with indirect addressing using a starting address and a length. Stack: LIFO structure - contents of the stack are accessed using indirect addressing through the "stackpointer". Status values are stackFull and stackEmpty. Queue: FIFO structure - contents of the queue are accessed using indirect addressing through the "head" and the "tail" pointers. Memory implementation uses a circular buffer. Status values are queueFull and queueEmpty Program Structures: If (expr) stmt1 else (stmt2); While(expr) stmt; For (expr1; expr2; expr3;) stmt; Do stmt while(expr) Test expr1 bne E Instructions for stmt1 Br D E: Instructions for stmt2 D: Continue br T W: Instructions for stmt T: Test expr1 be W Expr1; While(expr2) { stmt; expr3; } W: Instructions for stmt T: Test expr1 be W Bit testing with carry Bit testing with indicator bit Use rotate or logical shift left or right into the carry position. Check carry status Note: If expr is always true the program will loop through the instructions labeled with W forever. Like the while loop except the statement is always executed once Set testBit to 1 C: And testBit with word of interest bz to Z Do "bit one" stuff br S Z: do "zero bit" stuff S: Shift testBit left by one br to C if not done Copyright May 2000, Sally L. Wood ELEN 033 Course Summary