CPU_EU. 256x16 Memory

Size: px
Start display at page:

Download "CPU_EU. 256x16 Memory"

Transcription

1 Team Members We are submitting our own work, and we understand severe penalties will be assessed if we submit work for credit that is not our own. Print Name Print Name GRADER ID Number ID Number Estimated Work Hours Point Scale : Exemplary 3: Complete 2: Incomplete 5%will be deducted from total score for each day late 1: Minor effort 0: Not submitted Score = Points awarded (Pts) x Weight (Wt) # Demonstration Wt Pts Score Grader Signature Date 1 Demo working Integer Datapath 2 Documentation / Source Code 6 Testbench / Simulation-Verification 2 Days Late Total In Lab Score General Statement: Your team (2 people) is to complete the 301 -bit RISC Processor. This is done by connecting the CPU_EU with a timing and control unit (CU) verilog module and the 256x Memory (developed in lab7). The CU will be a Moore implementation of a finite state machine, where the outputs (control signals for the CPU_EU and Memory) are a function of the present state. The CU will control the execution of instructions defined for the 301 RISC Processor (see -bit RISC Processor specifications document). At reset, the 301 RISC Processor will begin fetching and executing instructions starting at memory location 0x00. CU (Finite State Machine) W_Adr rw_en R_Adr S_Adr Alu_Op s_sel adr_sel ir_ld pc_ld pc_inc pc_sel IR_out ALU_Status Address CPU_EU D_out D_in Address D_in D_out mw_en 256x Memory 301 -bit RISC Processor 301 Lab Assignment 8 Page 1

2 Top Level and I/O and Specifications: Your top level verilog module will interconnect the (1) -bit RISC Processor, (2) Memory, (3) Display Controller and (4) Debounce modules. The Display Controller is to display the Address outputs and the D_in inputs from/to the CPU_EU module based upon the AD_sel input (sw7). Additional control signals not provided by the CU are shown below. The reset signal is to be provided to every logic block using synchronous logic. Both the CU and CPU_EU modules are to be clocked using the step clk button (debounced). The step_mem button (debounced), AD_sel and dump_mem signals will be used for displaying the contents of Memory after the 301 RISC Processor executes a Halt instruction. Memory is clocked with the 50Mhz FPGA board clock. Memory is to be generated (CoreGen) with the three initialization files (e.g. ram_256x_lab8a.coe). reset step step AD dump mem clk sel mem btn btn btn sw sw Verification: To verify that all instructions of your RISC Processor are working, you must execute (by stepping through) the instructions for all three memory modules. The binary content of the memory modules that you will generate are shown on pages 9 to 11. Your team must complete those three pages by disassembling the machine code, fill in the Register Written column (where applicable), fill in the Final Contents of CPU and Memory registers that were written to by the program that is executed as well as the exact number of instructions that were executed, including the HALT instruction. Deliverables: Your team must turn in (1) pages 1-2 of these cover sheets, followed by (2) the print outs from all verilog modules, logically sequenced in a top-down manner, starting with the top-level module, followed by (3) all three memory modules (pages 9-11) completed with applicable assembly instructions, completed Register Written column (where applicable), completed Final Contents of CPU and Memory registers along with the number of instructions executed, and lastly, (4) the completed Team Accountability Reporting Sheet (p. 12). As always, you will be penalized for each violation related to inputs, outputs, and operation specifications. You will be penalized for not adhering to documentation specifications of the deliverables, as well as substandard documentation practices (i.e. meaningless or inaccurate comments, wrap-around in print outs, illegible documentation, etc.). Due Date: Wednesday, April 29, 2015 {Wednesday of Week 14} 301 Lab Assignment 8 Page 2

3 Control Unit Design Specifications: The control signals for the CU module are described below: Inputs: IR_out: ALU_Status: Outputs: W_Adr: rw_en: R_Adr: S_Adr: This is the -bit instruction code currently in the IR, which consists of the 4-bit opcode and three 3-bit register select codes. The 4-bit opcode is used in the decode state to determine what instruction to execute (i.e. what execute state to go to). The W_Adr, R_Adr, and S_Adr outputs will be derived from the three 3-bit register select codes, based upon the 4-bit opcode (e.g. for add W_Adr = IR[8:6], R_Adr = IR[5:3] and S_Adr = IR[2:0]). These three 1-bit values are the N, Z and C status indicators from the ALU, based upon the current ALU opcode. These 3 bit values may or may not be stored in the actual RISC Processor s flag register based upon what state the processor is current in (e.g. the add state versus the store state). The 3-bit Write Address to specify which register (R0 to R7) to write to (if rw_en is asserted). The register file write enable. When rw_en=1, the register specified by W_Adr will be written to. The 3-bit R Address to specify which register (R0 to R7) will be output from the R port of the register file. Note that addresses for Memory registers to be read from or written to must come from the R port of the register file. The 3-bit S Address to specify which register (R0 to R7) will be output from the S port of the register file. Note that data to be written to Memory must come from the S port of the register file. Alu_Op: s_sel: adr_sel: ir_ld: pc_ld: pc_inc: pc_sel: mw_en: This is the 4-bit ALU opcode (specified in lab 6) to control which ALU operation to perform. If s_sel=0 the S-port of the ALU gets data from the S-port of the register file. If s_sel=1 the S-port of the ALU gets data from the memory (i.e. the DS datapath inputs). If adr_mux=0, the Address outputs from CPU_EU come from the PC, else they come from the R-port of the register file. If clk), the instruction register (IR) will be loaded, presumably with an instruction from Memory. If clk), the IR will remain the same. If clk), PC PC + sign_extension (IR[7:0]). This operation is an addition to the CPU_EU logic needed for jump instructions. If clk), PC PC + 1. Note that pc_ld and pc_inc are mutually exclusive outputs. If pc_sel=0, inputs to the PC come from the PC+sign_extension logic. If pc_sel=1, the inputs to the PC come from the Datapath (Alu_out). Refer to the PC Modifications page. The Memory write enable. If mw_en=1, the Memory register specified by the Address outputs of CPU_EU will be written with the data on the D_Out outputs of the CPU_EU. If mw_en=0, Memory will not be written to. It is IMPORTANT to note that ALL of the CU outputs must be assigned values in EVERY state! Memory Address Multiplexing: In order for us to display the contents of Memory, indepent of CPU_EU generated addresses, there is the need for the top level verilog module to multiplex an address to the Memory module. This is the purpose of the dump_mem switch. The top level module is to have an -bit mem_counter register (initialize to 00h at reset). If dump_mem = 0, the address given to Memory comes from the CPU_EU Address outputs. If dump_mem = 1, the address given to Memory comes from the -bit mem_counter. Use a conditional continuous assignment statement to implement this 2-to-1 mux function, as follows: assign madr = dump_mem? mem_counter : Address; where the LHS (madr) is the wire used in the instantiation of the Memory module and the two RHS arguments are the mem_counter (defined in the top level module) and the Address outputs of the CPU_EU module. Note: since the Memory module has only 256 locations (8-bit addr), instantiate it using madr[7:0]. The step_mem button is used to increment the -bit mem_counter. Thus, at every positive edge of step_mem, the mem_counter is to be incrememted by 1. The AD_sel selects displaying either -bit Data (AD_sel=0) or -bit address (AD_sel =1). 301 Lab Assignment 8 Page 3

4 RESET: PC = 00h; {nf, zf, cf} = 3 b0 FETCH: IR M[PC] PC PC +1 CU State Diagram (Partial) ADD: R[d] R[d] + R[s] {nf,zf,cf}={n,z,c} IR[15:9] = 70h DECODE: IR[15:9] = 7Fh JMP: PC R[s] IR[15:9] = 74h IR[15:9] = 7Ch SHL: R[d] R[s] << 1 {nf,zf,cf}={n,z,c} IR[15:9] = 78h IR[15:9] = 7Bh JE: if (zf==1) PC PC + seir LOAD: R[d] M[ R[s1] ] HALT: IR[15:9] = 79h STORE: M[ R[d] ] R[s1] IR[15:9] = 7Ah LOAD_ imm: R[d] M[PC] PC PC +1 FETCH `timescale 1ps / 100fs /*********************************************************************** * Date: August 11, 2014 * File: 301_control_unit.v * * A Moore finite state machine that implements the major cycles for * fetching and executing instructions for the 301 -bit RISC Processor. ************************************************************************/ //******************************************************************* module cu (clk, reset, IR, N, Z, C, // control unit inputs W_Adr, R_Adr, S_Adr, // these are adr_sel, s_sel, // the control pc_ld, pc_inc, pc_sel, ir_ld, // word output mw_en, rw_en, alu_op, // fields status); // LED outputs //******************************************************************* input clk, reset; // clock and reset input [15:0] IR; // instruction register input input N, Z, C; // datapath status inputs output [2:0] W_Adr, R_Adr, S_Adr; // register file address outputs output adr_sel, s_sel; // mux select outputs output pc_ld, pc_inc, pc_sel, ir_ld; // pc load, pcinc, pc select, ir load output mw_en, rw_en; // memory_write, register_file write output [3:0] alu_op; // ALU opcode output output [7:0] status; // 8 LED outputs to display current state 301 Lab Assignment 8 Page 4

5 /**************************** * data structures * ****************************/ reg [2:0] W_Adr, R_Adr, S_Adr; //these 12 reg adr_sel, s_sel; // fields reg pc_ld, pc_inc; // make up reg pc_sel, ir_ld; // the reg mw_en, rw_en; // control word reg [3:0] alu_op; // of the control unit reg [4:0] state; // present state register reg [4:0] nextstate; // next state register reg [7:0] status; // LED status/state outputs reg ps_n, ps_z, ps_c; // present state flags register reg ns_n, ns_z, ns_c; // next state flags register parameter RESET=0, FETCH=1, DECODE=2, ADD=3, SUB=4, CMP=5, MOV=6, INC=7, DEC=8, SHL=9, SHR=10, LD=11, STO=12, LDI=13, JE=14, JNE=15, JC=, JMP=17, HALT=18, ILLEGAL_OP=31; /********************************* * 301 Control Unit Sequencer * *********************************/ // synchronous state register assignment clk or posedge reset) if (reset) state = RESET; else state = nextstate; // synchronous flags register assignment clk or posedge reset) if (reset) {ps_n,ps_z,ps_c} = 3'b0; else {ps_n,ps_z,ps_c} = {ns_n,ns_z,ns_c}; // combinational logic section for both next state logic // and control word outputs for cpu_execution_unit and memory state ) case ( state ) RESET: begin // Default Control Word Values -- LED pattern = 1111_111 W_Adr = 3'b000; R_Adr = 3'b000; S_Adr = 3'b000; adr_sel = 1'b0; s_sel = 1'b0; pc_ld = 1'b0; pc_inc = 1'b0; pc_sel=1 b0; ir_ld = 1'b0; mw_en = 1'b0; rw_en = 1'b0; alu_op = 4'b0000; {ns_n,ns_z,ns_c} = 3'b0; status = 8'hFF; FETCH: begin // IR <-- M[PC], PC <- PC+1 -- LED pattern = 1000_000 W_Adr = 3'b000; R_Adr = 3'b000; S_Adr = 3'b000; adr_sel = 1'b0; s_sel = 1'b0; pc_ld = 1'b0; pc_inc = 1'b1; pc_sel=1 b0; ir_ld = 1'b1; mw_en = 1'b0; rw_en = 1'b0; alu_op = 4'b0000; {ns_n,ns_z,ns_c} = {ps_n,ps_z,ps_c}; // flags remain the same status = 8'h80; nextstate = DECODE; 301 Lab Assignment 8 Page 5

6 DECODE: begin // Default Control Word Values -- LED pattern = 1100_0000 W_Adr = 3'b000; R_Adr = 3'b000; S_Adr = 3'b000; adr_sel = 1'b0; s_sel = 1'b0; pc_ld = 1'b0; pc_inc = 1'b0; pc_sel=1 b0; ir_ld = 1'b0; mw_en = 1'b0; rw_en = 1'b0; alu_op = 4'b0000; {ns_n,ns_z,ns_c} = {ps_n,ps_z,ps_c}; // flags remain the same status = 8'hC0; case ( IR[15:9] ) 7'h70: nextstate = ADD; 7'h71: nextstate = SUB; 7'h72: nextstate = CMP; 7'h73: nextstate = MOV; 7'h74: nextstate = SHL; 7'h75: nextstate = SHR; 7'h76: nextstate = INC; 7'h77: nextstate = DEC; 7'h78: nextstate = LD; 7'h79: nextstate = STO; 7'h7a: nextstate = LDI; 7'h7b: nextstate = HALT; 7'h7c: nextstate = JE; 7'h7d: nextstate = JNE; 7'h7e: nextstate = JC; 7'h7f: nextstate = JMP; default: nextstate = ILLEGAL_OP; case ADD: begin // R[ir(8:6)] <-- R[ir(5:3)] + R[ir(2:0)] - LED pattern = {ps_n,ps_z,ps_c,5 b00000} // PUT CONTROL WORD FOR EXECUTION OF ADD HERE!!! SUB: begin // R[ir(8:6)] <-- R[ir(5:3)] - R[ir(2:0)] - LED pattern = {ps_n,ps_z,ps_c,5 b00001} // PUT CONTROL WORD FOR EXECUTION OF SUB HERE!!! CMP: begin // R[ir(5:3)] - R[ir(2:0)] - LED pattern = {ps_n,ps_z,ps_c,5 b00010} // PUT CONTROL WORD FOR EXECUTION OF CMP HERE!!! MOV: begin // R[ir(8:6)] <-- R[ir(2:0)] - LED pattern = {ns_n,ns_z,ns_c,5 b00011} // PUT CONTROL WORD FOR EXECUTION OF MOV HERE!!! SHL: begin // R[ir(8:6)] <-- R[ir(2:0)] << 1 - LED pattern = {ps_n,ps_z,ps_c,5 b00100} // PUT CONTROL WORD FOR EXECUTION OF SHL HERE!!! SHR: begin // R[ir(8:6)] <-- R[ir(2:0)] >> 1 - LED pattern = {ps_n,ps_z,ps_c,5 b00101} // PUT CONTROL WORD FOR EXECUTION OF SHR HERE!!! INC: begin // R[ir(8:6)] <-- R[ir(2:0)] LED pattern = {ps_n,ps_z,ps_c,5 b00110} // PUT CONTROL WORD FOR EXECUTION OF INC HERE!!! 301 Lab Assignment 8 Page 6

7 DEC: begin // R[ir(8:6)] <-- R[ir(2:0)] LED pattern = {ps_n,ps_z,ps_c,5 b00111} // PUT CONTROL WORD FOR EXECUTION OF DEC HERE!!! LD: begin // R[ir(8:6)] <-- M[ir(2:0)] - LED pattern = {ps_n,ps_z,ps_c,5 b01000} // PUT CONTROL WORD FOR EXECUTION OF LOAD HERE!!! STO: begin // M[ir(8:6)] <-- R[ir(2:0)] - LED pattern = {ps_n,ps_z,ps_c,5 b01001} // PUT CONTROL WORD FOR EXECUTION OF STO HERE!!! LDI: begin // R[ir(8:6)] <-- M[PC], PC <-- PC LED pattern = {ps_n,ps_z,ps_c,5 b01010} // PUT CONTROL WORD FOR EXECUTION OF LDI HERE!!! JE: begin // if (ps_z=1) PC <-- PC + se_ir[7:0] - LED pattern = {ps_n,ps_z,ps_c,5 b01100} // PUT CONTROL WORD FOR EXECUTION OF JE HERE!!! JNE: begin // if (ps_z=0) PC <-- PC + se_ir[7:0] - LED pattern = {ps_n,ps_z,ps_c,5 b01101} // PUT CONTROL WORD FOR EXECUTION OF JNE HERE!!! JC: begin // if (ps_c=1) PC <-- PC + se_ir[7:0] - LED pattern = {ps_n,ps_z,ps_c,5 b01110} // PUT CONTROL WORD FOR EXECUTION OF JC HERE!!! JMP: begin // PC <-- R[ir(2:0)] - LED pattern = {ps_n,ps_z,ps_c,5 b01111} // PUT CONTROL WORD FOR EXECUTION OF JMP HERE!!! HALT: begin // Default Control Word Values - LED pattern = {ps_n,ps_z,ps_c,5 b01011} // PUT CONTROL WORD FOR HALT HERE!!! nextstate = HALT; // loop here forever ILLEGAL_OP: begin // Default Control Word Values -- LED pattern = 1111_0000 // PUT CONTROL WORD FOR ILLEGAL OPCODE HERE!!! nextstate = ILLEGAL_OP; // loop here forever case module Note that the 8-bit status register is used to drive the eight LED s (LD7 to LD0) with unique patterns to display what state the CU is in. In addition, for the execution states for all opcodes, we display the concatenation of the present state of the flags register and the instruction opcode. Once the RISC Processor executes a Halt instruction, press reset. Then set the dump_mem switch to 1. Memory will now display location M[00h]. To step through memory, just press the step_mem button to increment the internal mem_counter. This will allow you to verify the address (AD_sel=1) and contents (AD_sel=0) of memory. 301 Lab Assignment 8 Page 7

8 Lab #8 PC Modifications General Statement: In order for your RISC processor to be able to execute both conditional and unconditional jump instructions, there must be some modifications to the CPU_EU module developed in Lab #7. The conditional jump instructions require the PC to be loaded with -bit values that are relative to its current value. Almost all processors do relative jumps by adding the current contents of the PC to a signed offset. If the offset is expressed in less bits than the PC itself (as is usually the case) then there must be a sign extension of the offset to make it the same size as the PC before the addition. The logic diagram showing the modifications that must be made to accommodate this kind of arrangement is show below. The sign extension function is easily done in Verilog using the replication operator: {n{exp}} is equal to n copies of exp concatenated together. Thus, for example, {5{IR[7]}} = {IR[7], IR[7], IR[7], IR[7], IR[7]}. The SignExt logic in the diagram becomes nothing more than one conditional assignment statement that uses the replication operator for sign exting our 8-bit signed offset to a -bit signed offset that is added to the PC. Note, all logic color coded in yellow is combinational logic, whereas all logic color coded in blue is sequential logic. Also note that the only extra control line needed for CPU_EU is the pc_sel control for the 2-to-1 MUX. CPU_EU Integer Datapath DS Reg_Out ALU_Out -bit add pc_sel 1 0 PC_mux pc_ld pc_inc SignExt PC 8 IR ir_ld adr_sel 1 0 adr_mux Address D_out D_in 301 Lab Assignment 8 Page 8

9 Lab #8 Top Level Diagram 301 -bit RISC Processor Address D_out D_in Mem Dump Counter Dump_mem 1 0 mux Address D_in D_out 256x Memory AD_sel 1 0 mux Display Controller 301 Lab Assignment 8 Page 9

10 Memory Address Binary Content Instruction Register Written _000_000_ _1100_1010_ _001_000_ _0011_0101_ _010_000_ _0000_0011_ _011_000_ _100_001_ _011_000_ _011_000_011 0A 0B 0C 0D 0E _101_000_ _011_000_ _110_000_ _110_000_ _000_000_100 0F _ _ _101_000_ _111_110_ _111_000_ _ A 1B 1C 1D 1E 1F Final Contents of CPU Reg s and Memory: Detailed contents of ram_256x8_lab8a.coe initialization file R0 = R4 = M[15] = R1 = R5 = M[] = R2 = R6 = M[17] = R3 = R7 = M[18] = Total # of instructions executed = 301 Lab Assignment 8 Page 10

11 Memory Address Binary Content Instruction Register Written _000_000_ _0000_0001_ _001_000_ _0000_0000_ _010_000_ _0000_0000_ _011_000_ _0000_1111_ _011_011_ _000_000_011 0A 0B 0C _000_000_ _011_000_ _001_000_001 0D _ E _ F _ A 1B 1C 1D 1E 1F Final Contents of Memory M[10] = M[14] = M[11] = M[15] = M[12] = M[] = M[13] = M[17] = Detailed contents of ram_256x8_lab8b.coe initialization file Total # of instructions executed = 301 Lab Assignment 8 Page 11

12 Memory Address Binary Content Instruction Register Written _000_000_ _0000_0001_ _001_000_ _000_000_ _010_000_ _000_000_ _0000_0001_ _011_000_ _0000_0000_ _000_000_001 0A 0B 0C _001_000_ _000_000_ _000_000_010 0D _ E _000_000_011 0F _ _1111_1111_ _0000_0001_1000 1A 1B 1C 1D 1E 1F Final Contents of Memory Detailed contents of ram_256x8_lab8c.coe initialization file M[10] = M[14] = M[18] = M[11] = M[15] = M[19] = M[12] = M[] = M[13] = M[17] = Total # of instructions executed = 301 Lab Assignment 8 Page 12

13 CECS 301 Team Accountability Reporting Sheet Team Member #1: Signature: Modules/dates you worked on: Modules/dates you debugged: Team Member #2: Signature: Modules/dates you worked on: Modules/dates you debugged: Percentage of Work Summary: Team Member#1 Team Member#2 301 Lab Assignment 8 Page 13

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware 4.1 Introduction We will examine two MIPS implementations

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

Block diagram view. Datapath = functional units + registers

Block diagram view. Datapath = functional units + registers Computer design an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + datapath Control = finite state machine inputs = machine instruction,

More information

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University The Processor: Datapath and Control Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Introduction CPU performance factors Instruction count Determined

More information

Processor (I) - datapath & control. Hwansoo Han

Processor (I) - datapath & control. Hwansoo Han Processor (I) - datapath & control Hwansoo Han Introduction CPU performance factors Instruction count - Determined by ISA and compiler CPI and Cycle time - Determined by CPU hardware We will examine two

More information

CPU design: instruction set, control logic, machine program

CPU design: instruction set, control logic, machine program CPU design: instruction set, control logic, machine program 1 Today s goal Learn the stack architecture of of the tinycpu. Learn how to determine and describe the control logic. Learn machine programs

More information

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23)

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23) Lecture Topics Today: Single-Cycle Processors (P&H 4.1-4.4) Next: continued 1 Announcements Milestone #3 (due 2/9) Milestone #4 (due 2/23) Exam #1 (Wednesday, 2/15) 2 1 Exam #1 Wednesday, 2/15 (3:00-4:20

More information

Approaches to Digital System Design

Approaches to Digital System Design Approaches to Digital System Design In Digital Devices, you learned how to create a logic network (Flip-flops + combinational gates) to solve a problem The logic network was SPECIFIC to the problem. To

More information

Final Project: MIPS-like Microprocessor

Final Project: MIPS-like Microprocessor Final Project: MIPS-like Microprocessor Objective: The objective of this project is to design, simulate, and implement a simple 32-bit microprocessor with an instruction set that is similar to a MIPS.

More information

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations Chapter 4 The Processor Part I Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations

More information

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture The Processor Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut CSE3666: Introduction to Computer Architecture Introduction CPU performance factors Instruction count

More information

Chapter 4. The Processor Designing the datapath

Chapter 4. The Processor Designing the datapath Chapter 4 The Processor Designing the datapath Introduction CPU performance determined by Instruction Count Clock Cycles per Instruction (CPI) and Cycle time Determined by Instruction Set Architecure (ISA)

More information

Computer Organization. Structure of a Computer. Registers. Register Transfer. Register Files. Memories

Computer Organization. Structure of a Computer. Registers. Register Transfer. Register Files. Memories Computer Organization Structure of a Computer Computer design as an application of digital logic design procedures Computer = processing unit + memory system Processing unit = control + Control = finite

More information

CPU Design. 4. There are three status flags, zero (Z), carry (C), and sign (S) which are affected by the arithmetic and logical instructions.

CPU Design. 4. There are three status flags, zero (Z), carry (C), and sign (S) which are affected by the arithmetic and logical instructions. CPU Design Naveen Kr. Sharma - 07CS307 Assignment 9 - th November 009 Avishek Banerjee - 07CS04 Computer Organisation & Architecture Lab Group 8 5th Semester, Autumn 009 ISA Specification. There are 6

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle

More information

Chapter 4. The Processor. Computer Architecture and IC Design Lab

Chapter 4. The Processor. Computer Architecture and IC Design Lab Chapter 4 The Processor Introduction CPU performance factors CPI Clock Cycle Time Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS

More information

The MIPS Processor Datapath

The MIPS Processor Datapath The MIPS Processor Datapath Module Outline MIPS datapath implementation Register File, Instruction memory, Data memory Instruction interpretation and execution. Combinational control Assignment: Datapath

More information

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University The Processor (1) Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu Jeong (jinkyu@skku.edu)

More information

Computer Organization

Computer Organization Computer Organization! Computer design as an application of digital logic design procedures! Computer = processing unit + memory system! Processing unit = control + datapath! Control = finite state machine

More information

Systems Architecture

Systems Architecture Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all figures from Computer Organization and Design: The Hardware/Software

More information

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface Chapter 4 The Processor: A Based on P&H Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined

More information

Exp#8: Designing a Programmable Sequence Detector

Exp#8: Designing a Programmable Sequence Detector Exp#8: Designing a Programmable Sequence Detector Objectives Learning how to partition a system into data-path and control unit. Integrating Schematics and Verilog code together Overview In this lab you

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition The Processor - Introduction

More information

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor. COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor The Processor - Introduction

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Hardware Organization and Design Lecture 14: One Cycle MIPs Datapath Adapted from Computer Organization and Design, Patterson & Hennessy, UCB R-Format Instructions Read two register operands Perform

More information

Laboratory 5 Processor Datapath

Laboratory 5 Processor Datapath Laboratory 5 Processor Datapath Description of HW Instruction Set Architecture 16 bit data bus 8 bit address bus Starting address of every program = 0 (PC initialized to 0 by a reset to begin execution)

More information

session 7. Datapath Design

session 7. Datapath Design General Objective: Determine the hardware requirement of a digital computer based on its instruction set. Specific Objectives: Describe the general concepts in designing the data path of a digital computer

More information

EE 2700 Project 2 Microprocessor Design

EE 2700 Project 2 Microprocessor Design EE 2700 Project 2 Microprocessor Design This project may be done individually or in teams of two. You may consult others for general questions but not for specific issues. Cheating will not be tolerated

More information

EECS 151/251 FPGA Project Report

EECS 151/251 FPGA Project Report EECS 151/251 FPGA Project Report GSI: Vighnesh Iyer Team Number: 6 Partners: Ashwinlal Sreelal and Zhixin Alice Ye Due Date: Dec 9, 2016 Part I: Project Description The aims of this project were to develop

More information

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design 1 TDT4255 Computer Design Lecture 4 Magnus Jahre 2 Outline Chapter 4.1 to 4.4 A Multi-cycle Processor Appendix D 3 Chapter 4 The Processor Acknowledgement: Slides are adapted from Morgan Kaufmann companion

More information

Chapter 9 Computer Design Basics

Chapter 9 Computer Design Basics Logic and Computer Design Fundamentals Chapter 9 Computer Design asics Part 2 A Simple Computer Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Overview

More information

are Softw Instruction Set Architecture Microarchitecture are rdw

are Softw Instruction Set Architecture Microarchitecture are rdw Program, Application Software Programming Language Compiler/Interpreter Operating System Instruction Set Architecture Hardware Microarchitecture Digital Logic Devices (transistors, etc.) Solid-State Physics

More information

CPU Design Steps. EECC550 - Shaaban

CPU Design Steps. EECC550 - Shaaban CPU Design Steps 1. Analyze instruction set operations using independent RTN => datapath requirements. 2. Select set of datapath components & establish clock methodology. 3. Assemble datapath meeting the

More information

Lecture 12: Single-Cycle Control Unit. Spring 2018 Jason Tang

Lecture 12: Single-Cycle Control Unit. Spring 2018 Jason Tang Lecture 12: Single-Cycle Control Unit Spring 2018 Jason Tang 1 Topics Control unit design Single cycle processor Control unit circuit implementation 2 Computer Organization Computer Processor Memory Devices

More information

Major CPU Design Steps

Major CPU Design Steps Datapath Major CPU Design Steps. Analyze instruction set operations using independent RTN ISA => RTN => datapath requirements. This provides the the required datapath components and how they are connected

More information

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE One and a half hours Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Fundamentals of Computer Engineering Date: Thursday 21st January 2016 Time: 14:00-15:30 Answer BOTH Questions

More information

LECTURE 5. Single-Cycle Datapath and Control

LECTURE 5. Single-Cycle Datapath and Control LECTURE 5 Single-Cycle Datapath and Control PROCESSORS In lecture 1, we reminded ourselves that the datapath and control are the two components that come together to be collectively known as the processor.

More information

Verilog introduction. Embedded and Ambient Systems Lab

Verilog introduction. Embedded and Ambient Systems Lab Verilog introduction Embedded and Ambient Systems Lab Purpose of HDL languages Modeling hardware behavior Large part of these languages can only be used for simulation, not for hardware generation (synthesis)

More information

CPE 335. Basic MIPS Architecture Part II

CPE 335. Basic MIPS Architecture Part II CPE 335 Computer Organization Basic MIPS Architecture Part II Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE232 Basic MIPS Architecture

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

More information

9/25/ Software & Hardware Architecture

9/25/ Software & Hardware Architecture 8086 Software & Hardware Architecture 1 INTRODUCTION It is a multipurpose programmable clock drive register based integrated electronic device, that reads binary instructions from a storage device called

More information

Processor: Multi- Cycle Datapath & Control

Processor: Multi- Cycle Datapath & Control Processor: Multi- Cycle Datapath & Control (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann, 27) COURSE

More information

The overall datapath for RT, lw,sw beq instrucution

The overall datapath for RT, lw,sw beq instrucution Designing The Main Control Unit: Remember the three instruction classes {R-type, Memory, Branch}: a) R-type : Op rs rt rd shamt funct 1.src 2.src dest. 31-26 25-21 20-16 15-11 10-6 5-0 a) Memory : Op rs

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization CS/COE0447: Computer Organization and Assembly Language Datapath and Control Sangyeun Cho Dept. of Computer Science A simple MIPS We will design a simple MIPS processor that supports a small instruction

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization A simple MIPS CS/COE447: Computer Organization and Assembly Language Datapath and Control Sangyeun Cho Dept. of Computer Science We will design a simple MIPS processor that supports a small instruction

More information

Topic #6. Processor Design

Topic #6. Processor Design Topic #6 Processor Design Major Goals! To present the single-cycle implementation and to develop the student's understanding of combinational and clocked sequential circuits and the relationship between

More information

Inf2C - Computer Systems Lecture Processor Design Single Cycle

Inf2C - Computer Systems Lecture Processor Design Single Cycle Inf2C - Computer Systems Lecture 10-11 Processor Design Single Cycle Boris Grot School of Informatics University of Edinburgh Previous lectures Combinational circuits Combinations of gates (INV, AND, OR,

More information

COMPUTER ORGANIZATION AND DESIGN

COMPUTER ORGANIZATION AND DESIGN COMPUTER ORGANIZATION AND DESIGN 5 Edition th The Hardware/Software Interface Chapter 4 The Processor 4.1 Introduction Introduction CPU performance factors Instruction count CPI and Cycle time Determined

More information

CIS 371 Computer Organization and Design

CIS 371 Computer Organization and Design CIS 371 Computer Organization and Design Lab Hints Based on slides by Prof. Amir Roth & Prof. Milo Martin CIS 371: Comp. Org. Prof. Milo Martin Lab Hints 1 Hints & Tips for ALU Lab // Instruction decoder!

More information

Chapter 10 Computer Design Basics

Chapter 10 Computer Design Basics Logic and Computer Design Fundamentals Chapter 10 Computer Design Basics Part 2 A Simple Computer Charles Kime & Thomas Kaminski 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View

More information

CAD for VLSI 2 Pro ject - Superscalar Processor Implementation

CAD for VLSI 2 Pro ject - Superscalar Processor Implementation CAD for VLSI 2 Pro ject - Superscalar Processor Implementation 1 Superscalar Processor Ob jective: The main objective is to implement a superscalar pipelined processor using Verilog HDL. This project may

More information

Homework deadline extended to next friday

Homework deadline extended to next friday Norm Midterm Grading Finished Stats on course homepage Pickup after this lab lec. Regrade requests within 1wk of posted solution Homework deadline extended to next friday Description Design Conception

More information

Informatics 2C Computer Systems Practical 2 Deadline: 18th November 2009, 4:00 PM

Informatics 2C Computer Systems Practical 2 Deadline: 18th November 2009, 4:00 PM Informatics 2C Computer Systems Practical 2 Deadline: 18th November 2009, 4:00 PM 1 Introduction This practical is based on material in the Computer Systems thread of the course. Its aim is to increase

More information

Chapter 15: Design Examples. CPU Design Example. Prof. Soo-Ik Chae 15-1

Chapter 15: Design Examples. CPU Design Example. Prof. Soo-Ik Chae 15-1 CPU Design Example Prof. Soo-Ik Chae 5- Partitioned Sequential Machine Datapaths Datapath Unit External Control Inputs Control Unit Finite State Machine Control signals Datapath Logic Clock Datapath Registers

More information

Register-Level Design

Register-Level Design Register-Level Design A digital system can be treated at different level of abstraction or compleity. So far, we have seen it at the gate level and the transistor level. At a higher level than the gate

More information

CS152 Computer Architecture and Engineering

CS152 Computer Architecture and Engineering CS152 Computer Architecture and Engineering CS152 2018 Bus-Based RISC-V Implementation http://inst.eecs.berkeley.edu/~cs152/sp18 General Overview Figure H1-A shows a diagram of a bus-based implementation

More information

Midterm I October 6, 1999 CS152 Computer Architecture and Engineering

Midterm I October 6, 1999 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Fall 1999 John Kubiatowicz Midterm I October 6, 1999 CS152 Computer Architecture and Engineering Your Name: SID

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

Grading: 3 pts each part. If answer is correct but uses more instructions, 1 pt off. Wrong answer 3pts off.

Grading: 3 pts each part. If answer is correct but uses more instructions, 1 pt off. Wrong answer 3pts off. Department of Electrical and Computer Engineering University of Wisconsin Madison ECE 552 Introductions to Computer Architecture Homework #2 (Suggested Solution) 1. (10 points) MIPS and C program translations

More information

Name: ID# UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS150 Fall 2001 Prof. Subramanian Midterm III

Name:   ID# UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS150 Fall 2001 Prof. Subramanian Midterm III UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences EECS150 Fall 2001 Prof. Subramanian Midterm III 1) Recalculate the various propogation delays in a 4-bit carry lookahead

More information

RISC Processor Design

RISC Processor Design RISC Processor Design Single Cycle Implementation - MIPS Virendra Singh Indian Institute of Science Bangalore virendra@computer.org Lecture 13 SE-273: Processor Design Feb 07, 2011 SE-273@SERC 1 Courtesy:

More information

Control Unit for Multiple Cycle Implementation

Control Unit for Multiple Cycle Implementation Control Unit for Multiple Cycle Implementation Control is more complex than in single cycle since: Need to define control signals for each step Need to know which step we are on Two methods for designing

More information

CSE 2021 COMPUTER ORGANIZATION

CSE 2021 COMPUTER ORGANIZATION CSE 2021 COMPUTER ORGANIZATION HUGH LAS CHESSER 1012U HUGH CHESSER CSEB 1012U W10-M Agenda Topics: 1. Multiple cycle implementation review 2. State Machine 3. Control Unit implementation for Multi-cycle

More information

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes)

Midterm Exam Thursday, October 24, :00--2:15PM (75 minutes) Last (family) name: Answer Key First (given) name: Student I.D. #: Department of Electrical and Computer Engineering University of Wisconsin - Madison ECE 551 Digital System Design and Synthesis Midterm

More information

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19 CO2-3224 Computer Architecture and Programming Languages CAPL Lecture 8 & 9 Dr. Kinga Lipskoch Fall 27 Single Cycle Disadvantages & Advantages Uses the clock cycle inefficiently the clock cycle must be

More information

CSE140L: Components and Design Techniques for Digital Systems Lab. RTL design. Tajana Simunic Rosing. Source: Vahid, Katz

CSE140L: Components and Design Techniques for Digital Systems Lab. RTL design. Tajana Simunic Rosing. Source: Vahid, Katz CSE140L: Components and Design Techniques for Digital Systems Lab RTL design Tajana Simunic Rosing Source: Vahid, Katz 1 Lab #4 due next week Outline Report due at the beginning of class (2pm) Demo hours

More information

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control ELEC 52/62 Computer Architecture and Design Spring 217 Lecture 4: Datapath and Control Ujjwal Guin, Assistant Professor Department of Electrical and Computer Engineering Auburn University, Auburn, AL 36849

More information

Single Cycle Datapath

Single Cycle Datapath Single Cycle atapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili Section 4.1-4.4 Appendices B.3, B.7, B.8, B.11,.2 ing Note: Appendices A-E in the hardcopy text correspond to chapters 7-11 in

More information

EECS150. Implement of Processor FSMs

EECS150. Implement of Processor FSMs EECS5 Section Controller Implementations Fall Implement of Processor FSMs Classical Finite State Machine Design Divide and Conquer Approach: Time-State Method Partition FSM into multiple communicating

More information

Midterm I March 12, 2003 CS152 Computer Architecture and Engineering

Midterm I March 12, 2003 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2003 John Kubiatowicz Midterm I March 2, 2003 CS52 Computer Architecture and Engineering Your Name: SID Number:

More information

MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD.

MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD. MCPU - A Minimal 8Bit CPU in a 32 Macrocell CPLD. Tim Böscke, cpldcpu@opencores.org 02/2001 - Revised 10/2004 This documents describes a successful attempt to fit a simple VHDL - CPU into a 32 macrocell

More information

T F The immediate field of branches is sign extended. T F The immediate field of and immediate (andi) and or immediate (ori) is zero extended.

T F The immediate field of branches is sign extended. T F The immediate field of and immediate (andi) and or immediate (ori) is zero extended. Problem 1 MIPS Instruction Set Architecture (22 pts, 10 mins) Extending the Immediate Field in MIPS (6 pts) Mark the following statements true or false about executing the MIPS Core instructions from column

More information

RISC Architecture: Multi-Cycle Implementation

RISC Architecture: Multi-Cycle Implementation RISC Architecture: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay

More information

Programmable Control Logic

Programmable Control Logic Programmable Control Logic Microsequencers Example: building the micro8 Hardware/Software tradeoff Lab #5 due Thursday, project abstract next Monday 1 Digital Systems = FSMs + Datapath FSM control Datapath:

More information

Instruction Set Architecture

Instruction Set Architecture Chapter 5 The LC-3 Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization address space -- how may locations can be addressed? addressibility

More information

ENGG3380: Computer Organization and Design Lab5: Microprogrammed Control

ENGG3380: Computer Organization and Design Lab5: Microprogrammed Control ENGG330: Computer Organization and Design Lab5: Microprogrammed Control School of Engineering, University of Guelph Winter 201 1 Objectives: The objectives of this lab are to: Start Date: Week #5 201 Due

More information

Multicycle Approach. Designing MIPS Processor

Multicycle Approach. Designing MIPS Processor CSE 675.2: Introduction to Computer Architecture Multicycle Approach 8/8/25 Designing MIPS Processor (Multi-Cycle) Presentation H Slides by Gojko Babić and Elsevier Publishing We will be reusing functional

More information

Chap 6 Introduction to HDL (d)

Chap 6 Introduction to HDL (d) Design with Verilog Chap 6 Introduction to HDL (d) Credit to: MD Rizal Othman Faculty of Electrical & Electronics Engineering Universiti Malaysia Pahang Ext: 6036 VERILOG HDL Basic Unit A module Module

More information

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller ECE468 Computer Organization and Architecture Designing a Multiple Cycle Controller ECE468 multicontroller Review of a Multiple Cycle Implementation The root of the single cycle processor s problems: The

More information

Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu (Guest starring: Frank K. Gürkaynak and Aanjhan Ranganathan)

Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu (Guest starring: Frank K. Gürkaynak and Aanjhan Ranganathan) Microarchitecture Design of Digital Circuits 27 Srdjan Capkun Onur Mutlu (Guest starring: Frank K. Gürkaynak and Aanjhan Ranganathan) http://www.syssec.ethz.ch/education/digitaltechnik_7 Adapted from Digital

More information

Design of Sequential Logic: Flip flops, counter, state machine, stacks

Design of Sequential Logic: Flip flops, counter, state machine, stacks Design of Sequential Logic: Flip flops, counter, state machine, stacks 1 Today s goal Learn how to use always and if statements to design flip flops. Learn how to design sequential logic such as counters,

More information

CPU. Fall 2003 CSE 207 Digital Design Project #4 R0 R1 R2 R3 R4 R5 R6 R7 PC STATUS IR. Control Logic RAM MAR MDR. Internal Processor Bus

CPU. Fall 2003 CSE 207 Digital Design Project #4 R0 R1 R2 R3 R4 R5 R6 R7 PC STATUS IR. Control Logic RAM MAR MDR. Internal Processor Bus http://www.engr.uconn.edu/~barry/cse207/fa03/project4.pdf Page 1 of 16 Fall 2003 CSE 207 Digital Design Project #4 Background Microprocessors are increasingly common in every day devices. Desktop computers

More information

Computer Organization and Structure

Computer Organization and Structure Computer Organization and Structure 1. Assuming the following repeating pattern (e.g., in a loop) of branch outcomes: Branch outcomes a. T, T, NT, T b. T, T, T, NT, NT Homework #4 Due: 2014/12/9 a. What

More information

Basic Assembly SYSC-3006

Basic Assembly SYSC-3006 Basic Assembly Program Development Problem: convert ideas into executing program (binary image in memory) Program Development Process: tools to provide people-friendly way to do it. Tool chain: 1. Programming

More information

CSEN 601: Computer System Architecture Summer 2014

CSEN 601: Computer System Architecture Summer 2014 CSEN 601: Computer System Architecture Summer 2014 Practice Assignment 5 Solutions Exercise 5-1: (Midterm Spring 2013) a. What are the values of the control signals (except ALUOp) for each of the following

More information

CC 311- Computer Architecture. The Processor - Control

CC 311- Computer Architecture. The Processor - Control CC 311- Computer Architecture The Processor - Control Control Unit Functions: Instruction code Control Unit Control Signals Select operations to be performed (ALU, read/write, etc.) Control data flow (multiplexor

More information

ECE260: Fundamentals of Computer Engineering

ECE260: Fundamentals of Computer Engineering Datapath for a Simplified Processor James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy Introduction

More information

Using a Hardware Description Language to Design and Simulate a Processor 5.8

Using a Hardware Description Language to Design and Simulate a Processor 5.8 5.8 Using a Hardware Description Language to Design and Simulate a Processor 5.8 As mentioned in Appix B, Verilog can describe processors for simulation or with the intention that the Verilog specification

More information

Designing a Multicycle Processor

Designing a Multicycle Processor Designing a Multicycle Processor Arquitectura de Computadoras Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Arquitectura de Computadoras Multicycle-

More information

Note that none of the above MAY be a VALID ANSWER.

Note that none of the above MAY be a VALID ANSWER. ECE 270 Learning Outcome 4-1 - Practice Exam / Solution OUTCOME #4: An ability to design and implement computer logic circuits. Multiple Choice select the single most appropriate response for each question.

More information

20/08/14. Computer Systems 1. Instruction Processing: FETCH. Instruction Processing: DECODE

20/08/14. Computer Systems 1. Instruction Processing: FETCH. Instruction Processing: DECODE Computer Science 210 Computer Systems 1 Lecture 11 The Instruction Cycle Ch. 5: The LC-3 ISA Credits: McGraw-Hill slides prepared by Gregory T. Byrd, North Carolina State University Instruction Processing:

More information

Verilog HDL:Digital Design and Modeling. Chapter 11. Additional Design Examples

Verilog HDL:Digital Design and Modeling. Chapter 11. Additional Design Examples Chapter 11 Additional Design Examples 1 Verilog HDL:Digital Design and Modeling Chapter 11 Additional Design Examples Chapter 11 Additional Design Examples 2 Page 604 //structural 3-bit johnson counter

More information

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital

More information

Implementing the Control. Simple Questions

Implementing the Control. Simple Questions Simple Questions How many cycles will it take to execute this code? lw $t2, 0($t3) lw $t3, 4($t3) beq $t2, $t3, Label add $t5, $t2, $t3 sw $t5, 8($t3) Label:... #assume not What is going on during the

More information

TSEA44: Computer hardware a system on a chip

TSEA44: Computer hardware a system on a chip TSEA44: Computer hardware a system on a chip Lecture 2: A short introduction to SystemVerilog (System)Verilog 2016-11-02 2 Assume background knowledge of VHDL and logic design Focus on coding for synthesis

More information

VHDL: RTL Synthesis Basics. 1 of 59

VHDL: RTL Synthesis Basics. 1 of 59 VHDL: RTL Synthesis Basics 1 of 59 Goals To learn the basics of RTL synthesis. To be able to synthesize a digital system, given its VHDL model. To be able to relate VHDL code to its synthesized output.

More information

CpE 442. Designing a Multiple Cycle Controller

CpE 442. Designing a Multiple Cycle Controller CpE 442 Designing a Multiple Cycle Controller CPE 442 multicontroller.. Outline of Today s Lecture Recap (5 minutes) Review of FSM control (5 minutes) From Finite State Diagrams to Microprogramming (25

More information

Single Cycle Datapath

Single Cycle Datapath Single Cycle atapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili Section 4.-4.4 Appendices B.7, B.8, B.,.2 Practice Problems:, 4, 6, 9 ing (2) Introduction We will examine two MIPS implementations

More information

Control Unit Implementation

Control Unit Implementation Control Unit Implementation Moore Machine Implementation Reset RES PC IF PC MAR, PC + PC Note capture of MBR in these states IF Wait/ IF2 Wait/ Wait/ MAR Mem, Read/Write, Request, Mem MBR Wait/ IF3 Wait/

More information