Micro Programmed Control Unit

download Micro Programmed Control Unit

of 34

  • date post

    13-Jul-2015
  • Category

    Documents

  • view

    78
  • download

    0

Embed Size (px)

Transcript of Micro Programmed Control Unit

CHAPTER 6: Microprogrammed Control Unit Design6.1. 6.2. 6.3. 6.4. 6.5. 6.6. 6.7. 6.8. 6.9. 6.10. 6.11. Introduction Terminology Microprogrammed Control: Advantages and Disadvantages Components of Microprogrammed Control Unit Clock Period Computation Microprogrammed Control Example Generic Microsequencer Microprogram Optimization: Definition Microinstruction Encoding Example Microprogram Optimization Algorithm Complex Microprogramming Structures

1

M. Balakrishnan: Only for limited circulation for the Ethiopian class

CHAPTER 6: Microprogrammed Control Unit Design6.1. Introduction Microprogramming is an alternative to what is referred to as hardwired approach for designing the control part of a system. The state machine implementations shown in chapter 4 are referred to as hardwired implementations. The key benefit of microprogramming is its flexibility in making design changes without having to redesign or rewire the system. This makes it extremely useful during the design and development phase as frequent modifications are inevitable at this stage. Status Signals Data Part Control Signals Figure 6.1 Control-Data Interaction The control part and the data part (also referred to as data path) are the two major components of any system. These parts interact via two sets of signals the status signals from the data to the control and the control signals from the control to the data part. The data part contains the resources for storing and performing operations (transformations) on data values whereas the control part sequences these operations/data transfers in a specific order to implement the algorithm. The control part controls the sequence of operations by issuing the control signals in a specific order. As in most algorithms, the sequence of operations to be performed is not independent of the data values i.e. it does depend on the result of intermediate operations on specific data. The data operation results required for such flow control are conveyed by the data part to the control part by a set of signals called status signals. These signals typically capture the result in a binary form as whether a particular condition (e.g. a > b) is true or false. This clear separation of the design into control and data in some sense represent an extreme design approach. In most complex designs, one would find a less ideal situation with control part also performing some data operations and data part also implementing some control steps. For an experienced designer this may be easy to handle but for a student learning to design, it is strongly felt that this distinction between control and data and a strict separation between the two be clearly enforced. In the initial stages, this ensures faster development through a systematic debug methodology. Over a period, the designer learns to consciously integrate data operations in control and control steps in data units for efficiency reasons. An algorithm today is best captured in terms of what is referred to as RTL description. RTL stands for register transfer level and primarily involves primitive operations and transfer of data between registers or storage elements. These are typically operations which can be performed in one step (or simply one cycle) in the hardware. For this to happen, all such primitive operations in the RTL description are supported by combinational units in the data path which can implement those operations. A more detailed description and examples of RTL would follow in the next two chapters. Control Part

2

M. Balakrishnan: Only for limited circulation for the Ethiopian class

RTL descriptions typically do not separate control and data parts. From such an RTL description, the control can be synthesized through one of the following options: Extract FSM and synthesize using hardwired logic Extract a microprogram and synthesize microprogrammed control Extract FSM (Moore machine) and synthesize using microprogrammed control In an unstructured manual design approach one can also use what is referred to as adhoc controller which does not go through a structured intermediate step of FSM or Microprogramming. 6.2. Terminology Before we discuss microprogramming in detail, we would like to clearly define the associated terminology. Text box titled Figure 6.2 presents the most important terms related to microprogramming. The name microprogram comes from the level at which this program exists. In case of the processor or microcontroller, it is at a level even lower than the machine level i.e. it is internal to the machine and represents the internal control of the machine. Normally this level is not visible to the user. A set of microinstructions which implements the control by both providing the control signals and testing the conditions/status signals to take control flow decisions is referred to as microprogram. Microinstructions are the components of a microprogram as a collection of microinstructions represent a microprogram. These microinstructions may be either written directly in the binary from or in a symbolic form with one-to-one mapping to the binary form. In some sense they represent a single control step and carry signals for activating all the data units required for carrying out operations in that specific step. For the purposes of this book, we would always associate one clock period with each control step which means each microinstruction takes one clock period to execute. Each microinstruction consists of a number of control signals which activate different components in the data part to perform these operations concurrently. Each of the indivisible unit operations is referred to as micro-operation and refers to the most primitive controllable operation in the microarchitecture of the design. A microinstruction is nothing but a set of micro-operations which are concurrently executed in a specific step. Not all micro-operations can be executed concurrently as each of them requires some resources and mainly contention for the same resource prevents concurrency among pairs of micro-operations. e.g. In a data part with ALU, taking operands from two registers connected to the ALU input ports, adding them and storing in another register connected to the ALU output port is a micro-operation. Such a micro-operation cannot be activated concurrently with another micro-operation which utilizes the same ALU for performing subtraction. It should be clear that a single micro-operation may require multiple control signals; apart from function select of ALU, the add micro-operation defined above may require control signals for bringing/routing the register operands to the ALU input ports, taking the ALU output to the result register input port and control signal for latching the result register.

3

M. Balakrishnan: Only for limited circulation for the Ethiopian class

Microprogram: A set of microinstructions which represents the control for implementing a specific algorithm on a given data part. Microinstruction: Each microinstruction consists of a set of control signals which correspond to a set of micro-operations which are activated concurrently in one control step. Micro-operations: Each micro-operation is an indivisible register transfer operation which may require one or more control signals to be activated. Microinstruction format: Microinstruction format refers to the specific organization of control signals in the form of microinstruction fields and their bit position that defines the microinstruction. Microsequencer: The role of the microsequencer is to generate a sequence of addresses for the microprogram ROM taking into account the status signals originating from the datapart. These addresses are used to fetch the next microinstruction and thus the microsequencer is also known as the next address generator. Control/Microprogram ROM: This is memory unit where the set of control signals which constitutes the microinstructions and consequently microprogram are stored. Microprogram register: The microprogram register acts as an interface between the control and data parts it contains the current microinstruction that is being executed by the data part in a given control step/clock cycle.

Figure 6.2 Definition of terms related to Microprogramming To understand the functionality of the remaining terms, refer to figure 6.3 which shows a block diagram of a typical microprogrammed system. The microsequencer is a key component which continuously generates the sequence of addresses for the control ROM and thus is also referred to as the next address generator. The microsequencer typically contains a register called microprogram counter (PC) which has a role in relation to microprogram that is very similar to the role program counter (PC) has vis-a-vis the program in a processor. The sequence of addresses generated in some sense encapsulates the control flow of the algorithm and thus the microsequencer has to respond to the status signals originating from the data part. Control/microprogram ROM stores the microprogram in the form of a sequence of microinstructions. Each bit of the microprogram corresponds to the control signals required to activate the data part or a signal required to help generate the next address. A set of bits (or a word of microprogram) fetched simultaneously constitute a microinstruction and correspond to the control signals that are activated concurrently. A larger microprogram width usually means a larger and more concurrent data part. The vertical size of the microprogram in some sense defines the complexity of the algorithm being implemented. The word ROM is used in a legacy sense and very often the miroprogram today is stored in a RAM so that the control can be easily modified. Still by and large, when the module is executing, microprogram control does not change (at least not rapidly) and thus the behavior is more like a ROM.

4

M