1 / 12

Instruction Cycle vs Clock Cycle

Instruction Cycle vs Clock Cycle. Instruction Cycle: The time required to fetch and execute an instruction Clock Cycle: one clock cycle, during which one step of an execution is completed.

lindsay
Download Presentation

Instruction Cycle vs Clock Cycle

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Instruction Cycle vs Clock Cycle • Instruction Cycle: The time required to fetch and execute an instruction • Clock Cycle: one clock cycle, during which one step of an execution is completed. • Examples: In Chapter 5, T0, T1, T2, ….., T15, are used as symbols for a Clock Cycle. • The Instruction Cycle of a Register-reference instruction consists of 4 clock cycles. • The Instruction Cycle of a Memory-reference instruction consists of 5 to 7 clock cycles.

  2. Example: Adding two 32-bit numbers (A and B) by using the 16-bit Basic Computer • C = A + B • Split A into 16 bit numbers: AX: more significant 16 bits; AY: less significant 16 bits • Similarly B and C can be written as BX:BY and CX:CY respectively. • Store Carry-out from MSB in CZ.

  3. Storing data in memory4K memory locations: 000 to FFF in HEX

  4. Program

  5. memory

  6. Q1The Table shows, at T0, contents of one register, two flip-flops and some of the memory locations: Note: Use Figure 5-4 and Table 5-6 from your text-book for solving Q 1 and Q 2.

  7. Q 1: Problem in Steps Step 1: The first memory instruction at address 445 is executed. While executing this instruction, during clock cycle T4, R is set to 1. Step 2: Three clock cycles of interrupt process are executed. At the end of this step R is cleared. Step 3: The second memory instruction at address 001 is executed.

  8. Q 1: To Do ……….1 • Specify the register transfer operation(s) being executed during each clock cycle. • For Step 1, answer the following: • What is the value of I immediately after the clock cycle T2 is over? • Which instruction is being executed during this Step? • For Step 2, answer the following: • What is the value stored at address 0, immediately after clock cycle T1 is over? • What are the values of IEN and R immediately after the clock cycle T2 is over?

  9. Q 1: To Do ……….2 • For Step 3, answer the following: • What is the value of I immediately after the clock cycle T2 is over? • Which instruction is being executed during this Step? • Specify the contents (in hexadecimal) of registers PC, AR, DR, AC, IR and TR at the end of each clock cycle. If the contents of a register are not yet known, specify it as X.

  10. Q2The Table shows, at T0, contents of two registers, two flip-flops and some of the memory locations:

  11. Q 2: Problem in Steps Starting with the above initial values at T0, the following steps are taken in sequence: • Step 1: First the memory instruction at address 2A2 is executed. • Step 2: After executing Step 1, the memory instruction at address 446 is executed. During execution of the two steps, for each clock cycle, starting from T0 for each of the steps, work out the following:

  12. Q 2: To Do ……….1 • Specify the register transfer operation(s) being executed during the clock cycle. • For Step 1, answer the following: • What is the value of I immediately after the clock cycle T2 is over? • Which instruction is being executed during the Step? • For Step 2, answer the following: • What is the value of I immediately after the clock cycle T2 is over? • Which instruction is being executed during the Step? • What is the value of E immediately after the clock cycle T5 is over? • Specify the contents (in hexadecimal) of registers PC, AR, DR, AC and IR at the end of each clock cycle. If the contents of a register are not yet known, specify it as X.

More Related