One and a half hours. Section A is COMPULSORY

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 UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

COMP12111 Fundamentals of Computer Engineering Paul Nutter Vasilis Pavlidis Comments

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

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

CS303 LOGIC DESIGN FINAL EXAM

Graduate Institute of Electronics Engineering, NTU Design of Datapath Controllers

C A R L E T O N U N I V E R S I T Y. FINAL EXAMINATION April Duration: 3 Hours No. of Students: 108

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

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

problem maximum score 1 10pts 2 8pts 3 10pts 4 12pts 5 7pts 6 7pts 7 7pts 8 17pts 9 22pts total 100pts

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

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

EE178 Lecture Verilog FSM Examples. Eric Crabill SJSU / Xilinx Fall 2007

LSN 1 Digital Design Flow for PLDs

Verilog introduction. Embedded and Ambient Systems Lab

ECE 2300 Digital Logic & Computer Organization. More Finite State Machines

ECE 551 Digital System Design and Synthesis. Instructor: Kewal K. Saluja. Midterm Exam

Digital Design & Computer Architecture (E85) D. Money Harris Fall 2007

Finite-State Machine (FSM) Design

Scheme G. Sample Test Paper-I

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

EECS 373 Practice Midterm / Homework #3 Fall 2014

EE 109L Review. Name: Solutions

Synthesizable Verilog

DIGITAL SYSTEM DESIGN

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview

The Verilog Language COMS W Prof. Stephen A. Edwards Fall 2002 Columbia University Department of Computer Science

EECS 151/251A: SRPING 2017 MIDTERM 1

Laboratory Exercise 7

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

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

Hours / 100 Marks Seat No.

Laboratory Exercise 3

Verilog Module 1 Introduction and Combinational Logic

ECE 4514 Digital Design II. Spring Lecture 15: FSM-based Control

Problem Set 10 Solutions

Student Number: UTORid: Question 0. [1 mark] Read and follow all instructions on this page, and fill in all fields.

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

Logic Circuits II ECE 2411 Thursday 4:45pm-7:20pm. Lecture 3

Introduction. Why Use HDL? Simulation output. Explanation

2015 Paper E2.1: Digital Electronics II

Lecture 3. Behavioral Modeling Sequential Circuits. Registers Counters Finite State Machines

First Name: Last Name: PID: CSE 140L Exam. Prof. Tajana Simunic Rosing. Winter 2010

CE161-4-AU UNIVERSITY OF ESSEX. Undergraduate Examinations 2014 DIGITAL SYSTEMS ARCHITECTURE. Time allowed: TWO hours

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Interface DAC to a PC. Control Word of MC1480 DAC (or DAC 808) 8255 Design Example. Engineering 4862 Microprocessors

FSM and Efficient Synthesizable FSM Design using Verilog

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

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

In the previous lecture, we examined how to analyse a FSM using state table, state diagram and waveforms. In this lecture we will learn how to design

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

Intro to Digital Logic, Lab 5 Sequential Logic. Lab Objectives. Assigned Task Mapping sequential logic to the FPGA

Tutorial 3. Appendix D. D.1 Design Using Verilog Code. The Ripple-Carry Adder Code. Functional Simulation

Code No: R Set No. 1

Sequential Logic Design

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 4 Certificate in IT COMPUTER AND NETWORK TECHNOLOGY

1. (11 pts) For each question, state which answer is the most apropriate. First one is done for you.

Lecture #2: Verilog HDL

EECS 270 Midterm Exam

Design of Digital Circuits ( L) ETH Zürich, Spring 2017

QUESTION BANK UNIT-I. 4. With a neat diagram explain Von Neumann computer architecture

EE 109L Final Review

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

EECS150 - Digital Design Lecture 4 - Verilog Introduction. Outline

Laboratory Exercise 3 Davide Rossi DEI University of Bologna AA

Verilog for Synthesis Ing. Pullini Antonio

Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Spring 2017 EE 3613: Computer Organization Chapter 5: Processor: Datapath & Control - 2 Verilog Tutorial

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science

ENEE245 Digital Circuits and Systems Lab Manual

Arab Open University. Computer Organization and Architecture - T103

Three-box Model: These three boxes need interconnecting (usually done by wiring known as a bus. 1. Processor CPU e.g. Pentium 4 2.

ECEN : Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University. Homework #1 Solutions

Using ModelSim to Simulate Logic Circuits for Altera FPGA Devices

problem maximum score 1 8pts 2 6pts 3 10pts 4 15pts 5 12pts 6 10pts 7 24pts 8 16pts 9 19pts Total 120pts

EECS150 - Digital Design Lecture 16 Memory 1

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE) UNIT-I

Writing Circuit Descriptions 8

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 11. Introduction to Verilog II Sequential Circuits

Mealy and Moore examples

B.10 Finite State Machines B.10

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

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).

IA Digital Electronics - Supervision I

COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

Quick Introduction to SystemVerilog: Sequental Logic

Sequential Logic Blocks

Section 001. Read this before starting!

The D igital Digital Logic Level Chapter 3 1

Control in Digital Systems

1. Internal Architecture of 8085 Microprocessor

ECE 485/585 Midterm Exam

Lab 3: Standard Combinational Components

EECS 373 Practice Midterm & Homework #2 Fall 2011

Nikhil Gupta. FPGA Challenge Takneek 2012

CS/ECE 252: INTRODUCTION TO COMPUTER ENGINEERING UNIVERSITY OF WISCONSIN MADISON

General FSM design procedure

Transcription:

One and a half hours Section A is COMPULSORY An additional answersheet is provided for Question 4. Please remember to complete the additional answersheet with your University ID number and attach it to your answerbook(s). UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Fundamentals of Computer Engineering Date: Wednesday 22nd January 2014 Time: 14:00-15:30 Answer ALL Questions in Section A and ONE Question from Section B 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) For the logical function Q=A.B+A.B show, using DeMorgan s theorem, how it can be implemented using 3 NAND gates; sketch a schematic of the design (the true and complemented input signals are provided for you). b) For the Verilog stimulus code shown below sketch waveforms to show how the signal values vary in time relative to each other. initial begin clock = 0; #20 clock = 1; #20 clock = 0; #20 clock = 1; #20 clock = 0; #20 clock = 1; #20 $stop; end initial begin data_out = 0; #30 data_out = 1; #30 data_out = 0; #30 data_out = 1; end (Question 1 continues on the following page) Page 2 of 12

(Question 1 continues from the previous page) c) What is the basic component of a register? What is the purpose of the CE input to a flip-flop when present? d) Figure 1 illustrates a state transition diagram of a finite state machine. However, there are some errors with the design. Identify all the errors. Figure 1 e) CAD tools are essential for the digital designer to manage complex designs. Give two examples of CAD tools used in digital hardware design and briefly state what each tool is used for. f) What are the equivalent 6-bit 2 s complement binary numbers for the following signed decimal values? i. +23 ii. -1 iii. -32 iv. +36 (Question 1 continues on the following page) Page 3 of 12

(Question 1 continues from the previous page) g) Define the terms set-up and hold time. What is the practical consequence of these in terms of the operation of a flip-flop? h) Sketch an equivalent schematic representation of the logical function described by Verilog module given below module acircuit ( input a, b, c, output p, q); wire avariable; assign avariable = a b; assign p = avariable & ~c; assign q = ~p; endmodule Page 4 of 12 [PTO]

2. Answer any 5 parts of this question. Each part is worth 2 marks. a) Briefly discuss the advantages and disadvantages of the Harvard architecture as compared to the von Neumann architecture. b) Sort the following types of memories in terms of (i) read speed and (ii) storage density and annotate whether each memory type is volatile or not: SRAM, magnetic discs, DRAM, Flash memory. c) Please answer True or False to the following statements: i. Tristate signals should normally be used as control signals. ii. An asynchronous system requires a clock signal. iii. A clock signal of 250MHz has a period of 4 s. iv. Communication by handshaking requires at least two control signals. (½ mark will be awarded for a correct answer, and ½ mark will be lost for an incorrect answer) d) Assuming that a user program stored in the main memory is divided into 10 parts. The dynamic utilization (normalized to 1) of each part of this program for some data set is indicated by the numbers in the main memory space illustrated in Table 1. A cache that can accommodate 20% of the program is also included in our architecture (not shown here). Which parts of the program would you choose to place in the cache and why? Which properties of the program code have you used for your assignment? (The hex memory addresses provide the beginning address for each segment of the program). Main Memory hx1xxx 0.04 hx2xxx 0.15 hx3xxx 0.08 hx4xxx 0.13 hx5xxx 0.02 hx6xxx 0.18 hx7xxx 0.19 hx8xxx 0.08 hx9xxx 0.05 hxaxxx 0.08 Table 1 (Question 2 continues on the following page) Page 5 of 12

(Question 2 continues from the previous page) e) Briefly discuss what TDM is and mention an example application where it is typically used. f) A von Neumann machine with a word width of 16-bits has a main memory which, in turn, has 16-bit address bus. The smallest addressable quantity is one word. From the 16-bits of the memory address, three are used to select the proper memory chip and the rest are employed to determine a word within each chip. How many chips constitute the memory? What is the size in bits of each memory chip? g) Assume a daisy chain configuration for prioritizing interrupts among peripherals is illustrated in figure 2. The CPU generates IAck 500 ps after a (active) clock edge. The wire delay is 1 ns (shown in the figure) and the logic delay through each peripheral is 500 ps. How many peripherals can be accommodated if the lowest priority peripheral must receive the IAck signal within the 7 ns clock period? Figure 2 h) Describe the operation of the PC register in the MU0 processor. How general is the use of this register to other microprocessors? Page 6 of 12 [PTO]

SECTION B Please answer ONE Question 3. The Verilog code in figure 3 describes a partially completed module. module mystery ( input clock, start, reset, output reg [4:0] sequence, output reg flash); reg reg [3:0] next_state; [3:0] current_state; always @ (*) case (current_state) 3 b000: if(start) next_state = 3 b001; else next_state = 3 b000; 3 b001: next_state = 3 b010; 3 b010: next_state = 3 b011; 3 b011: next_state = 3 b100; 3 b100: next_state = 3 b101; 3 b101: next_state = 3 b110; 3 b110: next_state = 3 b000; default: next_state = 3 b000; endcase always @ (posedge clock) if(reset == 1) current_state <= 3 b000; else current_state <= next_state; // AA // BB // CC // assignment of output signals here // ******** // ******** endmodule Figure 3 a) Describe the syntactic structure of a Verilog module. How would you represent a module in a circuit diagram? (4 marks) b) What is the purpose of the statement at line AA? c) Why should we include a default case as shown in line BB? (1 mark) (1 mark) (Question 3 continues on the following page) Page 7 of 12

(Question 3 continues from the previous page) d) When will the always block starting at line CC be executed? (1 mark) e) Sketch and label a state transition diagram for the machine described in the Verilog module. (5 marks) f) The module shown in figure 3 is used to describe the operation of a pedestrian crossing, where there is a set of traffic lights with the usual arrangement of red, amber and green lights, and pedestrian lights consisting of a red man and a green man. The required light sequence with respect to each state of the Finite State Machine (FSM) is illustrated in Figure 4. Figure 4 (Question 3 continues on the following page) Page 8 of 12

(Question 3 continues from the previous page) The output sequence, which represents the state of the lights, is configured as shown in table 2, where the appropriate bit is set to 1 to turn on the light, or 0 to turn off the light. bit number of output bus sequence 4 3 2 1 0 amber traffic green traffic pedestrian light light red man red traffic light Table 2 pedestrian green man When the output flash is taken high any lights that are lit will flash at a rate determined by an external circuit. Complete the design of the module by producing the Verilog code to configure the output signals sequence and flash. (8 marks) [PTO] Page 9 of 12

4. a) Assuming that communication between a peripheral and the master CPU is realized with the strobing method, explain why the address and data signals should not change at least as long as the strobe signal is asserted. Provide a timing diagram that illustrates the timing of this method. (3 marks) b) A combinational circuit is flanked by two registers, as illustrated in figure 5. By using the delays of the gates as given in figure 6 annotate on the additional answer sheet the critical path of the circuit. What is the delay of this path? If the registers have a set up time of 1ns, what is the maximum clock frequency that this circuit can operate? (Do not attempt to optimize the circuit first.) (5 marks) I0 I1 I2 O1 O2 Clk Clk Figure 5 1.5 ns 1 ns 1.5 ns 1 ns 2 ns 0.5 ns 2 ns Figure 6 Please write your University ID clearly on the additional answer sheet and attach it securely to your answer booklet. (Question 4 continues on the following page) Page 10 of 12

(Question 4 continues from the previous page) c) Within an instruction set, an instruction compares two operands and sets a flag bit in one of the registers of the CPU if the numbers are equal. Describe two possible ways to implement this instruction. Provide the logic circuit (i.e., schematic) for both ways. The schematic of the circuit for a single bit of the two operands suffices (i.e., a bit slice). (4 marks) d) If USB is used to transmit the following data stream: 01001111111000000010 (The underlined bit is the 1 st transmitted bit of the stream.) i) Provide the proper encoding without bit stuffing by drawing the appropriate NRZI waveform for the entire data stream. (1 mark) ii) How would the data stream change when bit stuffing is considered? Also depict the NRZI waveform with bit stuffing. What is the reason for using bit stuffing? (Hint: USB adds a transition to ensure that there is at least one transition every six bit times.) (2 marks) e) The block shown in Figure 7 corresponds to a priority encoder for hardware interrupts with three outputs O1, O2, and INT. The outputs O1 and O2 encode the interrupt source and INT is asserted only if an interrupt is to be served. The four inputs (active high) to the encoder correspond to 4 different interrupt sources. The interrupt priority among these sources is defined as follows: an interrupt will be served only if any interrupt of higher priority has not been asserted. The inputs in descending order of priority are: D3, D2, D1, D0. i) Provide the truth table for the priority encoder. (3 marks) ii) Based on the truth table, provide the Boolean expression and the related schematic only for the output INT. (2 marks) (Question 4 continues on the following page) Page 11 of 12

(Question 4 continues from the previous page) D3 D2 D1 D0 Priority encoder O2 O1 INT Figure 7 END OF EXAMINATION Page 12 of 12