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

Similar documents
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

Two hours - online EXAM PAPER MUST NOT BE REMOVED FROM THE EXAM ROOM UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

COMP12111 Fundamentals of Computer Engineering Paul Nutter Vasilis Pavlidis Comments

Note: Closed book no notes or other material allowed, no calculators or other electronic devices.

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

CS303 LOGIC DESIGN FINAL EXAM

END-TERM EXAMINATION

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

Microcomputers. Outline. Number Systems and Digital Logic Review

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

Finite-State Machine (FSM) Design

Code No: R Set No. 1

Code No: R Set No. 1

R10. II B. Tech I Semester, Supplementary Examinations, May

Code No: R Set No. 1

EE 109L Review. Name: Solutions

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

EECS Components and Design Techniques for Digital Systems. Lec 20 RTL Design Optimization 11/6/2007

Scheme G. Sample Test Paper-I

N-input EX-NOR gate. N-output inverter. N-input NOR gate

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AN:p ENGINEERING. ECE241F - Digital Syst~ms Final Examination


CS429: Computer Organization and Architecture

Lecture 32: SystemVerilog

FSM Design Problem (10 points)

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

Digital Design with FPGAs. By Neeraj Kulkarni

Injntu.com Injntu.com Injntu.com R16

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

RealDigital. Problem Set #7 S1 S2 S3 Y Z X Y + Y Z X Z

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

Computer architecture Assignment 3

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

IA Digital Electronics - Supervision I

Systems Programming. Lecture 2 Review of Computer Architecture I

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

Problem Set 10 Solutions

Recitation Session 6

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8

Computer Architecture Programming the Basic Computer

ECE 341 Midterm Exam

Debouncing a Switch. A Design Example. Page 1

Midterm Examination # 2 Wednesday, March 18, Duration of examination: 75 minutes

EE 109L Final Review

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Sciences. Spring 2010 May 10, 2010

NADAR SARASWATHI COLLEGE OF ENGINEERING AND TECHNOLOGY Vadapudupatti, Theni

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

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

VALLIAMMAI ENGINEERING COLLEGE

PART B. 3. Minimize the following function using K-map and also verify through tabulation method. F (A, B, C, D) = +d (0, 3, 6, 10).

von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

Writing Circuit Descriptions 8

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

Digital Design with SystemVerilog

Arab Open University. Computer Organization and Architecture - T103

CSCI 2121 Computer Organization and Assembly Language PRACTICE QUESTION BANK

Honorary Professor Supercomputer Education and Research Centre Indian Institute of Science, Bangalore

Written exam for IE1204/5 Digital Design Thursday 29/

Lecture 15: System Modeling and Verilog

VALLIAMMAI ENGINEERING COLLEGE

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

Verilog Sequential Logic. Verilog for Synthesis Rev C (module 3 and 4)

Hours / 100 Marks Seat No.

Outline. EECS Components and Design Techniques for Digital Systems. Lec 11 Putting it all together Where are we now?

R a) Simplify the logic functions from binary to seven segment display code converter (8M) b) Simplify the following using Tabular method

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Computer Organization: Basic Processor Structure

ECE550 PRACTICE Midterm

2015 Paper E2.1: Digital Electronics II

A Brief Introduction to Verilog Hardware Definition Language (HDL)

Good Evening! Welcome!

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

Federal Urdu University of Arts, Science and Technology, Islamabad VLSI SYSTEM DESIGN. Prepared By: Engr. Yousaf Hameed.

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Logic design Ibn Al Haitham collage /Computer science Eng. Sameer

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

Question Total Possible Test Score Total 100

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

R07

COMPUTER ORGANIZATION AND ARCHITECTURE

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

Department of Technical Education DIPLOMA COURSE IN ELECTRONICS AND COMMUNICATION ENGINEERING. Fifth Semester. Subject: VHDL Programming

11/22/1999 7pm - 9pm. Name: Login Name: Preceptor Name: Precept Number:

2. (a) Compare the characteristics of a floppy disk and a hard disk. (b) Discuss in detail memory interleaving. [8+7]

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

CS 61C Summer 2012 Discussion 11 State, Timing, and CPU (Solutions)

Topics. Midterm Finish Chapter 7

Sequential Logic Design

ELCT 501: Digital System Design

CSEE 3827: Fundamentals of Computer Systems. Storage

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 09 MULTIPLEXERS

Music. Numbers correspond to course weeks EULA ESE150 Spring click OK Based on slides DeHon 1. !

Topic #6. Processor Design

Real Digital Problem Set #6

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

CSE 140L Final Exam. Prof. Tajana Simunic Rosing. Spring 2008

Transcription:

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 in Section A and ONE Question from Section B Use a SEPARATE answerbook for each SECTION. This is a CLOSED book examination The use of electronic calculators is permitted provided they are not programmable and do not store text [PTO]

Section A COMPULSORY Please answer both questions 1. Answer any 5 parts of this question. Each part is worth 2 marks. a) You are required to write a variable assignment in Verilog that assigns a value to the variable abc (which has been defined as reg). State the assignment in the following cases: i) the variable is assigned an 8-bit binary value that is equivalent to the decimal value 25 (½ mark) ii) the variable is assigned the decimal value 65 as a 16-bit value (½ mark) iii) the variable is assigned a 16-bit hexadecimal value equivalent to the decimal value -18 (using two s complement form) (½ mark) iv) the variable is assigned an 8-bit decimal value equivalent to the unsigned binary value 11101111. (½ mark) b) Explain how the contents of the sensitivity list in a Verilog always statement differ when the always block contains blocking or non-blocking assignments. c) The Verilog code shown in Figure 1 represents a combinatorial circuit. However, it contains a number of errors. List the errors. Figure 1: Verilog code d) Using DeMorgan s Theorem, express the following sum-of-products expression in a form that includes a product-of-sums expression. Q=A.B.C+A.B.C+A.B.C Page 2 of 13 (Question 1 continues on the following page)

(Question 1 continues from the previous page) e) In addition to data and clock inputs, a D-type flip-flop often has a clock enable, CE, input, as shown in Figure 2. What is this used for? Figure 2: D-type flip-flop symbol Sketch a timing diagram to illustrate the behaviour of the D-type flip-flop shown. f) Figure 3 illustrates a schematic design for a 2:1 multiplexer. Produce a test stimulus for this design in Verilog that exercises this design exhaustively. Figure 3: 2:1 MUX g) Produce a Boolean expression for the logical function whose behaviour is depicted in the truth table given in Figure 4. Inputs Output P Q Z 0 0 1 0 1 1 1 0 0 1 1 1 Figure 4: Truth Table Sketch a circuit for the logical function using the basic logic gates AND, OR, and NOT. Inverted signals for the inputs P and Q are NOT provided. Page 3 of 13 (Question 1 continues on the following page)

(Question 1 continues from the previous page) h) A sequential system can contain datapath and control blocks. Discuss the functional characteristics of these two elements of a sequential system. Page 4 of 13

2. Answer any 5 parts of this question. Each part is worth 2 marks. a) Assume a memory hierarchy of a modern computer includes the following components listed in a random order: non-volatile (high capacity) storage, L1 cache, main memory, and L2 cache. Place these different elements in order of decreasing logical proximity to the CPU. You are provided with the following memory technologies: DRAM memory, SRAM memory, and magnetic disk drive. Which of these memory technologies would you use for each level of the storage hierarchy of the computer system? b) The timing analysis of a synchronous digital circuit has resulted in a critical path delay of 600 ps. If an additional delay of 11% is added to the critical path delay to allow for the effect of process variability, what is the maximum clock frequency that this circuit can support? If the circuit is implemented in a newer technology where the gates are 20% faster and the added allowance for process variability is 15% of the critical path delay, what is the new maximum clock frequency for this circuit? c) Describe what a timer is and its use in a computing system. d) Which mechanism can be used to transfer a block of continuous words from/to the main memory while not performing continuous LOAD/STORE instructions? Describe its operation. What is the benefit of this approach? e) A processor can accept interrupts from three different peripherals, the interrupt signals are named IN1, IN2, and IN3. These signals are input to a logic circuit that outputs a global active low input interrupt signal (INT) to the processor, which goes low when an interrupt is raised by a peripheral. Interrupts can only be generated if the processor has set the interrupt enable signal (INT_EN). This signal is also an input to the logic circuit that generates INT. Provide the truth table for generating the INT signal towards the processor. f) Name an operation, other than storing data, where shift registers can be used? Give an example of such an operation for an 8-bit shift register. g) Briefly discuss the USB communications protocol. How many physical signals does the USB interface employ? What is the role of bit stuffing (an example can be used to show how bit stuffing works)? (Question 2 continues on the following page) Page 5 of 13

(Question 2 continues from the previous page) h) A modified datapath diagram of the MU0 is illustrated in Figure 5 where a register DIN has been inserted to speed up the operation of the processor. In this design, all instructions require three cycles to complete. The delay of loading/storing data from/to the memory is 1.5 ns, while the path from DIN to ACC/PC has a delay of 800 ps. Thus, the clock frequency of the processor is 666 MHz. The memory of the system will be replaced by a faster circuit that allows load/store operations with a delay of 700 ns. How can we modify the design of the MU0 so as to speed up execution if the clock frequency is constrained to 666 MHz. Memory Data Out Address Data In ACC PC IR DIN ALU Timing and Control Figure 5: MU0 datapath Page 6 of 13

Section B Please answer ONE question 3. a) The complete state transition diagram shown in Figure 6 contains a number of errors. Produce a list of the errors in the state transition diagram, explaining why they are errors. Note: state codes are expressed in bold outside the state, outputs asserted in a state are expressed in bold within a state. (3 marks) Figure 6: State Transition Diagram with Errors b) When designing a finite state machine (FSM) in hardware, it is possible to represent the internal structure of the FSM using three functional blocks. Briefly discuss the role of each of these functional blocks. (3 marks) c) Figure 7 illustrates a state transition diagram for a finite state machine design for use in a vending machine. The vending machine has the following specification: The machine will dispense a chocolate bar when 30p has been entered The machine takes 10p and 20p coins When 30p has been entered the chocolate bar is dispensed If more than 30p is entered then the machine rejects the coins and returns to the initial state. The machine has an asynchronous reset that should return the system to an initial state when asserted. (Question 3 continues on the following page) Page 7 of 13

(Question 3 continues from the previous page) The design has the following input and output signals: Input signals: 10p goes high when a 10p coin is entered into the vending machine 20p goes high when a 20p coin is entered into the vending machine. Note: 10p and 20p are mutually exclusive. Output signals: ready is asserted when in the initial state reject is asserted then too much money has been entered dispense is asserted when the correct amount of money has been entered. Assign state codes to the states and produce a state transition table. Note: the state transition diagram has been simplified by removing all transitions from the diagram that result in no change of state at a rising clock edge. (4 marks) Figure 7: State Transition Diagram (Question 3 continues on the following page) Page 8 of 13

(Question 3 continues from the previous page) d) Produce the Verilog code for the three functional blocks identified in Part b) for the FSM design shown in Figure 7. You may assume that there is a clock input to the module called clk, and that the internal variables current_state and next_state have been defined for you. (10 marks) Page 9 of 13

4. a) A memory system has been designed with a 12-bit address bus and employs word addressing, where the most significant bit(s) are used to provide the chip select signal to the memory chips through a decoder. Assuming that each chip contains 2048 words, how many chips does this memory system require? Provide a symbol for the decoder required to provide the chip select ( CS ) signals for these chips, where an enable signal for the decoder is also required. Label the inputs, outputs, and control signal(s) of the decoder clearly in your diagram. Produce a truth table for this decoder. Note that the chip selects are active low signals. b) Figure 8 illustrates a datapath of the MU0 processor. Figure 9 provides the MU0 instruction format and the basic MU0 instruction set with mnemonics and op. codes. Figure 8: MU0 datapath You are required to write some MU0 assembly code to swap the data held at two consecutive memory addresses, &EE4 and &EE5. The data stored at these two addresses are &00AA and &00BB respectively. There is free memory to use in the address range &CC0 to &DDF. Produce a sequence of MU0 instructions to perform this task. (3 marks) (Question 4 continues on the following page) Page 10 of 13

(Question 4 continues from the previous page) The table in Figure 10 is for listing the contents of the three MU0 registers during the fetch and execute/decode stages of instruction execution. You can assume that the first of your instructions is stored at address &0BB1. To help you, the table has been completed for the first instruction. Copy the table to your answer book and complete it, in a similar manner using only hex values for the contents of the registers, for the code you produced in the first part of this question. Add more rows as required. (5 marks) Instruction format F Mnemonic F 0 Mnemonic LDA S Description 0 1 LDA STO S Acc := [S] 1 2 STA ADD S [S] := Acc 2 3 ADDSUB S Acc := Acc + [S] 3 4 SUB JMP S Acc := Acc [S] 4 5 JMP JGE S PC := S 6 5 JNE JGE S If Acc >= 0, PC := S 7 6 STP JNE S If Acc 0, PC := S 7 STP Stop Figure 9: MU0 Instruction format and mnemonics Mnemonic Clock cycle Stage PC ACC IR n+1 Fetch &0BB1 unknown unknown LDA n+2 Dec/Exec &0BB2 unknown &0EE4 Figure 10: Instruction table (Question 4 continues on the following page) Page 11 of 13

(Question 4 continues from the previous page) c) A 32-bit ripple carry adder is built from four identical 8-bit adders. Provide a block diagram of the design of the 32-bit adder. The 8-bit adder design used has a maximum carry delay of 400 ps. What would you expect the maximum carry delay of the 32-bit adder to be? Explain why. Testing indicates that when the test vectors A= 32`hxxFFFFF0, B = 32`hxx000010 are applied to the two inputs of the 32-bit adder, A and B, the SUM and CARRY outputs are set to 32`hxxFF0000 and x, respectively. Can you infer from this information which connection in the 32-bit adder is faulty? Justify your answer. d) Figure 11 illustrates the block diagram of an adder design called the carry look ahead adder. The main difference from the carry ripple adder is the generation of two signals for each 1-bit full adder, carry generation, G i, and carry propagation, P i, which are described by the logic expressions: G i = A i B i P i = A i B i For the 4-bit adder illustrated in Figure 11 produce a logic expression for C out = C 4 considering that SUM i = P i G i, and C i+1 = G i + (P i C i ), where i is the bit index and C 0 = C in. B<3:0> A<3:0> B<3> A<3> B<2> A<2> B<1> A<1> B<0> A<0> Cout SUM<3> 1-bit full adder s b a cin p g P3 G3 C3 SUM<2> b a cin 1-bit full adder s p g P2 G2 C2 SUM<1> b a cin 1-bit full adder s p g P1 G1 C1 SUM<0> b a cin 1-bit full adder s p g P0 G0 Cin Cin Cin 4-bit carry look ahead generator SUM<3:0> Figure 11: Block diagram of carry look ahead adder. (Question 4 continues on the following page) Page 12 of 13

(Question 4 continues from the previous page) Provide the circuit diagram for the logic expression of C out. Assuming that the delay of the AND/OR gates is 20 ps and 30 ps for 2 and 3- inputs respectively and that the delay of a 2-input XOR is 50 ps, determine the delay of the critical path of your circuit for C out (only 2 and 3-input gates can be utilized within the carry look-ahead generator). END OF EXAMINATION Page 13 of 13