uc3m_cs

Materials used for Computer Structure

Exercise 1

(statement) It is desired to develop a controller for a traffic light. The controller has a 32-bit CPU, separate I/O map and RISC-V 32 instruction set. Two I/O modules are connected to this CPU. The first is a timer and the second is the I/O module that controls the operation of the traffic light.

The chronometer module has the following three registers:

The I/O module that controls the traffic lights has four registers:

Se pide:
  1. Write the assembler program that controls the operation of this traffic light. The traffic light always starts its operation on red.
  2. What inefficiency is identified in the above program and how could it be resolved?