Computer Architecture
Section 5 Problems:
- 1. Capture the following system behavior as a High Level State Machine
(HLSM). A system must track the number of times an input, T, toggles. A
toggle is a change from 0 to 1 or 1 to 0. The number of toggles is tracked
by a 20-bit output, C[19..0]. When a maximum number of toggles, M[19..0],
is reached, the output C stops changing and holds the maximum value
until the circuit is reset by the active high reset input, R.
- 2. Create a high level state machine (HLSM) for a simple data
encryption/decryption device. If a single-bit input B is 1, the device
stores the data from a 32-bit signed input I, referring to this as an
offset value. If B is 0 and another single-bit input E is 1, then the
device "encrypts" its input I by adding the stored offset value to I and
outputs this encrypted value over a 32-bit signed registered output J.
If both B and E are zero and another single-bit input D is 1, the
device "decrypts" the data on I by subtracting the offset value before
outputting the decrypted value on the output J. When not encrypting or
decrypting, the value of the output J is held. Be sure to explicitly
handle all possible combinations of B, E and D.
- 3. For the given HLSM
- A. Design a datapath circuit. Be sure to give all control signals
informative names.
- B. Design the FSM for a controller to drive the datapath.
- 4. For the given HLSM
- A. Design a datapath circuit. Be sure to give all control signals
informative names.
- B. Design the FSM for a controller to drive the datapath.
Inputs: Data_in (8 bits), doCalc (bit)
Ouputs: Out (8 bit)
Local Registers: t1 (8 bits), t2 (8 bits)