Components: PC - Program Counter - Stores current point of execution Inputs: Input - New PC to be stored is input here, 16 bits Outputs: Output - Existing PC is output here, 16 bits Controls: Write - Determines if PCInput should be stored, 1 bit ----------------------------------------------------------- Memory - Memory Controller - Reads and writes memory Inputs: Address - Address at which memory should be read, 16 bits Outputs: Data - Memory at given address, 16 bits Controls: Read - Determines if controller should use new incoming address, 1 bit ----------------------------------------------------------- IR - Instruction Register - Stores current instruction and splits into constitutent parts Inputs: Input - Takes incoming instruction, 16 bits Outputs: Opcode - Outputs opcode (IR[15-12]), 4 bits RegisterA - Outputs number of reg. A (IR[11-8]), 4 bits RegisterB - Outputs number of reg. B (IR[7-4]), 4 bits Offset - Outputs offset or immediate (IR[7-0]), 8 bits Controls: Write - Determines if new instruction should be read, 1 bit ----------------------------------------------------------- A - Register A Storage Inputs: Input - Takes contents of register A for storage, 16 bits Outputs: Output - Returns stored value of A, 16 bits Controls: - ----------------------------------------------------------- B - Register B Storage Inputs: Input - Takes contents of register B for storage, 16 bits Outputs: Output - Returns stored value of B, 16 bits Controls: - ----------------------------------------------------------- C Inputs: Input - Takes results from adder, 16 bits Outputs: Output - Returns stored value of C, 16 bits Controls: - ----------------------------------------------------------- IEB - Interrupt Enable Bit - Determines if we ignore interrupts Inputs: Input - IEB value to be stored, 1 bit Outputs: Output - Current IEB value, 1 bit Controls: Write - Determines if we write incoming IEB value, 1 bit ----------------------------------------------------------- not - Inverter Inputs: Input - Value to be inverted, 1 bit Outputs: Output - Inverted value, 1 bit Controls: - ----------------------------------------------------------- EPC - Exception Program Counter - Saves PC during exception/interrupt Inputs: Input - Stores an incoming PC, 16 bits Outputs: Output - Returns a stored PC, 16 bits Controls: Write - Determines if a new incoming PC should be stored ----------------------------------------------------------- Sign Extend Inputs: Input - 8 bits Outputs: Output - Returns input with sign extended, 16 bits Controls: - ----------------------------------------------------------- Shift Left 1 Inputs: Input - 16 bits Outputs: Output - Returns input with all bits shifted left once, and left-most bit discarded, 16 bits Controls: - ----------------------------------------------------------- Shift Left 8 Inputs: Input - 16 bits Outputs: Output - Returns input with all bits shifted left eight times, and left-most eight bits discarded, 16 bits Controls: - ----------------------------------------------------------- Shift Right 15 Inputs: Input - 16 bits Outputs: Output - Returns input with all bits shifted right 15 times, and right-most 15 bits discarded, 16 bits Controls: - ----------------------------------------------------------- ALU Inputs: InputA - Argument A of the adder, 16 bits InputB - Argument B of the adder, 16 bits Outputs: Output - Returns the sum or difference of A and B, 16 bits Zero - Returns whether the result was zero, 1 bit Controls: Operation - Decides whether to take the sum or difference of A and B