Total: EEL 3701 Digital Logic & Computer Systems Final Exam Fall Semester 2007 COVER SHEET: Re-Grade Information: 1 (10) 2 (10) 3 (10) 4 (14) 5 (14)

Similar documents
Y = (A + C) (A + B) (B + C)

Homework 12 Solutions

LECTURE #21: G-CPU & Assembly Code EEL 3701: Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz

Menu Computer Organization Programming Model for the an example microprocessors (the G-CPU & Motorola 68HC11) Assembly Programming Look into my...

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University

1. Memory Mapped Systems 2. Adding Unsigned Numbers

ME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7

Go Gators! Relax! May the Schwartz be with you!

Good Evening! Welcome!

Problem Points Your Points Total 80

ECE331 Handout 3- ASM Instructions, Address Modes and Directives

Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003

2) [ 2 marks] Both of the following statements cause the value $0300 to be stored in location $1000, but at different times. Explain the difference.

Cross Assembly and Program Development

University of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz

Decimal, Hexadecimal and Binary Numbers Writing an assembly language program

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation

Introduction to Microcontrollers II

Mark II Aiken Relay Calculator

Introduction to Microcontrollers

Introduction to the 9S12 Microcontroller

Introduction to Microcontrollers II

MC68HC12 Parallel I/O

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

ME 6405 Introduction to Mechatronics

CMPEN 472 Sample EXAM II

Programming the Motorola MC68HC11 Microcontroller

Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky

ECE L A B 1 Introduction ASSEMBLY PROGRAMMING WITH MINIIDE

Input and Output Ports. How do you get data into a computer from the outside?

ECE 3610 MICROPROCESSING SYSTEMS AN ENCRYPTED ASCII CODE DECODER

Sample Problem Set #1

MC9S12 Address Space

Code No: R Set No. 1

CS303 LOGIC DESIGN FINAL EXAM

Lab 2 Part 1 Assembly Language Programming and 9S12 Ports

Introduction to Programming

Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming

Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3. You will be able to use all of the Motorola data manuals on the exam.

EE319 K Lecture 3. Introduction to the 9S12 Lab 1 Discussion Using the TExaS simulator. University of Texas ECE

ECE 3610 MICROPROCESSING SYSTEMS

Exam 1 Feb. 23, 25, 27?

MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes. Summary of HCS12 addressing modes ADDRESSING MODES

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

Lecture 6 Assembly Programming: Branch & Iteration

QUESTION BANK FOR TEST

N bit is set if result of operation in negative (MSB = 1) Z bit is set if result of operation is zero (All bits = 0)

Using the stack and the stack pointer

EE 3170 Microcontroller Applications

The 9S12 in Expanded Mode - Using MSI logic to build ports Huang Chapter 14

ECE 372 Microcontroller Design Assembly Programming Arrays. ECE 372 Microcontroller Design Assembly Programming Arrays

What is an Addressing Mode?

CodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

BINARY LOAD AND PUNCH

History of the Microprocessor. ECE/CS 5780/6780: Embedded System Design. Microcontrollers. First Microprocessors. MC9S12C32 Block Diagram

Lab 8: Debugging Embedded Devices and Software

It translates (converts) assembly language to machine code.

ECE 331: PC Lab 3 Stack and Subroutines

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422)

EE 3170 Microcontroller Applications

Exam 2 E2-1 Fall Name: Exam 2

Memory and Programmable Logic

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

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

A Simple MC9S12 Program

Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming

The 9S12 in Expanded Mode - How to get into expanded mode Huang Chapter 14

Lecture 5 Assembly Programming: Arithmetic

LAB 7: G-CPU: Assembly Programming and Hand Assembly

HC11 Instruction Set

CHALMERS Lindholmen 1. Compare (a) a sand hour glass, (b) a pocket mechanical watch (c) a wrist quartz watch and (d) the Big

Code No: 07A3EC03 Set No. 1

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Assembly Language programming (1)

EE 109L Review. Name: Solutions

Using MSI Logic To Build An Output Port

EE319 K Lecture 7. Address mode review Assembler, Debugging Psuedo ops 16 bit timer finite state machines. University of Texas ECE

Continuing with whatever we saw in the previous lectures, we are going to discuss or continue to discuss the hardwired logic design.

Lecture 9 Subroutines

ECE3120: Computer Systems Hardware & Software Development Tools

Computer Organization I. Lecture 28: Architecture of M68HC11

ELEG3924 Microprocessor

Lecture 13: Memory and Programmable Logic

Department of Electrical and Computer Engineering University of Wisconsin Madison. Fall Midterm Examination CLOSED BOOK

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

538 Lecture Notes Week 3

EB301. Motorola Semiconductor Engineering Bulletin. Programming EEPROM on the MC68HC811E2 during Program Execution. Freescale Semiconductor, I

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

ECE/CS 3720: Embedded System Design (ECE 6960/2 and CS 6968)

CE-320 Microcomputers I Winter 2010 LAB 1: MINIIDE GROUP #: NAME: PARTNER: Lab 1 Page 1

Sunday, April 25, 2010

Lecture #3 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS


Chapter 2: HCS12 Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

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

Module 1-G. Marcos and Structured Programming

Computer architecture Assignment 3

ECE 3120 Lab 1 Code Entry, Assembly, and Execution

Transcription:

COVER SHEET: Prob. Points: Re-Grade Information: Total: 1 (10) 2 (10) 3 (10) 4 (14) 5 (14) 6 (15) 7 (15) 8 (12) (100) 1

Remember to show ALL work here and in EVERY problem on this exam. [10%] 1. Circuit Analysis What is the logic equation for X in the given circuit? Do not simplify or transform it into an SOP or POS form. Leave the logic expression as it is after analysis. Also, draw the intermediate expression at the input to each gate. Notation reminder: A(H) is the same as A.H Boolean expression answers must be in lexical order, i.e., /A before A, A before B, etc. EQUATION: X = A(L) B(H) C(H) D(L) E(L) X(L) A(L) C(H) B(L) A(L) B(H) 2

[10%] 2. Circuit Synthesis Draw a mixed-logic circuit diagram (with the minimum number of gates) to directly implement the below equation. All inputs and the output can be of any activation-level desired. Be sure to specify the desired activation levels. Do not simplify this equation. You may only use gates available on 74HC10 chips (shown). Use as many 74HC10 chips as you need, but use the minimum number required to solve this problem. 10 F=A*B*D + B*/C*/E + /A*C*/D 3

[10%] 3. Implementation of an ASM chart using clocked S-R FFs S-R characteristic table: S R Q Q+ 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0? 1 1 1? (a) Given the above ASM chart, complete the following block diagram of its implementation using the minimum number of clocked S-R flip-flops: (2%) Determine how many clocked S-R flip-flops that are needed. Draw in all the inputs and outputs of the combinatorial circuit. Make all necessary connections to complete the block diagram (between the combinatorial circuit and the clocked S-R flip-flops). Combinatorial circuit (Inputs) (Outputs) (Draw flip-flops here.) 4

3. (continued) (ASM chart is repeated here for your convenience) S-R characteristic table: S R Q Q+ 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0? 1 1 1? (b) Finish the implementation of the ASM by determining the minimum sum-of-products (MSOP) logic expressions for all the output signals: (8%) (If necessary, use the bottom/back of the previous page to do your work.) 5

[14%] 4. Assume the below has already been run, and the code that follows in a, b, c, d, e, f, g will follow. Hand assemble the following instructions and fill in the blanks. EA is the 16-bit effective address. If there is no effective address, write none. (Use the G-CPU instruction set attached to this test). ORG $0032 ORG $0048 Data0 DC.B $66 Data6 DC.B $3E ORG $0028 ORG $0058 Data1 DC.B $A3 Data7 DC.B $9E ORG $002A ORG $2A42 Data2 DC.B $74 Data8 DC.B $99AC ORG $0038 Data3 DC.B $EC ORG $0000 ORG $003A LDX #$000A Data4 DC.B $EC LDAA #3 ORG $0040 LDAB #37 Data5 DC.B $AB SUM_AB ADDRESS INSTRUCTION HEX ADDRESS HEX VALUE a) $0008 STAB 48,X _0008 EA = 0009 Value stored = 000A _000B b) $0008 LDAA 40 _0008 EA = 0009 A = 000A _000B c) $0008 LDX #Data8 _0008 EA = 0009 X = 000A _000B d) $0008 TBA _0008 EA = 0009 A = 000A _000B e) $0008 LDAB Data8 _0008 EA = 0009 B = 000A _000B f) $0008 BN $EF _0008 EA = 0009 PC after this _000A instruction = 000B g) $0008 BNE $EF _0008 EA = 0009 PC after this _000A instruction = 000B 6

[14%] 5. EEPROM and SRAM Given as many 256x8 EEPROM chips and 256x8 static RAM chips as needed, design a 1024x8 memory module (with a CS) that has 512x8 of RAM at the lowest addresses and 512x8 of EEPROM at the highest addresses. The 512x8 of RAM must start at address 0 and the first address of the 512x8 of EEPROM must immediately follow the last RAM address. Add the minimum number of additional components required. Make sure the EEPROM is NEVER enabled during a write cycle and the RAM is enabled for both read and write cycles. The EEPROM and SRAM devices have active low CS and the SRAM devices have a R/W control signal. (2%) a) What is the address range for each of the memory components (in binary and in hex)? SRAM EEPROM (12%) b) Design the required memory device below. Make sure you show the memory module s inputs and outputs and all the individual memory component devices. Use labels instead of wires in the design. 7

[15%] 6. HAND Assembly The following program finds all occurrences of $37 in a table with an $FF end of table marker and replaces them with $AA. It uses the G-CPU instruction set attached to this test. Hand assemble the program in the space given. Address (Hex) Data (Hex) Program ORG $100 Table DC.B $10,$37,$CC,$37,$15 EOT DC.B $FF NEW EQU $AA OLD EQU $C8 ORG $200 STRT LDX #Table LOOP LDAB EOT COMB LDAA 0,X SUM_BA BEQ QUIT LDAA 0,X LDAB #OLD SUM_BA BNE NOSW LDAA #NEW STAA 0,X NOSW INX BNE LOOP QUIT BEQ QUIT 8

[15%] 7. GCPU Assembly Programming (Use the G-CPU instruction set attached to this test) Write an entire G-CPU program to copy all the positive values in a table called TAB1 (beginning at address $3000) to another table called TAB2 (beginning at address $7000). TAB1 has 200 1-byte values already in memory. There is a 16-KB ROM for your program, starting at address 0 and a 32-KB SRAM, starting at $4000 for data. Be sure to initialize all necessary values, variables, etc., i.e., assume no initializations are done for you. Be sure to properly terminate the program (so it does not execute past the end of your program). Use labels instead of numbers in assembly instructions wherever possible. Labels Instructions Comments 9

[12%] 8. GCPU Instruction Design (See the G-CPU Next State Table attached to this test) We want to implement a new instruction for the GCPU. The new instruction will be denoted as SBAM addr. It added the content of register B to register A (like SUM_BA). But, it also stores the result into memory at location addr. The new opcode for this instruction will be designated as $32 and the next state available in the Controller s ASM is $34. Show the additional states required to implement this new instruction in the Controller s ASM below and show all controller output signals that must be true in each new state for this new instruction: Assume: R/-W is True for Read and False for Write. Control Signals: PC_INC, PC_LD_Upper, PC_LD_Lower, MAR_INC, MAR_LD_Upper, MAR_LD_Lower, X_INC, X_LD_Upper, X_LD_Lower, Y_INC, Y_LD_Upper, Y_LD_Lower, IR_LD, R/-W, ADDR_SEL1:0, XD_LD, YD_LD Note1: The controller output signals are also shown in the G CPU Block Diagram for reference. Fill in the ASM for SBAM $addr (12 pts.): State = 000000 IR_LD = T R/-W = T 000001 Existing G CPU Instructions R/-W = T IR5:0 SBAM $addr Opcode = $32 10

GCPU Instructions 11

GCPU Block Diagram 12

Partial GCPU Next State Table 13