From Code to Hardware: Understanding the Mapping of Code to Hardware Components and ALUs, Slides of Assembly Language Programming

An in-depth look at the process of converting code into hardware, focusing on the role of multiplexors and alus. It explains how a 14-bit code representation is used to control multiplexors, which can select one of 32 input voltages and send it to an output. The document also covers the structure and functionality of various alus, from simple 1-bit alus that perform and, or, and addition operations, to more complex 32-bit alus. Students will gain a better understanding of the hardware components involved in the conversion process.

Typology: Slides

2011/2012

Uploaded on 07/26/2012

parinita
parinita 🇮🇳

4.8

(6)

67 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
From Code To Hardware 1
From Code To Hardware
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download From Code to Hardware: Understanding the Mapping of Code to Hardware Components and ALUs and more Slides Assembly Language Programming in PDF only on Docsity!

From Code To Hardware

1

From Code To Hardware

From Code To Hardware

2

The Plan

•^ We start with code. •^ From that code we get a 32-bit equivalent binaryrepresentation. •^ The binary maps what the hardware looks like. •^ The hardware reads each of those fields. •^ The hardware performs an operation.

From Code To Hardware

4

From that code we get a 14-bitEquivalent Binary Representation. 19 05D3^3023

movlw^ low^ u

20 05D4^1283

bcf^ 3,

21 05D5^1303

bcf^ 3,6^ ;carry

unused

22 05D6^ 00A^

movwf^ ?_printf

23 05D7^3000

movlw^ high^ u

24 05D8^ 00A^

movwf^ ?_printf+

25 05D9^ 25D^

call^ _printf

27 05DA^0183

clrf^33 0

3 11 0000 0011

(^0011) C 0 511100 00 00110011 docsity.com

From Code To Hardware

5

What the hardware looks like.Multiplexors SelectorInput bits^0 Output 31

SelectorOutputs Input

The 5 selector wires can choose one ofthe 32 inputs voltages and send it tothe output.

The 5 selector wires choose which of the32 outputs will get the input voltage.

From Code To Hardware

7

What the hardware looks like.ALUOn this and the next few pages,we look at increasinglycomplicated forms of ALU.These pictures are taken fromFigs 4.14, 4.17, 4.18, & 4.19 inthe text.

A 1-bit ALU that performs AND, OR,and ADDITION.

From Code To Hardware

8

What the hardware looks like.ALU – Continued^ A 1-bit ALU that performs AND, OR, and ADDITION.

The possible inputs are a, b, and b

Causes set onLess operation.

From Code To Hardware

10

What the hardware looks like.

ALU – Continued

4 m 32 B^32 S^ ALU 32 A ovfc

From Code To Hardware

11

What the hardware looks like.Registers R0 R8 R

MUXToALU MUXFromALU

ALU MUXToALU

Op A^ B Out

Select^ 5 wires

6 wires

c ovf

From Code To Hardware

13

The hardware reads each of those fields.Registers R0 R8 R

MUXToALU MUXFromALU

ALU MUXToALU

Out 000000 01001

01010 01000

00000

100000 0 9

10 8

(^0 32) A^ B