ECE 449 Computer Systems Engineering Assignment 2
Write a description of how you implemented each of the following
projects, including Verilog files (use qdoc). Demonstrate the working projects to
the instructor.
- Design and implement a DE2 project that displays a timer
on the LCD display in the form mm:ss and on the left-most four
seven-segment displays (MM SS).
- Modify the diglab3
timer so that the timer starts when KEY[3] is pressed and
stops with KEY[3] is released.
- Design and implement a DE2 project that interfaces the previous
project to the PIO lines of the Nios II computer. Use one output PIO line to
start and stop the timer. Test a Nios program to start and stop the
timer and print the results to stdout. Here is a sample.
#include <stdio.h>
#include <unistd.h>
#include "system.h"
#include "altera_avalon_pio_regs.h"
void test1();
int main()
{
int i;
printf("starting program ...\n");
test1();
printf("ending program\n");
return 0;
}
void test1()
{
int inpt;
// start timer
IOWR_ALTERA_AVALON_PIO_DATA(PIO_BASE,1);
// do nothing then stop timer
IOWR_ALTERA_AVALON_PIO_DATA(PIO_BASE,0);
// read timer value and output to console
inpt = IORD_ALTERA_AVALON_PIO_DATA(PIO_BASE);
printf("empty loop test time: %d\n",inpt);
}
- Download this
source-highlighting utility, copy the relevant files to your
bin directory and use the utility to process your strgen/strlen
program. Submit the resulting html files.
- Disassemble your strgen/strlen program from the last assignment
and submit a file containing the disassembly listing.
Maintained by John Loomis,
last updated 21 January 2009