Starting from:

$30

CSCE 313 Project 5 SOLUTION

CSCE 313 Project 5 
Project Objective
In this project, we will cover three important tasks:
1. Executing image rotation on FPGA
2. Measuring system performance.
Rotation Requirements
a. Use the platform designer from Project 4, but only remove the mode component.
b. Remove the display and resize code from your application and include the rotation image
which is provided in the presentation L.7.
c. Rotate the image four times on four angles (0, 90, 180 and 270 degrees).
Performance Requirements
a. In the platform designer, add the interval timer and set its period to 100 and units to µs,
and keep any other settings as default. Connect the component with the processor and clock
sources as you connected the JTAG UART (including the interrupt IRQ signal).
b. Set the priority of the timer component as 0 and the priority of the JTAG UART as 16 as
explained in the lecture.
c. Add the system ID peripheral and keep its features as default. Connect the component to the
processor and the clock sources as you connect the JTAG UART.
d. Then, re-generate the system, recompile quartus project, and configure the board.
e. Open the application project in eclipse. Right-click on the BSP directory, go to Nios II and
select Nios II editor. Set the following features, then regenerate the BSP.
Sys_clk_timer Timestamp_timer stdin stdout stderr
Timer_0 none jtag jtag jtag
f. In the application directory, open the main (or hello_world.c) program. Add the following
header file:
#include <sys/alt_alarm.h>
CSCE 313 Project 5 Spring 2023
g. Measure the time (number of ticks) required to execute the frame time. To do that you will
need to use the code below. Also, use ticks_example posted in Module 6 as your reference.
int ticks_per_second, ticks_start, ticks_end, frame_ticks;
unsigned long long duration;
ticks_per_second = alt_ticks_per_second();
ticks_start = alt_nticks();
frame_function();
ticks_end = alt_nticks();
frame_ticks = ticks_end - ticks_start;
duration= (unsigned long long) ticks_total / (unsigned long long) ticks_per_second;
printf("Total duration %llu seconds \n\n", duration);
Project Report (70%)
The project report will be graded out of 100, and the points will be distributed as following:
1.0 (20 points total, each value is 5 points) After you compiled and synthesized your system
(without the timer), read the summary report from Quartus, and fill out the below table with the
numbers from the report.
Logical
Elements
Registers Total Pins Memory Bits
2.0 (20 points total, each value is 5 points) After you compiled and synthesized your system
(with timer), read the summary report from Quartus, and fill out the below table with the numbers
from the report.
Logical
Elements
Registers Total Pins Memory Bits
CSCE 313 Project 5 Spring 2023
3.0 (15 points) Briefly, compare the results of Table.1 and Table.2.
5.0 (5 points) Run the application project on case 2 and calculate the frame rate in seconds
and put the value in the table below. Note, 𝑓𝑟𝑎𝑚𝑒 𝑟𝑎𝑡𝑒 =
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑓𝑟𝑎𝑚𝑒𝑠
𝑓𝑟𝑎𝑚𝑒𝑡𝑖𝑚𝑒 .
Project Demo (30%)
The main purpose of the demo is to test your project functionality and execution.
Demos will be checked and graded by the TA.
Demos will be graded out of 100, but worth 20% of total project grade.
Both partners must show up in that day. If a member didn’t show up, he/she receives 0 unless
an excused absence was provided.
Demos will be conducted during the lab time on the following dates:
o Section 001: Wed. March 29th
o Section 002: Fri March 31th
o Demo dates will be decided by the groups.
Below are how the demo points will be distributed.
Tasks Point
Rotation by 0 /25
Rotation by 90 /25
Rotation by 180 /25
Rotation by 270 /25
Project Submission
1. Save the project report as r5_username1_username2.pdf.
2. For this project, you are required to submit only the project report (No project submission is
required). Submission date is Tuesday March 28
th by midnight.
3. Only one attempt is allowed.
4. Only one group member can submit the report.

More products