120 likes | 259 Views
ECE 353 Introduction to Microprocessor Systems. Review/Assessment Slides for Quiz #2. Memory Maps.
E N D
ECE 353Introduction to Microprocessor Systems Review/Assessment Slides for Quiz #2
Memory Maps • Assume that a microprocessor has a 20-bit address bus, an 8-bit data bus, and /RS, /WS control signals. Use only AND/OR/NAND/NOR gates with any number of direct or inverted inputs to implement the given memory map for the three 8-bit output ports shown below. The broadcast address area should result in a simultaneous write to all three ports. Reads should not affect the ports.
Memory Maps Continue • Given the memory map shown, determine the logic required to implement the MEMX chip-select line. Is this okay for a RAM? A ROM? • How big is the RAM? • How big is the ROM?
Quiz Review • How many bits must be included in the decoding logic to exhaustively decode a chip-select for a 128KB ROM at address E0000h? • If the decoding logic actually used two fewer bits (A19,A17 not used), what would the effect on the memory map be? • You require 64K x 8 of memory, but only have 32K x 4 devices. Show how you can interconnect them to get the desired result.
Logic Compatibility • What are the noise margins • Are these devices compatible?
Writing Code Fragment • Write a code fragment that uses a look-up table to convert the least-significant four bits of a register to its ASCII hexadecimal equivalent (0-9, A-F). Provide the complete table. Assume that the value to convert is in R0. Do not make any other assumptions about R0.
Writing Code Fragment • Write a code fragment to implement the expression shown below, but without using any branches. if(R7 is odd) then R7=R7*4 else R7=R7/4
Write a Subroutine • Write a subroutine that will efficiently convert an ASCIIZ string representing a number to its corresponding binary value in R0. The number will be in the form X_YYYY... where X is the number base (2-9) and YYYY... are the digits of the number. (This is the same form supported by the ARM assembler, i.e. 2_01100 represents the value 1210.) The string will consist of only valid characters, at least one digit, and the null terminator. (So, you do not have to check the “_” character – it will be there!) Assume that the conversion will not overflow. If you received the ASCII string “8_15” (1310), you would return 0x0000000D in R0. Do not corrupt any of the caller’s registers. Comment your code!
Short Answers • What are the relative merits of exhaustive decoding versus partial decoding?
Short Answers • Microprocessor supervisors often claim to provide brown-out protection. What is a brown-out? What does the supervisor do if it detects a brown-out, and why?
Wrapping Up • Quiz #2 will be held on 04/10/2008 from 7:15-8:30pm in 2345-EH