






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this exam paper are: Synchronous, Communication, Non-Electronic Writing, Cell Phones, Textbooks, Designing With Counters, Synchronous, Clock Edge, Labeled Output, Labeled Input
Typology: Exams
1 / 12
This page cannot be seen from the preview
Don't miss anything!







Problem # Points Score
(a) 12 points Designing with Counters. Design a divide-by-10 counter using the 4 bit counter shown below, which you can assume is incremented on a positive clock edge. The counter does not have a LOAD input, but does have a synchronous CLR input that sets the counter zero on the next positive clock edge when CLR=1. Your final circuit should have 1 labeled input (CLK) and one labeled output (CLK10).
COUNT
Q
Q
Q
Q
CLR
(b) 6 points Now repeat the above problem, only your circuit should have two out- puts: CLK10, active every 10 cycles, as in part 1 above, and CLK5, active every 5 cycles. Hint: you should be able to start with the circuit above and modify it with additional logic elements.
COUNT
Q
Q
Q
Q
CLR
(c) 16 points Building a memory system. The symbol below is for a 256x8 memory chip. Design a 1024x8 bank of memory using multiple copies of the 256x8 memory chip shown below and whatever building blocks or logic elements you need. The inputs/outputs to your circuit should be the appropriate number of ADDRESS and DATA lines, as well as MSEL (to select the entire memory system that you’ve designed) and R/W to specify a read (or write) operation. It is OK to use “bus notation” to indicate multi-line datapaths, such as address and data lines. Label all inputs and outputs to your circuit, and label all pins on chips and building blocks used. Otherwise points will be deducted. 256x 8 8
A7...A D7...D
CS
WE
Questions 3 and 4 require you to refer to the SPAM1000LE datasheet and the SPAM assembly language program test3.s. These are on the last 2 pages of your test – you may want to tear these sheets off to make it easier to refer to them, since they do NOT have to be turned in.
(b) 5 points What is the layout of the .data segment in memory before the program is run? Each row of the table below represents 4 consecutive bytes of memory, 1 byte per column. Use HEX notation, and place an X if that value of memory is not known.
0x
0x
0x
0x0040000C
0x
(c) 2 points In the program test3.s, what is register $2 used for?
(d) 2 points In the program test3.s, what is register $3 used for?
(e) 2 points In the program test3.s, what is register $4 used for?
(a) 14 points Look at the main program loop in test3.s starting at the label “loop.” Fill in the following table to show how the control logic translates the program instructions into control signals. Use an X for don’t care fields. For brevity only the corresponding instruction from test3.s is listed, not the associated operands.
Inst X Y Z regwen immen adden luen sren sten lden msel mr ¯w
lw
andi
srli
add
sw
addi
bne 0 0 0 0 0 0 0 0 X
(b) 12 points Assume that the .text (program) segment was loaded at address 0x01000000. Using the information from the SPAM1000LE datasheet, fill in the table below to show how the program instructions were loaded into memory starting at the “lw” instruction loaded at 0x01000008. Assume that unused (don’t care) bit fields were set to zero. Each row corresponds to 1 word (4 bytes) of memory, with each column corresponding to 1 byte. Use HEX notation to specify your answer.
0x01000008 lw $3,$
0x0100000C andi $4,$3,0xFFFF
0x01000010 srli $3,$3,
0x01000014 add $4,$4,$
0x01000018 sw $4,$
0x0100001C addi $2,$2,
0x01000020 bne $2,$7,loop
(c) 3 points Pseudo-instructions. The SPAM1000LE does not have an instruction for “li” (load immediate). However, it is a pseudo-instruction. Considering that you are limited by the elements in the SPAM1000LE datapath, what is an assembly language instruction that can be substituted for the pseudo-instruction:
li $4,0x042A
BLANK PAGE for extra work.