CSCE 313: Embedded Systems Final Project

Slides:



Advertisements
Similar presentations
Microcomputer Systems 1
Advertisements

Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students.
Sumitha Ajith Saicharan Bandarupalli Mahesh Borgaonkar.
The Linux Kernel: Memory Management
CSCE 313: Embedded Systems Scaling Multiprocessors Instructor: Jason D. Bakos.
CSCE 313: Embedded Systems Performance Counters Instructor: Jason D. Bakos.
Characterization Presentation Neural Network Implementation On FPGA Supervisor: Chen Koren Maria Nemets Maxim Zavodchik
CSCE 313: Embedded Systems Video Out and Image Transformation Instructor: Jason D. Bakos.
Computer Hardware What goes on inside?. Deeper.
Floating Point Numbers
CSCE 313: Embedded Systems Multiprocessor Systems
Lab 2: Capturing and Displaying Digital Image
CSCE 313: Embedded Systems Final Project Instructor: Jason D. Bakos.
Project Goals 1.Get to know Quartus SoPC builder environment 2.Stream 2.Stream Video 3.Build 3.Build foundation for part B - Tracking system.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Shawlands Academy Higher Computing Data Representation.
ECEG-3202: Computer Architecture and Organization, Dept of ECE, AAU 1 Floating-Point Arithmetic Operations.
8-1 Embedded Systems Fixed-Point Math and Other Optimizations.
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Part A Final Dor Obstbaum Kami Elbaz Advisor: Moshe Porian August 2012 FPGA S ETTING U SING F LASH.
Number Systems Part 2. Counting in Binary DecimalBinary
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
973cs111_add_posneg.ppt Integers Whole numbers Do NOT contain decimal points (as in money) 43,689 is an integer 43, is NOT an integer (it is floating.
MATH Lesson 2 Binary arithmetic.
Lesson Objectives Aims You should know about: Binary numbers ‘n’ that.
Floating Point Representations
Lecture 6. Fixed and Floating Point Numbers
Department of Computer Science Georgia State University
Secure Coding Rules for C++ Copyright © 2016 Curt Hill
Lab 4 HW/SW Compression and Decompression of Captured Image
Lec 3: Data Representation
The Machine Model Memory
CSCE 313: Embedded Systems Final Project Notes
Computer Architecture & Operations I
Computer Science 210 Computer Organization
Instructor: David Ferry
CS 232: Computer Architecture II
COSC 3330/6308 First Review Session
The Hardware/Software Interface CSE351 Winter 2013
Understand Computer Storage and Data Types
COMPUTER 2430 Object Oriented Programming and Data Structures I
Secure Coding Rules for C++ Copyright © Curt Hill
Progress Report Chester Liu 2013/11/29.
Lecture 10: Floating Point, Digital Design
Floating Point Math, Fixed-Point Math and Other Optimizations
Computer Science 210 Computer Organization
Ken D. Nguyen Department of Computer Science Georgia State University
Shift registers and Floating Point Numbers
EE 445S Real-Time Digital Signal Processing Lab Spring 2014
Data Representation Bits
Module 2: Computer-System Structures
CH 9.2 : Hash Tables Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and.
Low cost FPGA implimentation of tracking system from USB to VGA
1 The Hardware/Software Interface CSE351 Spring 2011 Module 3: Integers Monday, April 4, 2011.
CH 9.2 : Hash Tables Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and.
Storing Negative Integers
Lecture 2 SCOPE – Local and Global variables
COMPUTER 2430 Object Oriented Programming and Data Structures I
Operations and Arithmetic
Paging Memory Relocation and Fragmentation Paging
Ken D. Nguyen Department of Computer Science Georgia State University
Module 2: Computer-System Structures
Computer Systems Nat 4/5 Computing Science Data Representation
Module 2: Computer-System Structures
COMP755 Advanced Operating Systems
ADSP 21065L.
CSCE 313: Embedded Systems Scaling Multiprocessors
CSCE 313: Embedded Systems Performance Analysis and Tuning
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

CSCE 313: Embedded Systems Final Project Instructor: Jason D. Bakos

Final Project Objective: Use fixed-point representation for: Begin with Lab 5 Convert all floating-point computations to fixed-point Increase resolution to 1024 x 768 Use fixed-point representation for: z c min_x, max_x, min_y, max_y x2+y2 (for checking for divergence)

Final Project Both partners must demo their group’s final project Each group must still submit code, designs, and report on Dropbox Perform demo by May 3 Until and including April 28, schedule with me

Fixed-Point Review Recall: fixed-point has fixed range Recall: Range of non-fixed-point n-bit integer: -2n-1 <= val <= 2n-1-1 Range of signed (n,m) value: -2n-m-1 <= val <= 2n-m-1 – 2-m Need to decide where to set decimal point For c, [min|max]_[x|y]: Need to represent values from -2 to 2 z should cover the worst case for a diverged pixel x2+y2 should cover the worst case for the r2 of a diverged pixel

Worst Case Analysis z z2 c P(z) x2+y2 LH bits (0,2) (4,0) (2,2) (6,2) (1.4,1.4) (2,0) z z2 c P(z) x2+y2 LH bits (0,2) (4,0) (2,2) (6,2) 40 6 (2,0) (1.4,1.4) (0,3.9) (2,5.9) 38.8

Range and Precision Problem: Multiply (32,n) val with (32,m) val => (64,n+m) val Need a way to get 64-bit product, or we lose the upper 32 bits

Multiply Assume 4-bit registers, need 8 bit product: 10 11 x A1 A0 B1 11 10 B0 = 11 14 154 0000 A0*B0 (4b) 3*2=6 + 00 A0*B1 (4b) 00 3*3=9 -> 9*4=36 = + 00 A1*B0 (4b) 00 2*2=4 -> 4*4=16 + A1*B1 (4b) 0000 2*3=6 -> 6*16=96 154

Example Fixed Point Multiply Multiply A = (32,n) val and B = (32,n) val, need C = (32,n) product: Declare A and B as “long” Declare C as “long long” Cast A and B as “long long”, C = (long long)A * (long long)B; Convert C from (64,2*n) to (32,n): Shift C n bits to the right Return C as int

High Resolution Goal: Increase resolution from 320x240 to 1024x768 Problems: Native resolution of VGA Controller is 640x480, so hardware modification is needed SRAM is only 512 KB, not large enough to store a higher resolution frame, so we need to move pixel buffer to SDRAM

Hardware Modification Remove SRAM interface, connect DMA controller master interface directly to SDRAM Remove rescaler (no longer needed) Change DMA controller settings to 1024x768 Each time you generate in SOPC Builder, must make edits to two generated Verilog files

Hardware Modification VGA_Controller_0.v, line 78 (after each generation): parameter CW = 9; parameter DW = 29; parameter R_UI = 29; parameter R_LI = 20; parameter G_UI = 19; parameter G_LI = 10; parameter B_UI = 9; parameter B_LI = 0; /* Number of pixels */ parameter H_ACTIVE = 640; parameter H_FRONT_PORCH = 16; parameter H_SYNC = 96; parameter H_BACK_PORCH = 48; parameter H_TOTAL = 800; /* Number of lines */ parameter V_ACTIVE = 480; parameter V_FRONT_PORCH = 10; parameter V_SYNC = 2; parameter V_BACK_PORCH = 33; parameter V_TOTAL = 525; parameter NUMBER_OF_BITS_FOR_LINES = 10; parameter LINE_COUNTER_INCREMENT = 10'h001; parameter NUMBER_OF_BITS_FOR_PIXELS = 10; parameter PIXEL_COUNTER_INCREMENT = 10'h001; parameter CW = 9; parameter DW = 29; parameter R_UI = 29; parameter R_LI = 20; parameter G_UI = 19; parameter G_LI = 10; parameter B_UI = 9; parameter B_LI = 0; /* Number of pixels */ parameter H_ACTIVE = 1024; parameter H_FRONT_PORCH = 24; parameter H_SYNC = 136; parameter H_BACK_PORCH = 160; parameter H_TOTAL = 1344; /* Number of lines */ parameter V_ACTIVE = 768; parameter V_FRONT_PORCH = 3; parameter V_SYNC = 6; parameter V_BACK_PORCH = 29; parameter V_TOTAL = 806; parameter NUMBER_OF_BITS_FOR_LINES = 11; parameter LINE_COUNTER_INCREMENT = 11'h001; parameter NUMBER_OF_BITS_FOR_PIXELS = 11; parameter PIXEL_COUNTER_INCREMENT = 11'h001;

Hardware Modification clocks_0.v, line 69 (after each generation): parameter SYS_CLK_MULT = 1; Change to: parameter SYS_CLK_MULT = 2; Line 174: DE_Clock_Generator_System.clk2_divide_by = 2, DE_Clock_Generator_System.clk2_duty_cycle = 50, DE_Clock_Generator_System.clk2_multiply_by = 1, DE_Clock_Generator_System.clk2_divide_by = 7, DE_Clock_Generator_System.clk2_multiply_by = 9,

Software Modification New pixel buffer requires 1024x768x3 = 2359296 bytes Allocate in the last (highest-addressed) memory: DE2 has 8MB, allocate at address DRAM_BASE + 8 x 220 - 2359296 = DRAM_BASE + 0x5C0000 Leaves only 6029312 bytes for the CPUs, so allocate 1.25 MB (0x140000) to each CPU DE2-115 has 128 MB, allocated at address DRAM_BASE + 128 x 220 - 2359296 = DRAM_BASE + 0x7DC0000

More Tips Avoid divide: add a fixed-point constant for (1/768) and (1/1024) and multiply these In Quartus, create a new file called lights.sdc with the following contents and add it to your project: create_clock CLOCK_50 -period 20 derive_pll_clocks -create_base_clocks