Microprocessors Lab 1: Memory Introduction and Bubble Sort Program - Prof. Arlen Planting, Lab Reports of Microprocessors

A lab guide for ece 332l microprocessors course, focusing on memory concepts and a bubble sort program. Students are required to read specific chapters from n2prh and q2h documents, complete pre-lab tasks, and write a program to sort a sequence of numbers in memory. Deliverables include a bubble sort routine and a text file with sorted values.

Typology: Lab Reports

Pre 2010

Uploaded on 09/17/2009

koofers-user-otx
koofers-user-otx 🇺🇸

4

(1)

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE 332L
Microprocessors Lab Lab 1
Spring 2008
Memory
Page 1 of 2
C:\arlen\ee332\labs_2008\Lab1\docs\Lab1_cove r.doc
Objective:
The purpose of this lab is to introduce you to memory. Memory is the most important
device in any computer system. Since our programs and data must reside in memory, a good
understanding of how memory is connected to the microprocessor should come before learning to
write code. Unfortunately this requires covering a lot of material quickly. Below is a list of reading
materials that you need to review before you actually start the laboratory material. You are provided
pre-lab material to assist you in this process. You should start by locating and quickly reviewing the
reading materials listed so that you know where more information can be found on a given topic.
Then proceed to the pre-lab material and refer back to listed documents when questions arise.
Pre-Lab: Complete the following reading and attached pre-lab before coming to lab next week
Reading from N2PRH - n2cpu_nii5v1.pdf
Chapter 1. Introduction
Chapter 2. Processor Architecture
All sections excluding “Exception and Interrupt Controller”
Chapter 3. Programming Model
Introduction
General-Purpose Registers
Memory and Peripheral Access
Processor Reset State
Instruction Set Categories
Chapter 8. Instruction Set Reference
Reading from Q2H - n2cpu_nii5v3.pdf
Chapter 1. SDRAM Controller Core
qts_qii54006.pdf
On-chip RAM and ROM
Using as The GNU Assembler
http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_chapter/as_toc.html
Assembler Directives
http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_chapter/as_7.html
Lab1_prelab tutorial (attached)
Resources:
1ab1.sof, lab1.ptf
Altera DE2 Development Board
Altera Debug Client (Quartus II Programmer)
Deliverables: Bubble Sort
(Due at the beginning of lab 2 Feb 5.)
Write a program that will sort a sequence of numbers located consecutively in memory. The
first number should be a count of the numbers to follow. Each number should be 32 bits in
size. This sequence of numbers should be pointed to by a variable in memory that contains
the address in memory where the numbers are located. Consider the code below.
pf2

Partial preview of the text

Download Microprocessors Lab 1: Memory Introduction and Bubble Sort Program - Prof. Arlen Planting and more Lab Reports Microprocessors in PDF only on Docsity!

ECE 332L Microprocessors Lab Lab 1

Spring 2008 Memory

Page 1 of 2

C:\arlen\ee332\labs_2008\Lab1\docs\Lab1_cover.doc

Objective: The purpose of this lab is to introduce you to memory. Memory is the most important device in any computer system. Since our programs and data must reside in memory, a good understanding of how memory is connected to the microprocessor should come before learning to write code. Unfortunately this requires covering a lot of material quickly. Below is a list of reading materials that you need to review before you actually start the laboratory material. You are provided pre-lab material to assist you in this process. You should start by locating and quickly reviewing the reading materials listed so that you know where more information can be found on a given topic. Then proceed to the pre-lab material and refer back to listed documents when questions arise.

Pre-Lab: Complete the following reading and attached pre-lab before coming to lab next week

Reading from N2PRH - n2cpu_nii5v1.pdf Chapter 1. Introduction Chapter 2. Processor Architecture All sections excluding “Exception and Interrupt Controller” Chapter 3. Programming Model Introduction General-Purpose Registers Memory and Peripheral Access Processor Reset State Instruction Set Categories Chapter 8. Instruction Set Reference

Reading from Q2H - n2cpu_nii5v3.pdf Chapter 1. SDRAM Controller Core

qts_qii54006.pdf On-chip RAM and ROM

Using as The GNU Assembler http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_chapter/as_toc.html

Assembler Directives http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_chapter/as_7.html

Lab1_prelab tutorial (attached)

Resources:

1ab1.sof, lab1.ptf Altera DE2 Development Board Altera Debug Client (Quartus II Programmer)

Deliverables: Bubble Sort (Due at the beginning of lab 2 Feb 5.)

Write a program that will sort a sequence of numbers located consecutively in memory. The

first number should be a count of the numbers to follow. Each number should be 32 bits in

size. This sequence of numbers should be pointed to by a variable in memory that contains

the address in memory where the numbers are located. Consider the code below.

ECE 332L Microprocessors Lab Lab 1

Spring 2008 Memory

Page 2 of 2

C:\arlen\ee332\labs_2008\Lab1\docs\Lab1_cover.doc

TABLE_PTR: .word TABLE

TABLE: .word (TABLE_END-.-4)/

.word 3,2,7,9,

TABLE_END:

When you have completed testing with the above method, create a text file with .csv

extension where the values are separated by commas. Then utilizing the “Load File Into

Memory …” feature provided by Altera Debug Client, load the data into memory locations

starting at hex address 0x1000. Then change the value of TABLE_PTR to point at this new

table of values and run your sort routine against these new values.

You will be supplied a table of values to sort when you demonstrate your routine in lab.