Download presentation
Presentation is loading. Please wait.
Published byLuke Cannon Modified over 9 years ago
1
Control pins and Writing Microcode
2
Simple architecture Recall our architecture from the previous week It was a simple bus architecture “Control” was a ROM-based unit connected to the control pins of the other parts; the micro-code was stored there
3
Input port 1Accumulator ALU Flags Input port 2 Prog. counter Mem.Add.Reg. Memory MDR Instr. Reg. Control C B TMP Output port 3 Output port 4 Display Keyboard encoder Bus
4
Data Movement Many of the micro-code steps involve moving data and addresses to various locations (registers, memory locations, etc.) The information is often, but not always, sent over the bus So information must be put on and taken from the bus
5
Load and Enable With memory, one talks about reading and writing With registers and the bus, one talks about enabling and loading Enabling: placing a value from a register on the bus Loading: placing a value from the bus into a register
6
Register Control pins A register that takes values off of the bus (e.g. the Memory Address Register, MAR) will need a “load” control pin It does not always take the value on the bus, instead it takes the current value on the bus when the load pin is “activated” “Active high”means the action is performed when the pin is high “Active low” means the action is performed when the pin is low
7
The clock pin The clock is another control pin (sometimes called a timing pin) which determines when a register takes the value on the bus The load input determines if the register takes the value The clock input determines when the register takes the value
8
The clock A binary clock: 10101010101010101010 Each cycle (01) should take the same amount of time (the time for a cycle: the period) The number of cycles in a second is called the frequency “on the edge:” many registers load on the clock’s edge Positive edge: as 0 goes to 1 Negative edge: as 1 goes to 0
9
Enable The reverse of a load is an enable, this is when a device places a value on the bus A register that places values on the bus (e.g. the buffer associated with an input port) must have an “enable” control pin Again enabling may be active high or active low
10
“Only one bus driver” Only one item can place its value on the bus (“drive the bus”) at a time. WHY? Suppose two items drive the bus and that they have different values Then there would be a direct connection (the bus is essentially just wire) between a high voltage and a low voltage Since wire offers little resistance, there would be a very large current – a.k.a. a short Large currents destroy digital circuits
11
Three-State logic If a device is not driving the bus, it must be effectively disconnected from the bus Otherwise the short problem Thus we need three-state logic High Low Disconnected
12
Tri-State buffer “Disconnecting” all devices except the “bus driver” from the bus is done with tri-state buffers These are not shown in our diagram and are distinct from chips Thus we won’t find the kind of “enable” control pins discussed here on chips
13
Other control pins Items involved in data manipulation (as opposed to simply data movement) will require additional control pins For example, the program counter needs to be incremented Thus additional control pins are required These pins are sometimes also referred to as “enable” pins, as they enable a particular action
14
ALU control The primary data manipulator is the ALU We have seen control pins in a simple ALU They select between logic and arithmetic functions (M) They select among the various functions of that type (S0, S1, S2, S3)
15
Micro-code is Micro-code is 1’s and 0’s stored in ROM The ROM output is connected to control pins For example, one micro-code instruction is to take the value from the program counter to the memory address register So send active signals to “enable the PC” and “load the MAR”
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.