Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 15: SystemC (3/3) Prof. Sherief Reda Division of.

Slides:



Advertisements
Similar presentations
C Language.
Advertisements

Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 06: Verilog (2/3) Prof. Sherief Reda Division of.
Simulation executable (simv)
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 07: Verilog (3/3) Prof. Sherief Reda Division of.
S. Reda EN2911X FALL’07 Reconfigurable Computing (EN2911X) Lecture 01: Introduction Prof. Sherief Reda Division of Engineering, Brown University Spring.
COSC 120 Computer Programming
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 3: Primitive Data Types.
C Programming Basics Lecture 5 Engineering H192 Winter 2005 Lecture 05
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 17: Application-Driven Hardware Acceleration (3/4)
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 08: RC Principles: Software (1/4) Prof. Sherief Reda.
Reconfigurable Computing (EN2911X, Fall07)
Introduction to C Programming Overview of C Hello World program Unix environment C programming basics.
Altera’s Quartus II Installation, usage and tutorials Gopi Tummala Lab/Office Hours : Friday 2:00 PM to.
COMP2004 Programming Practice Sam Holden Department of Computer Science University of Sydney.
Reconfigurable Computing (EN2911X, Fall07) Lecture 05: Verilog (1/3) Prof. Sherief Reda Division of Engineering, Brown University
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lab 2 presentations Prof. Sherief Reda Division of Engineering,
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 14: SystemC (2/3) Prof. Sherief Reda Division of.
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 13: SystemC (1/3) Prof. Sherief Reda Division of.
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Prof. amr Goneid, AUC1 CSCE 110 PROGRAMMING FUNDAMENTALS WITH C++ Prof. Amr Goneid AUC Part 10. Pointers & Dynamic Data Structures.
1 3-Software Design Basics in Embedded Systems. 2 Development Environment Development processor  The processor on which we write and debug our programs.
Lecture #3 Page 1 ECE 4110– Sequential Logic Design Lecture #3 Agenda 1.FPGA's 2.Lab Setup Announcements 1.No Class Monday, Labor Day Holiday 2.HW#2 assigned.
CSC Java Programming, Fall, 2008 Week 2: Java Data Types, Control Constructs, and their C++ counterparts, September 4.
Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer.
Engineering Computing I Chapter 1 – Part A A Tutorial Introduction.
Practice 1 Seoul National University Graphics & Media Lab.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 12: Pointers continued, C strings.
/* Documentations */ Pre process / Linking statements Global declarations; main( ) { Local Declarations; Program statements / Executable statements; }
Lecture #5 Introduction to C++
Array Synthesis in SystemC Hardware Compilation Authors: J. Ditmar and S. McKeever Oxford University Computing Laboratory, UK Conference: Field Programmable.
ASIC 121: Practical VHDL Digital Design for FPGAs Tutorial 1 September 27, 2006.
1 Very Large Scale Integration II - VLSI II SystemC Gürer Özbek ITU VLSI Laboratories Istanbul Technical University.
Lecture #3 Page 1 ECE 4110–5110 Digital System Design Lecture #3 Agenda 1.FPGA's 2.Lab Setup Announcements 1.HW#2 assigned Due.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics Lecture 5.
C++ / G4MICE Course Session 2 Basic C++ types. Control and Looping Functions in C Function/method signatures and scope.
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
Lecture – Pointers1 C++ Pointers Joseph Spring/Bob Dickerson School of Computer Science Operating Systems and Computer Networks Based on notes by Bob Dickerson.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
 Seattle Pacific University EE Logic System DesignAlteraBoard-2 Altera Cyclone II (484 Pin BGA) 22 Pins.
Teaching Digital Logic courses with Altera Technology
CH.3 Floating Point Hardware and Algorithms 2/18/
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
C++ Basics Programming. COMP104 Lecture 5 / Slide 2 Introduction to C++ l C is a programming language developed in the 1970s with the UNIX operating system.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 11: Pointers.
CprE 281: Verilog Tutorial Ben Magstadt – Master’s Student Electrical Engineering.
Chad’s C++ Tutorial Demo Outline. 1. What is C++? C++ is an object-oriented programming (OOP) language that is viewed by many as the best language for.
1 Lecture # 2. * Introducing Programming with an Example * Identifiers, Variables, and Constants * Primitive Data Types * Byte, short, int, long, float,
Introduction to Algorithmic Processes CMPSC 201C Fall 2000.
INTRODUCTION TO PROGRAMING System Development Mansoura October 2015.
Java Programming Language Lecture27- An Introduction.
Data Storage So far variables have been able to store only one value at a time. What do you do if you have many similar values that all need to be stored?
Introduction to the FPGA and Labs
Introduction to Vivado
Lab 1: Using NIOS II processor for code execution on FPGA
Floating Point Hardware and Algorithms
Engineering Problem Solving with C++ An Object Based Approach
Engineering Problem Solving with C++ An Object Based Approach
THE ECE 554 XILINX DESIGN PROCESS
Design of Digital Circuits Lab 5 Supplement: Implementing an ALU
THE ECE 554 XILINX DESIGN PROCESS
Reconfigurable Computing (EN2911X)
Reconfigurable Computing (EN2911X, Fall07)
Reconfigurable Computing (EN2911X, Fall07)
Reconfigurable Computing (EN2911X)
Reconfigurable Computing (EN2911X, Fall07)
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 15: SystemC (3/3) Prof. Sherief Reda Division of Engineering, Brown University

Reconfigurable Computing S. Reda, Brown University Integer data types Supported native C++ synthesizable data types –long long (64 bits) –long (32 bits) –int (32 bits) –short (16 bits) –char (8 bits) –bool (1 bit) SystemC also allows further refined storage types –sc_bit –sc_bv –sc_int –sc_uint –sc_bigint –sc_biguint

Reconfigurable Computing S. Reda, Brown University Floating-point data types Full supported for compilation with VisualC++ and systemC library Supported for synthesis by Celoxica’s Agility compiler only if they can be evaluated during compilation time → Any calculation involving float point must evaluate to a constant sc_int SinTable [128]; for(int i=0; i < 128; i++ ) { double index=(double) i; double angle=2.0*PI*(index/128.0); double sineangle=sin(angle); SineTable[i]=sc_uint (sineangle* ); } Synthesizable example Not synthesizable example sc_in in; float x; X=in.read();

Reconfigurable Computing S. Reda, Brown University Arrays Full supported for compilation with VisualC++ and systemC library For synthesis with Agility compiler, an array is synthesizable if its elements are of a synthesizable type and its size is compile-time determinable int temp, array[100]; sc_in in; For(int y=0; y < 100; y++) { in.read(temp); array[y]=temp; wait(); } Synthesizable example #include float l[10]; for(int y=0; y<10; y++) l[y]=log10((y+1)*10); //… sc_out out; for(int y=0; y < 10; y++) out.write((int)l[y]); Although the array is not synthesizable, the members are only used during compilation time and are cat to type int

Reconfigurable Computing S. Reda, Brown University Pointers Full supported for compilation with VisualC++ and systemC library Agility supports pointers subject to the restriction that Agility can always determine the target of the pointer A pointer is synthesizable if it is a pointer to a synthesizable type, and the value to which the pointer points is compile-time determinable void clear(char *a, char *b) { *a=255; *b=255; } sc_out out; unsigned char x, y; clear(&x, &y); out.write(x); } Resolvable pointer

Reconfigurable Computing S. Reda, Brown University Other considerations for synthesis Full supported for compilation with VisualC++ and systemC library Operator new is supported at compiler time but not at runtime. delete operator is not supported Each action in a switch must have a break statement. Fall through is not allowed If a function to be synthesized, its body must only contain code that within Agility synthesizable subset General recursion is not supported for synthesis

Reconfigurable Computing S. Reda, Brown University Example using synthesis and compilation flow Rest of code (testbenches, SW code) Synthesizable subset Celoxica agility synthesizer Quartus II Verilog/edif Visual C++ SystemC library executable

Reconfigurable Computing S. Reda, Brown University Celoxica’s Agility compiler tutorial

Reconfigurable Computing S. Reda, Brown University Starting adding files to your project

Reconfigurable Computing S. Reda, Brown University Adjust the project settings to use the Cyclone II devices

Reconfigurable Computing S. Reda, Brown University Add your file and write your class declaration

Reconfigurable Computing S. Reda, Brown University Add the main synthesis entry point Not the most direct implementation

Reconfigurable Computing S. Reda, Brown University Build your project

Reconfigurable Computing S. Reda, Brown University Check the CDFG and Verilog output

Reconfigurable Computing S. Reda, Brown University Copy the Verilog file into Quartus II Sometimes the Celoxica compiler changes the name of input/output outputs when it exports to Verilog so make sure to fix this in Quartus II assignment editor Then build and download to the FPGA

Reconfigurable Computing S. Reda, Brown University What if we want to verify and simulate before downloading to the FPGA? Choose Visual C++ Add a tester.h for tester module testerorgate KEY[0] KEY[1] LEDG clk

Reconfigurable Computing S. Reda, Brown University Add the main body

Reconfigurable Computing S. Reda, Brown University Hit Build and then run the executable Build indirectly invokes the command line compiler of VC (cl) which links your compiled code with SystemC.lib

Reconfigurable Computing S. Reda, Brown University If you like to synthesis again, make sure to mark the files you want to synthesize Exclude tester.h and orgate_exe.cpp Choose Verilog as your desired output again

Reconfigurable Computing S. Reda, Brown University HW/Lab 3 Objective: Learn SystemC using both the synthesis and compilation flows. This time it is a simple example. We will design an 8-bit ALU. Use the 18 switches in the DE2 board to achieve your target: –8 switches give the binary of the first unsigned integer –8 switches give the binary of the second unsigned integer –2 switches give the ALU operation (addition, subtraction, multiplication and XORING) In your report, make sure to include the SystemC code, the executable output print of simulations, and the FPGA resource utilization. You have to send me by your projects archived for both the SystemC design and the Quartus II files Lab due before Thanksgiving holiday (Thur 22 nd ) Tutorials and Celoxica manual uploaded at the class webpage and also available to download from Engineering website