How Many Clock Cycles Are Required To Enter The Data Into The Register In Figure 11-3?
-
A program residing in the memory unit of measurement of the estimator consists of a sequence of instructions. The programme is executed in the figurer past going through a bike for each educational activity. Each educational activity cycle in turn is subdivided into a sequence of subcycles or phases. In the bones computer each educational activity cycle consists of the following phases:
-
1. Fetch an instruction from retentivity. two. Decode the pedagogy. iii. Read the effective address from retentivity if the instruction has an indirect accost. 4. Execute the pedagogy.
-
Upon the completion of step 4, the control goes back to step 1 to fetch, decode, and execute the next education. This process continues indefinitely unless a HALT didactics is encountered.
-
Fetch and Decode
-
Initially, the program counter PC is loaded with the accost of the first instruction in the program.
-
The sequence counter SC is cleared to 0, providing a decoded timing signal T0. Afterward each clock pulse, SC is incremented by 1, and so that the timing signals go through a sequence T0, T1, T2, and then on.
-
The rnicrooperations for the fetch and decode phases tin can be specified by the following register transfer statements.
-
T0: AR ← PC T1: IR ← M[AR], PC ← PC + 1 T2: D0, .... , D7 ← Decode IR(12-fourteen), AR ← IR(0-xi), I ← IR(15)
-
Since only AR is continued to the accost inputs of retentiveness, it is necessary to transfer the address from PC to AR during the clock transition associated with timing signal T0. The education read from retentiveness is and then placed in the teaching register IR with the clock transition associated with timing signal T1.
-
-
At the same fourth dimension, PC is incremented past one to prepare it for the address of the side by side educational activity in the plan. At time T2, the operation code in IR is decoded, the indirect bit is transferred to flip-flop I, and the accost part of the instruction is transferred to AR .
-
Note that SC is incremented after each clock pulse to produce the sequence T0, T1, and T2
-
Figure in a higher place shows how the kickoff two register transfer statements are implemented in the autobus arrangement.
-
To provide the information path for the transfer of PC to AR nosotros must apply timing point T0 to reach the post-obit connectedness:
-
1. Place the content of PC onto the coach by making the bus selection inputs S2Due south1S0 equal to 010. ii. Transfer the content of the bus to AR by enabling the LD input of AR .
-
The next clock transition initiates the transfer from PC to AR since T0 = i. In club to implement the second statement : T1: IR ← M[AR], PC ← PC + i it is necessary to use timing signal T1 to provide the following connections in the coach organization.
-
ane. Enable the read input of memory. 2. Identify the content of retentiveness onto the bus by making South2SouthwardoneS0 = 111. 3. Transfer the content of the bus to IR by enabling the LD input of IR. 4. Increase PC past enabling the INR input of PC.
-
The next clock transition initiates the read and increment operations since T1 = i.
-
Effigy above duplicates a portion of the bus organisation and shows how T0 and T1 are connected to the control inputs of the registers, the memory, and the bus selection inputs. Multiple input OR gates are included in the diagram because there are other control functions that will initiate similar operations.
-
The timing signal that is active subsequently the decoding is T3. During time T3, the control unit of measurement determines the type of instruction that was just read from retentivity.
-
The flowchart of Fig. beneath presents an initial configuration for the instruction cycle and shows how the control determines the instruction type after the decoding.
-
The three possible education types available in the basic estimator are specified in Fig. on basic calculator formats.
-
Decoder output Dvii is equal to one if the operation code is equal to binary 111. From Fig. on basic computer formats we determine that if D7 = one, the teaching must be a
-
register-reference or input-output blazon.
-
If D7 = 0, the operation code must exist 1 of the other seven values 000 through 110, specifying a retentivity-reference instruction.
-
Control then inspects the value of the first bit of the instruction, which is now available in flip-flop I. If D7 = 0 and I = 1, we accept a retention reference teaching with an indirect accost.
-
It is then necessary to read the effective address from memory. The microoperation for the indirect address condition tin can be symbolized by the register transfer statement : AR ← M[AR]
-
Initially, AR holds the address part of the didactics. This accost is used during the memory read operation. The discussion at the address given by AR is read from memory and placed on the common motorcoach. The LD input of AR is so enabled to receive the indirect accost that resided in the 12 least significant bits of the retentivity word.
-
The three instruction types are subdivided into iv dissever paths. The selected operation is activated with the clock transition associated with timing bespeak Tiii. This can be symbolized equally follows:
-
D'7 ITiii: AR ← Grand[AR] D'7 I'T3: Zip Dvii I'T3: Execute a register-reference instruction D7It3: Execute an input-output instruction
-
When a memory-reference instruction with I = 0 is encountered, it is not necessary to practice anything since the effective address is already in AR.
-
Yet, the sequence counter SC must exist incremented when D'sevenT3 = ane, and then that the execution of the memory-reference education can be continued with timing variable T4
-
A annals-reference or input-output instruction can be executed with the clock associated with timing indicate Tiii. After the instruction is executed, SC is cleared to 0 and control returns to the fetch phase with T0 = ane.
-
Notation that the sequence counter SC is either incremented or cleared to 0 with every positive clock transition. We will adopt the convention that if SC is incremented, we will not write the argument SC ← SC + 1, but it will be implied that the control goes to the next timing signal in sequence. When SC is to be cleared, we will include the statement SC ← 0.
-
The register transfers needed for the execution of the register-reference instructions are presented in this section.
-
Register-reference instructions are recognized by the command when Dseven = 1 and I = 0.
-
These instructions use bits 0 through 11 of the teaching code to specify i of 12 instructions.
-
These 12 bits are available in IR(0-11). They were as well transferred to AR during time T2.
-
The control functions and microoperations for the register-reference instructions are. listed in Table below. These instructions are executed with the clock transition associated with timing variable T3.
-
Each control function needs the Boolean relation D7I'T3, which we designate for convenience by the symbol r.
-
The command function is distinguished past 1 of the bits in IR(0-11). By assigning the symbol Bi to bit i of IR, all command functions can be only denoted by rBi.
-
For example, the instruction CLA has the hexadecimal code 7800, which gives the binary equivalent 0111 thousand 0000 0000. The first bit is a zilch and is equivalent to I'.
-
The next iii bits found the functioning code and are recognized from decoder output D7. Bit 11 in IR is I and is recognized from B11. The control function that initiates the microoperation for this pedagogy is D7I'TthreeBxi = rB11.
-
The execution of a register-reference instruction is completed at time Tthree.
-
The sequence counter SC is cleared to 0 and the control goes back to fetch the next instruction with timing signal T0.
-
The offset seven register-reference instructions perform clear, complement, circular shift, and increment microoperations on the Air-conditioning or E registers.
-
The adjacent four instructions crusade a skip of the side by side instruction in sequence when a stated condition is satisfied. The skipping of the instruction is achieved past incrementing PC in one case once again (in addition, information technology is beingness incremented during the fetch phase at time T1).
-
The condition control statements must be recognized as office of the control weather .
-
The Air-conditioning is positive when the sign bit in Air-conditioning(15) = 0; it is negative when Air conditioning(15) = 1. The content of AC is zero (Air conditioning = 0) if all the flip-flops of the annals are cypher. The HLT instruction clears a start-stop flip-bomb S and stops the sequence counter from counting. To restore the functioning of the computer, the start-end flip-flop must be ready manually.
-
-
In order to specify the rnicrooperations needed for the execution of each teaching, it is necessary that the function that they are intended to perform be defined precisely.
-
We volition at present bear witness that the part of the memory-reference instructions tin can be defined precisely past means of register transfer notation.
-
Table below lists the 7 retentiveness-reference instructions. The decoded output Di for i = 0, 1, 2, 3, 4, v, and 6 from the operation decoder that belongs to each instruction is included in the table.
-
The effective address of the instruction is in the address annals AR and was placed there during timing bespeak T2 when I = 0, or during timing signal T3 when I = 1.
-
The execution of the memory-reference instructions starts with timing signal T4. The symbolic clarification of each instruction is specified in the tabular array in terms of register transfer notation.
-
The bodily execution of the instruction in the autobus organisation will crave a sequence of microoperations.
-
This is considering information stored in retentiveness cannot be processed directly.
-
The data must be read from memory to a register where they can be operated on with logic circuits.
-
We at present explain the operation of each instruction and list the control functions and microoperations needed for their execution.
-
-
This is an instruction that performs the AND logic functioning on pairs of bits in Air conditioning and the memory give-and-take specified by the effective address.
-
The result of the operation is transferred to AC. The microoperations that execute this didactics are:
D0T4: DR ← Yard[AR]
D0Tfive: AC ← Air-conditioning ∧ DR, SC ← 0 -
The control office for this instruction uses the operation decoder D0 since this output of the decoder is active when the education has an AND operation whose binary code value is 000. Two timing signals are needed to execute the instruction.
-
The clock transition associated with timing point Tfour transfers the operand from retentivity into DR.
-
The clock transition associated with the next timing signal T5 transfers to AC the upshot of the AND logic performance between the contents of DR and Air conditioning.
-
The aforementioned clock transition clears SC to 0, transferring command to timing indicate T0 to get-go a new instruction bike.
-
This instruction adds the content of the memory give-and-take specified by the effective address to the value of AC.
-
The sum is transferred into Ac and the output deport Cout is transferred to the E (extended accumulator) flip-bomb.
-
The microoperations needed to execute this instruction are
D1Tfour: DR ← M[AR]
DaneT5: Air-conditioning ← Ac + DR, E ← Cout, SC ← 0 -
The same two timing signals, T4 and Tv, are used again just with performance decoder Dane instead of D0, which was used for the AND educational activity.
-
After the instruction is fetched from memory and decoded, only one output of the operation decoder will be active, and that output determines the sequence of rnicrooperations that the control follows during the execution of a retention-reference education.
-
This teaching transfers the retention word specified by the effective address to AC.
-
The microoperations needed to execute this instruction are
DtwoT4: DR ← M [AR]
D2Tfive: AC ← DR, SC ← 0 -
Note that at that place is no direct path from the bus into Ac (see figure under Mutual Bus System).
-
The adder and logic circuit receive information from DR which tin can be transferred into Air conditioning.
-
Therefore, it is necessary to read the memory give-and-take into DR kickoff and then transfer the content of DR into AC.
-
The reason for non connecting the bus to the inputs of Ac is the delay encountered in the adder and logic circuit.
-
It is assumed that the time information technology takes to read from memory and transfer the word through the bus as well as the adder and logic excursion is more the time of one clock bike.
-
By non connecting the charabanc to the inputs of AC nosotros can maintain i clock wheel per rnicrooperation.
-
This teaching stores the content of AC into the retentiveness word specified by the constructive address. Since the output of Air-conditioning is applied to the bus and the data input of retentivity is continued to the coach, we can execute this instruction with one microoperation:
DthreeT4: G [AR] ← Ac, SC ← 0
-
This instruction transfers the program to the teaching specified by the effective address.
-
Think that PC holds the address of the pedagogy to be read from memory in the side by side teaching cycle.
-
PC is incremented at time T1 to set information technology for the address of the adjacent education in the programme sequence.
-
The BUN instruction allows the developer to specify an educational activity out of sequence and nosotros say that the plan branches (or jumps) unconditionally.
-
The educational activity is executed with ane microoperation:
D4T4: PC ← AR, SC ← 0 -
The effective address from AR is transferred through the common omnibus to PC .
-
Resetting SC to 0 transfers command to T0. The next pedagogy is then fetched and executed from the memory address given by the new value in PC.
-
This instruction is useful for branching to a portion of the program called a subroutine or procedure.
-
When executed, the BSA instruction stores the address of the adjacent instruction in sequence (which is available in PC) into a memory location specified past the constructive address.
-
The effective accost plus one is then transferred to PC to serve every bit the address of the beginning instruction in the subroutine.
-
This functioning was specified in Table above (see Memory-Reference Instructions) with the following register transfer:
Yard[AR] ← PC, PC ← AR + 1 -
A numerical example that demonstrates how this instruction is used with a subroutine is shown in Fig. below.
-
The BSA instruction is assumed to exist in memory at accost 20. The I fleck is 0 and the address part of the teaching has the binary equivalent of 135.
-
Afterward the fetch and decode phases, PC contains 21, which is the address of the side by side instruction in the program (referred to as the return address). AR holds the effective address 135.
-
This is shown in function (a) of the effigy. The BSA instruction performs the following numerical operation:
One thousand[135] ← 21, PC ← 135 + ane = 136 -
The event of this operation is shown in part (b) of the figure. The return address 21 is stored in memory location 135 and command continues with the subroutine plan starting from address 136.
-
The return to the original program (at accost 21) is achieved by means of an indirect BUN instruction placed at the end of the subroutine.
-
When this pedagogy is executed, control goes to the indirect phase to read the effective address at location 135, where information technology finds the previously saved address 21.
-
When the BUN instruction is executed, the constructive accost 21 is transferred to PC . The adjacent pedagogy bicycle finds PC with the value 21, and then command continues to execute the education at the return address.
-
The BSA pedagogy performs the function usually referred to equally a subroutine call. The indirect BUN instruction at the end of the subroutine performs the function referred to as a subroutine render.
-
In most commercial computers, the return address associated with a subroutine is stored in either a processor
-
annals or in a portion of memory called a stack. It is not possible to perform the operation of the BSA instruction in one clock cycle when we apply the autobus system of the basic reckoner.
-
To use the retentiveness and the coach properly, the BSA instruction must be executed With a sequence of two microoperations:
D5Tfour: M[AR] ← PC, AR ← AR + 1
DfiveT5: PC ← AR, SC ← 0 -
Timing signal T4 initiates a retention write operation, places the content of PC onto the bus, and enables the INR input of AR .
-
The retention write operation is completed and AR is incremented past the time the side by side clock transition occurs. The bus is used at T5 to transfer the content of AR to PC .
-
This instruction increments the discussion specified by the effective address, and if the incremented value is equal to 0, PC is incremented by 1.
-
The programmer normally stores a negative number (in ii's complement) in the retentiveness discussion.
-
As this negative number is repeatedly incremented by 1, information technology eventually reaches the value of nix.
-
At that time PC is incremented by one in order to skip the next instruction in the programme.
-
Since it is not possible to increase a give-and-take within the retentiveness, information technology is necessary to read the word into DR, increment DR, and store the word dorsum into retention.
-
This is done with the following sequence of microoperations:
Dhalf dozenT4: DR ← M [AR]
D6T5: DR ← DR + i
DviT6: M[AR] ← DR, if (DR = 0) so (PC ← PC + 1), SC ← 0
How Many Clock Cycles Are Required To Enter The Data Into The Register In Figure 11-3?,
Source: https://upscfever.com/upsc-fever/en/gatecse/en-gatecse-chp156.html
Posted by: hallclereatifich.blogspot.com
0 Response to "How Many Clock Cycles Are Required To Enter The Data Into The Register In Figure 11-3?"
Post a Comment