ECE 3561 - Lecture 1 1 The Hardware Multiplier Department of Electrical and Computer Engineering The Ohio State University ECE 2560.

Slides:



Advertisements
Similar presentations
Assembly Language.
Advertisements

Code Composer Department of Electrical and Computer Engineering
Machine Instructions Operations
Week 3. Assembly Language Programming  Difficult when starting assembly programming  Have to work at low level  Use processor instructions >Requires.
There are two types of addressing schemes:
Instruction Set Architecture Classification According to the type of internal storage in a processor the basic types are Stack Accumulator General Purpose.
Computer Organization and Architecture
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Instruction Set Architecture & Design
Execution of an instruction
Microprocessors Introduction to RISC Mar 19th, 2002.
Embedded Systems: Hardware Computer Processor Basics ISA (Instruction Set Architecture) RTL (Register Transfer Language) Main reference: Peckol, Chapter.
UBI >> Contents Chapter 12 Hardware Multiplier MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar,
The MSP430xxxx Department of Electrical and Computer Engineering
Parul Polytechnic Institute Parul Polytechnic Institute Subject Code : Name Of Subject : Microprocessor and assembly language programming Name.
ECE Lecture 1 1 Binary number system Department of Electrical and Computer Engineering The Ohio State University ECE 2560.
ECE 265 – LECTURE 12 The Hardware Interface 8/22/ ECE265.
ECE 447 Fall 2009 Lecture 5: TI MSP430 Software Development in C and Assembly pt. 2.
The 8051 Microcontroller and Embedded Systems
8.3 Stack Organization Stack: A storage device that stores information in such a manner that the item stored last is the first item retrieved. Also called.
1 Introduction Chapter 1 n What is Assembly Language? n Data Representation.
Basic Architecture Lecture 15. In general, if the number of bits is n, then the number of different combinations of 0s and 1s that can be made is 2 n.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Lecture 4 ( Assembly Language).
05/03/2009CA&O Lecture 8,9,10 By Engr. Umbreen sabir1 Computer Arithmetic Computer Engineering Department.
Execution of an instruction
COMPUTER ARCHITECURE INSTRUCTION SET ARCHITECTURE.
Lecture 14 Today’s topics MARIE Architecture Registers Buses
Computer Architecture Lecture 03 Fasih ur Rehman.
Computer Studies/ICT SS2
DIGITAL SIGNAL PROCESSORS. Von Neumann Architecture Computers to be programmed by codes residing in memory. Single Memory to store data and program.
Intel 8051 Another family of microcontroller is the Intel 8051 family. The basic 8051 microcontroller has four parallel input/output ports, port 0, 1,
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
ECE 447 Fall 2009 Lecture 4: TI MSP430 Architecture and Instruction Set.
COMP3221: Microprocessors and Embedded Systems--Lecture 10 1 COMP3221: Microprocessors and Embedded Systems Lecture 10: Shift and Bit-set Instructions.
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Structure and Role of a Processor
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
UBI >> Contents Lecture 13 Hardware Multiplier, Flash Programming & TLV Structure MSP430 Teaching Materials Texas Instruments Incorporated University of.
1 Chapter 1: Introduction Appendix A: Binary and Hexadecimal Tutorial Assembly Language for Intel-Based Computers, 3rd edition Kip R. Irvine.
CPU Lesson 2.
CS501 Advanced Computer Architecture
Microprocessor Systems Design I
Lecture on Microcomputer
ADDRESSING MODES.
Overview Introduction General Register Organization Stack Organization
TAO1221 COMPUTER ARCHITECTURE AND ORGANIZATION LAB 3 & 4 Part 1
ADDRESSING MODES.
Intel 8088 (8086) Microprocessor Structure
CS-401 Assembly Language Programming
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
SCHOOL OF ELECTRONICS ENGINEERING Electronics and Communication
Final Exam Review Department of Electrical and Computer Engineering
Computer Organization and ASSEMBLY LANGUAGE
Intel 8088 (8086) Microprocessor Structure
Introduction to Micro Controllers & Embedded System Design
MIPS Assembly.
By: A. H. Abdul Hafez Computer Architecture and Organization: L06: Stored program and Instruction code.
MARIE: An Introduction to a Simple Computer
CNET 315 Microprocessor & Assembly Language
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
The ARM Instruction Set
Instruction Set Summary
CS501 Advanced Computer Architecture
Computer Architecture Assembly Language
Presentation transcript:

ECE Lecture 1 1 The Hardware Multiplier Department of Electrical and Computer Engineering The Ohio State University ECE 2560

HLL to Assembler The multiply routine The hardware multiplier Details on it How to use it Speed ECE Lecture 1 2

Had done a multiply routine Dumb – recursive add to multiply Better – Shift and add – finite fixed time Even better – a dedicated hardware multiplier MSP 430 does not have a multiplier or multiply instruction MSP 430 chip has more than a small processor on it. There are also peripheral devices, one of which is a multiplier and available on some versions. (reference documentation) ECE Lecture 1 3

The hardware multiplier Supports Unsigned multiply Signed multiply Unsigned multiply accumulate Signed multiply accumulate How is operation determined? The type of operation is selected by the address the first operand is written to. ECE Lecture 1 4

The operands The first operand written to the multiplier periperal. Determines the operation 0130h – multiply (unsigned) (MPY) 0132h – signed multiply (MPYS) 0134h – multiply accumulate (unsigned) (MAC) 0136h – signed multiply accumulate (MACS) The second operand OP2 Written to address 0138h All are words (16 bits) and are read/write locations. ECE Lecture 1 5

The results When using indirect or indirect autoincrement addressing mode to access the result (32 bits), at least one instruction is needed between loading of OP2 and accessing one of the result registers, RESLO, RESHI RESLO – address 013Ah RESHI – address 013Ch ECE Lecture 1 6

Accessing result example Accessing results with indirect addressing mov #RESLO,R5 mov &oper1,&MPY mov &oper2,&OP2 nop ECE Lecture 1 7

The overall architecture Figure 7-1 from manual ECE Lecture 1 8

Other concerns Interrupts The multiplier does not use interrupts However – Using the hardware multiplier requires several instruction to set up the multiplier and get results. If an interrupt occurs during this period and interrupt routine uses multiplier then results will be invalid. SOLUTION? Disable interrupts before use if there is an interrupt service routine that uses the multiplier. ECE Lecture 1 9

Other concerns (2) The SUMEXT register contents – at address 013Eh SUMEXT contains for MPY – always 0000h MPYS – result positive or zero – 0000h result negative – FFFFh MAC – no carry for result – 0000h result has carry – 0001h MACS - result positive or zero – 0000h result negative – FFFFh ECE Lecture 1 10

Execution time If interrupts are disabled (DINT) – 1 cycle Set up Rx for results addr – 2 cycles Move operands to hw multipler - 6 each – 12 cycles total The NOP – 1 cycle Retrieve results – 12 cycles Re-enable interrupt (EINT) – 1 cycle TOTAL TIME = 29 cycles ECE Lecture 1 11

Comparison Hardware multiplier – 29 cycles Shift and multiply routine – 83 cycles As is typical of such operations, dedicated hardware support can improve performance. ECE Lecture 1 12

Demonstration of use A short program can be written to demonstrate use. - DEMO This also demonstrates the use of I/O ports as the hardware multiplier is a peripheral. ECE Lecture 1 13

The program mov#0x013A,R5 mov#3,&0x0130 mov#3,&0x0138 nop ECE Lecture 1 14

What happened It does not seem to work. What to do? Look at the documentation. msp430g2553 Data Sheet ECE Lecture 1 15

ECE Lecture 1 16 Summary - Assignment When encountering issues look to documentation on the specific chip. Manual are for the family typically.