Presentation on theme: "ITEC 352 Lecture 10 Instruction Set Architecture."— Presentation transcript:
ITEC 352 Lecture 10 Instruction Set Architecture
ISA Review Latches –SR –D Flip/flops –D –T –JK What happens if we chain D flip flops together?
ISA Outline The instruction set architecture Chapter 4 in textbook
ISA 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?
ISA Machine language 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.
ISA Assembly languages Dependent 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.
ISA 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.
ISA 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.
ISA Control bus The Control Bus: 1.Sends the timing information of when a module can send or receive data. Ensures data is not garbled. 2.Specific controls it sends: memory write/read, I/O write/read, Bus request, Bus grant, Clock, Reset etc…
ISA Using the system bus If one module (e.g, I/O) wants to send data to another module (e.g., memory): (1)It must first request bus grant access (2)Transfer 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
ISA 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 location Such machines are called byte-addressable In memory, we use different terms …
ISA 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:
ISA 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 endian Usually, the specific way of storing depends on the Operating System Sometimes 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.
ISA 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
ISA 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 sections –Each section is assigned to an entity. This is a memory map.
ISA 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, 2 32 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
ISA Summary For 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.