Re: Assign#2: PC Datapath

Ed Casas (edc@ece.ubc.ca) Thu, 2 Nov 2000 20:37:33 -0800


Date: Thu, 2 Nov 2000 20:37:33 -0800
From: Ed Casas <edc@ece.ubc.ca>
Subject: Re: Assign#2: PC Datapath

> In the PC Datapath section of the CPU description, the > specification states that the program counter, as a multiplexed > option, can be loaded with its current PC register value. > However, there is no (opcode) instruction requiring the PC > register to directly load its own value. Consequently, why is > this option necessary? > If I understand it correctly, all opcodes with exception of the > 2 jump commands will simply load the PC with the next > instruction (ie: PC+1) on the next clock cycle. You're right, in this design the value of the PC is never held between clock cycles, so this feature (next_PC <= PC) is never used. You have to include it in your design nevertheless. I included this feature for future expansion. Some processors have separate fetch and execute cycle(s) and/or some instructions may required multiple cycles to execute (e.g. multiply and divide instructions) and the PC has to be held during these cycles. I left out these features to simplify the design. -- Ed Casas edc@ece.ubc.ca http://casas.ece.ubc.ca +1 604 822-2592