2 Review Latches Flip/flops SR D T JK What happens if we chain D flip flops together?
3 OutlineThe instruction set architectureChapter 4 in textbook
4 Problem What have you learned so far in this course? How do you structure what you have learned (or do you see any structure)?In terms of programming, what have we been working on so far?What are we missing?
5 Machine language is the language which a computer understands. It is represented in bits.As it is difficult to program using bits, we use actual words such as “add” etc…This is called assembly language.
6 Assembly languagesDependent on the specific architecture, e.g., x86, ARC etc…,In your textbook, they use simplified SPARC architecture (this is what SUN machines use) called ARC.Next: review of some of the components of a computer.
9 Data bus Data Bus: Move data between system modules. Made of several separate wires (usually from 32 to any number). Each wire is called a line.A line can carry 1 bit at a time. The number of lines determines the number of bits that can be transmitted at a given time. The number of lines is also called width.
10 Address bus Address Bus: Specify the source and destination of the data on the data bus.The width of the address bus (the number of lines/wires that make the bus) determines the memory capacity of a system.E.g., if the bus width is 16 bits (there are 16 wires), then the capacity is: ______________Usually the address can be divided into two parts: high parts contain module (e.g.: Memory, I/O etc.) address, lower part contains memory within a module.
11 Control bus The Control Bus: Sends the timing information of when a module can send or receive data. Ensures data is not garbled.Specific controls it sends: memory write/read, I/O write/read, Bus request, Bus grant, Clock, Reset etc…
12 Using the system busIf one module (e.g, I/O) wants to send data to another module (e.g., memory):It must first request “bus grant” accessTransfer the data.To execute a program:Program is first loaded from disk into memory.Each instruction is brought into the ALU from the memory along with data that needs to execute the instruction.Output is then placed on a device such as TTY display or disk.Everything is orchestrated by the Control Unit
13 Memory Collection of consecutively numbered registers. Each register holds a byte or usually (these days) 4/8 bytes.Each register has an address, called memory locationSuch machines are called byte-addressableIn memory, we use different terms …
14 Sizes • A byte is composed of 8 bits. Two nibbles make up a byte. • Halfwords, words, doublewords, and quadwords are composed of bytes as shown below:
15 Big / Little Endian• In a byte addressable memory, the smallest data that can be addressed is a byte.So how can we store a word? It is easy to see that to store a word we will need 4 bytes or 4 memory locations. We distinguish between two ways of storing a word in 4 bytes: big endian and little endianUsually, the specific way of storing depends on the Operating SystemSometimes this poses interesting problems, e.g., what if two machines have to communicate with each other and they use different endian ways to store data? E.g., in computer networks.
16 Summary so far …Memory in a computer can be byte-addressable, i.e., the smallest unit of memory that can be addressed is a byte.To store a word using multiple bytes there are two ways: big endian and little endian.Memory locations are arranged consecutively. E.g., to store a word, we use 4 consecutive bytes.Next: Memory map
17 Memory map Every computer has a finite amount of memory. This memory has to be shared by several entities: the operating system, multiple programs and input and output buffers (e.g., Network card)Hence, in most architectures to make this management easier, memory is divided into sectionsEach section is assigned to an entity.This is a memory map.
18 ARC Map Addresses Unique numbers that identify each word. e.g., 2048 Address space:The amount of total memory that can be addressed.With 32 bits, in a byte addressable memory, we can address, 232 bytes.In most architectures, I/O devices like hard disk are treated like memory, i.e., to write onto the disk, the CPU will issue a memory location. This is called memory mapped IO
19 SummaryFor this chapter we will confine ourselves to one contiguous memory.We however need to remember that there are different types of memory: including cache etc..We will look at these during a later week.But tomorrow, we will look at the chief: the CPU.