Presentation is loading. Please wait.

Presentation is loading. Please wait.

Recap: Registers A register is a single byte (or word) memory element. Once written to (clocked) it remembers the input byte and outputs the same number.

Similar presentations


Presentation on theme: "Recap: Registers A register is a single byte (or word) memory element. Once written to (clocked) it remembers the input byte and outputs the same number."— Presentation transcript:

1 Recap: Registers A register is a single byte (or word) memory element. Once written to (clocked) it remembers the input byte and outputs the same number regardless of further changes at the D input… …until the next clock input of course. CLK D 0-7 Q 0-7 D 0-7 Q 0-7 CLK 88

2 Interconnecting Registers Interconnecting registers in a computer is like building roads to connect towns on a map: Silly way n towns require (n 2 -n)/2 roads A C B E D

3 Interconnecting Registers Interconnecting registers in a computer is like building roads to connect towns on a map: Sensible way Far fewer roads, (but lesser capacity) AB C E D

4 Interconnecting Registers CLK D 0-7 Q 0-7 CLK1 88 CLK D 0-7 Q 0-7 CLK2 88 CLK D 0-7 Q 0-7 CLK3 88 8

5 Register Connections Data can be written from any register to any other register Limitations Only one data transfer can happen at once In general, this is how computers work. They can only do a small number of very simple operations… …and they can only do one of them at a time. But, they do it very quickly!

6 Bi-directional Connection Connections from the common bus to the registers are bi-directional.

7 Tri-State Ports This arrangement is often known as a tri- state port. Each input/output line can have three possible states: When being read from (input/output is low) Low-Impedance, Logic 1 (or high) Low-Impedance, Logic 0 (or low) Otherwise (input/output is high) High-Impedance (or floating, open-circuit)

8 Impedance A simple switch can be thought of of having two states: Low impedance (on) High impedance (off) High impedance (tens of M  ) No current flows Low impedance (tens of  ) Current flows

9 Equivalent Circuits for Tri-State Port Low Impedance Logic 0 (Low) High Impedance Low Impedance Logic 1 (High) +5 V 0 V +5 V 0 V +5 V 0 V I/O Three ports sharing a common bus. Port 1 is in the high state, ports 2 and 3 are in the high impedance states. +5 V 0 V I/O 1 I/O 2 I/O 3

10 What NOT to do… Three ports sharing a common bus. Port 1 is in the high state, ports 2 is in the high impedance state, port 3 is in low state. Current  Only one port can be in a low-impedance (output) state at any time +5 V 0 V I/O 1 I/O 2 I/O 3

11 Tri-State Ports and a Common Bus Only one register can be read from at a time. i.e. all tri-state ports except one must be high- impedance. Any register can read and store the contents of any other. A I/O CLK I/O 8 CLK A I/O A CLK B I/O B CLK C I/O C System Bus B I/O CLK I/O C CLK I/O

12 Example To store the contents of register A in register B… 8 CLK A I/O A CLK B I/O B System Bus CLK A I/O A CLK B I/O B A I/O CLK I/O B CLK I/O B is triggered to store input from bus A – Outputs contents to bus

13 Simplifying the ALU with a Bus ALU A B S C OUT F Single input byte Control inputs Result Carry output Working register D Q CLK 8 8 Before 8 data input lines 8 data outputs ALU A B S C OUT F Control inputs Carry output Working register 8 8 8 Bus After One set of 8 shared data input/output lines

14 Example of ALU Operation To add the contents of register R 1 to the contents of register R 2 and place the result in register R 3 : WR1R1 R2R2 R3R3 System Bus 8 registers ALU Carry output A B S C OUT F 8 8 R 1 outputs to the bus, W inputs and stores. R 2 outputs to the bus, the ALU adds and stores the result in W. W outputs to the bus, R 3 inputs and stores.

15 ALU Operation Notes Although the ALU performs calculations instantaneously (nearly), this addition requires three separate operations However, it is now possible to perform ALU operations on any pair of register contents Despite this flexibility, the required connections are relatively simple

16 Automating the ALU To perform calculations like the previous example, the following control signals must be generated in sequence: Input / Output select signals to the registers Clock (latch enable) signals to the registers Selection inputs to the ALU To perform a predetermined set of operations, the corresponding sequence of control signals must be stored. This is called a program.

17 A Victorian Computer Control signals = piano key presses Sequences of key presses are stored as holes on a paper roll. This is exactly how early computer programs were stored too.

18 Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations

19 Summary The use of tri-state ports and a common system bus hugely simplifies register interconnections. With an ALU and a few registers, relatively elaborate operations can be performed. The necessary control signals could be recorded for automatic operation. Of course, we don’t really use paper tape. Instead we use program memory.


Download ppt "Recap: Registers A register is a single byte (or word) memory element. Once written to (clocked) it remembers the input byte and outputs the same number."

Similar presentations


Ads by Google