Computer Functional Units: From Data to Action
Computer Functional Units divide a computer's work into identifiable jobs: accepting information, holding it, processing it, coordinating operations, and delivering results. You can use these jobs to trace a sensor reading through a controller or explain how a calculation reaches a display. The units cooperate; a useful result usually requires several of them.
Identify each unit's job
A functional unit is a part of a computer identified by the task it performs. One physical chip can contain several functional units, so a functional diagram does not necessarily show separate devices.
The input unit accepts information from outside the computer. A keyboard interface, for example, receives keystrokes; a sensor interface receives measurements. The output unit communicates results to an external device, such as a display, printer, or actuator.
The arithmetic and logic unit, or ALU, performs operations on supplied operands. These include addition, subtraction, logical operations, and comparisons. A comparison can produce a condition flag, such as whether one value exceeds another, rather than a numerical result for display.
The control unit coordinates operations. It fetches and decodes instructions, selects the required ALU operation, and issues signals that direct transfers and register updates. In a simplified processor model, the central processing unit, or CPU, contains the control unit, ALU, and registers.
Distinguish holding data from moving data
A register is a small storage location within the CPU that holds information needed during processing. Depending on its purpose, a register can hold an operand, an intermediate result, an instruction, or an address.
Main memory holds instructions and working data that the processor accesses. Secondary storage retains programs and data for longer periods. The following distinctions describe a common computer with volatile RAM and nonvolatile secondary storage.
Location | Typical role | What happens when power is removed? |
|---|---|---|
CPU registers | Hold active operands, addresses, and results | Contents are normally lost |
Main memory using RAM | Hold running programs and working data | Contents are normally lost |
Secondary storage, such as flash | Retain programs and saved data | Contents are retained |
Connections carry information between units. A data connection carries values or instructions, an address identifies a location or destination, and control signals specify actions such as reading or writing. A bus is a shared communication path; actual computers can use several buses and other interconnections. The diagram groups these connections to emphasize their roles.
For an addition, the processor can load operands into registers, present them to the ALU, and capture the result in another register. Output occurs only when the result is transferred to an output interface. Producing an ALU result and saving that result are distinct events.
Account for the time each unit uses
When a stated model performs operations sequentially, with no overlap, add their elapsed times:
Here, Nmem counts memory transfers and tmem is the time per transfer. Similarly, NALU counts ALU operations and tALU is the time per operation. All times must use matching units. Any instruction fetching or control activity must either be included in these supplied times or added separately.
For example, suppose input takes 0.50 ms, two memory transfers each take 0.10 ms, three ALU operations each take 0.05 ms, and output takes 0.35 ms. With control activity already included, the total is 0.50+2(0.10)+3(0.05)+0.35=1.20 ms.
What to remember
- Input receives information; output communicates results.
- The ALU operates on data; the control unit coordinates actions.
- Registers, main memory, and secondary storage serve different holding roles.
- Add elapsed times only when the model specifies sequential operation without overlap.
Example: A Sensor Controller's Data Path
A controller receives a sensor reading of 1.80 V. It reads a correction of +0.20 V and a threshold of 2.10 V from main memory. It adds the correction, compares the corrected value with the threshold, and sends an indicator command. The indicator turns on when the corrected value is greater than or equal to the threshold.
Use a simplified model with these timings:
Activity | Timing |
|---|---|
Input reading into a CPU register | 0.80 ms |
Reading each of the two stored values | 0.12 ms per memory transfer |
Addition and comparison | 0.03 ms per ALU operation |
Output command | 0.50 ms |
All activities occur sequentially. The supplied times include instruction fetching, register updates, and associated control activity. There are no other delays.
a) Find the corrected voltage and indicator state. Identify the roles of input, memory, registers, the ALU, the control unit, and output.
The input unit receives the sensor reading and places its numerical representation in a CPU register. Main memory supplies the correction and threshold, which are loaded into registers for processing.
The ALU first adds the correction:
It then compares the corrected value with the threshold:
The condition for turning on the indicator is false, so the output unit sends an off command. Registers hold operands and intermediate results during these operations. The control unit coordinates the memory reads, selects addition and comparison, and enables the required register updates and output transfer.
The corrected voltage is 2.00 V, and the indicator is off.
b) Calculate the elapsed time for one complete cycle.
Count both memory reads and both ALU operations. Because none of the activities overlap, their elapsed times add directly. Control activity is already included, so adding another control-time allowance would double-count it.
One complete cycle takes 1.60 ms.
c) Calculate the total elapsed time for 250 cycles performed consecutively with these same activity counts and timings. Give the result in seconds. Assume there is no delay between cycles.
Each cycle must finish before the next begins, and every cycle takes the same time. Multiply the number of cycles by the elapsed time per cycle, then convert milliseconds to seconds.
The total elapsed time is 0.400 s. This multiplication uses the stated absence of both overlap and delays between cycles.
A greenhouse controller receives measurements, processes instructions, and sends commands to equipment. A functional unit is a component assigned a particular kind of task. Match each listed component to its principal responsibility within this controller.
Carries data, addresses, and commands between internal components.
Sends processed commands from the computer to external equipment.
Interprets instructions and issues signals that coordinate their execution.
Accepts measurements from sensors and makes them available for processing.
Output unit
Input unit
Control unit
System interconnect
A controller has a small bank of scalar CPU registers, volatile main memory (RAM), and nonvolatile flash storage. It needs three locations:
- An active operand directly available to the ALU.
- A large temporary measurement buffer, far larger than the register bank.
- A saved calibration file that survives removal of power.
Which allocation best matches these purposes, in the order listed?