Lab5_Week5
Lab5_Week5
Computer Systems
Week 5
Overview
In this laboratory session we start look at memory, encoders and stacks.
Purpose: To consolidate your knowledge of Memory and Stacks
Task:
Submission Details
You must submit the following files to Canvas:
■
A document containing all required work as described below.
Computer Systems Week 5 Laboratory
Instructions
- Given 1GB (1024MB) of RAM, and that each byte in memory needs to be addressed:
Page 2 of 8
Computer Systems Week 5 Laboratory
- Fundamental difference: Von Neumann uses a single memory for both instructions and
data, while Harvard separates them. Von Neumann is simpler and more common in general-
purpose computers, while Harvard is used in specialized systems like microcontrollers.
4. What is cache memory and what is its primary role ?
Cache memory is a small, high-speed memory located close to the CPU. Its primary role is to store
frequently accessed data and instructions, reducing the time it takes for the CPU to access data from the
slower main memory (RAM). Cache is typically divided into levels (L1, L2, L3), with L1 being the fastest
and closest to the CPU.
5. Explain the concept of an interrupt, and list four common types.
- An interrupt is a signal sent to the CPU by hardware or software indicating that immediate attention is
needed. The CPU stops its current execution, handles the interrupt through an interrupt service routine
(ISR), and then resumes normal processing.
Provide all the answers to the above questions in your submission document.
10. For your shift register to work as a stack, it needs to be bi-directional. This
means the in- put to any Flip Flop could come from two places - the left or the
right. In lectures we dis- cussed a simple “encoder” circuit that selects which of
two data inputs is allowed through,
Page 4 of 8
Computer Systems Week 5 Laboratory
based on a third selection bit. Design the logic for this 2-bit encoder, and
demonstrate it to your lab demonstrator.
11. Now incorporate your encoder above to allow bi-directional shifting of your
stack. Your stack should:
11.1. push and pop bits onto and off the stack, using clock pulses and a
direction toggle switch
11.2. show the state of each Flip Flop using LEDs.
12. Modify your stack so that it has the option to read out its contents in parallel to a
sepa- rate register of D Flip Flops. This should only occur when a “stack dump”
toggle switch (i.e., pin) is enabled. When the toggle is disabled, the register of D
Flip Flops should re- tain the last state read in (and should have LEDs connected
Page 5 of 8
Computer Systems Week 5 Laboratory
to each Flip Flop out showing its state).
When complete:
■
Submit your answers (screen shots, etc) in a single document using Canvas
■
Show your lab demonstrator your working circuits in class (you must do this to
get the 1%). Your lab demonstrator may request you to resubmit if issues exist.
Page 6 of 8