Design Lab with SystemC

Slides:



Advertisements
Similar presentations
Xilinx 6.3 Tutorial Integrated Software Environment (ISE) Set up basic environment Select Gates or Modules to Be simulated (Insert Program Code) Run Waveform.
Advertisements

Hub The Only Co-Simulation Tool of Its Kind on the Market The Only Co-Simulation Tool of Its Kind on the Market.
Introduction to HT-IDE3000 Micro-C development System Department.
Simulation executable (simv)
A NoC Generation and Evaluation Framework
Altera’s Quartus II Installation, usage and tutorials Gopi Tummala Lab/Office Hours : Friday 2:00 PM to.
Platforms, installation, configuration; accessing example collections Course material prepared by Greenstone Digital Library Project University of Waikato,
NDT Tools Tutorial: How-To setup your own NDT server Rich Carlson Summer 04 Joint Tech July 19, 2004.
Software Installation The full set of lecture notes of this Geant4 Course is available at
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Spring 2014 SILICON VALLEY UNIVERSITY CONFIDENTIAL 1 Introduction to Embedded Systems Dr. Jerry Shiao, Silicon Valley University.
Guest Lecture by Ben Magstadt CprE 281: Digital Logic.
Simulink ® Interface Course 13 Active-HDL Interfaces.
Using Mathematica for modeling, simulation and property checking of hardware systems Ghiath AL SAMMANE VDS group : Verification & Modeling of Digital systems.
Lecture 8. Profiling - for Performance Analysis - Prof. Taeweon Suh Computer Science Education Korea University COM503 Parallel Computer Architecture &
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
The Layered Protocol Wrappers 1 Florian Braun, Henry Fu The Layered Protocol Wrappers: A Solution to Streamline Networking Functions to Process ATM Cells,
Simulink ® Interface Course 13 Active-HDL Interfaces.
L16 – Testbenches for state machines. VHDL Language Elements  More examples HDL coding of class examples Testbench for example  Testing of examples.
SoC Verification HW #2 TA: Wei-Ting Tu Assignment: 04/12/06
HDL Bencher FPGA Design Workshop. For Academic Use Only Presentation Name 2 Objectives After completing this module, you will be able to:  Describe the.
1 Freeha Azmat Saba Zia Dec 02, Agenda Installation Introduction From Verilog to SystemC Counter as an Example Complete SystemC Modeling 2.
Active-HDL Interfaces Debugging C Code Course 10.
Active-HDL Interfaces Building VHPI Applications C Compilation Course 9.
Interfaces to External EDA Tools Debussy Denali SWIFT™ Course 12.
My Second FPGA for Altera DE2-115 Board 數位電路實驗 TA: 吳柏辰 Author: Trumen.
OMNeT++.
Fall 08, Oct 31ELEC Lecture 8 (Updated) 1 Lecture 8: Design, Simulation Synthesis and Test Tools ELEC 2200: Digital Logic Circuits Nitin Yogi
Advanced BioPSE NCRR How to Install and Configure J. Davison de St. Germain Chief Software Engineer SCI Institute December 2003 J. Davison.
Setting up Cygwin Computer Organization I 1 May 2010 ©2010 McQuain Cygwin: getting the setup tool Free, almost complete UNIX environment emulation.
HW/SW Co-design Lecture 2: Lab Environment Setup Course material designed by Professor Yarsun Hsu, EE Dept, NTHU RA: Yi-Chiun Fang, EE Dept, NTHU.
Introductory project. Development systems Design Entry –Foundation ISE –Third party tools Mentor Graphics: FPGA Advantage Celoxica: DK Design Suite Design.
Lab 2 Parallel processing using NIOS II processors
Hardware languages "Programming"-language for modelling of (digital) hardware 1 Two main languages: VHDL (Very High Speed Integrated Circuit Hardware Description.
Byoung-Jo CHOI Fall 2007 SW Project II Advanced Linux Programming.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Teaching Digital Logic courses with Altera Technology
Cygwin Tutorial 1. What is Cygwin? Cygwin offers a UNIX like environment on top of MS-Windows. Gives the ability to use familiar UNIX tools without losing.
CprE 281: Verilog Tutorial Ben Magstadt – Master’s Student Electrical Engineering.
ECE 544 Software Project 1 Kuo-Chun Huang (KC). Environment Linux (Ubuntu or others) Windows with Cygwin
 CSC 215 : Procedural Programming with C C Compilers.
1 Introduction to Engineering Spring 2007 Lecture 18: Digital Tools 2.
Cygwin: getting the setup tool
VLSI Synthesis and Simulation Tools Nitin Yogi 01/09/2009
CSC 215 : Procedural Programming with C
DE2-115 Control Panel - Part I
EECE6017C - Lab 0 Introduction to Altera tools and Basic Digital Logic
Lab 1: Using NIOS II processor for code execution on FPGA
My Second FPGA for Altera DE2-115 Board
LCG Generator Services project
J. Michael, M. Shing M. Miklaski, J. Babbitt Naval Postgraduate School
Chapter 2 Setup.
Getting Started with Programmable Logic
Design Flow System Level
Introduction to Verilog
Developing More Advanced Testbenches
Logic Analyzers EECS150 Fall Lab Lecture #5 Arjun Singh
Software Installation
Test Fixture (Testbench)
Founded in Silicon Valley in 1984
Download and Installation of code::blocks
Cygwin Tutorial 1.
Cygwin Tutorial 1.
THE ECE 554 XILINX DESIGN PROCESS
Logic Analyzers EECS150 Fall Lab Lecture #5 Arjun Singh
Software Installation, release 4.0
Cygwin: getting the setup tool
Sequntial-Circuit Building Blocks
THE ECE 554 XILINX DESIGN PROCESS
Presentation transcript:

Design Lab with SystemC 4541.633A SoC Design Automation School of EECS Seoul National University

Outline How to Download SystemC How to Install SystemC Download procedure OSCI homepage How to Install SystemC System Requirements Cygwin installation SystemC Installation notes Directory tree Running an example Useful SystemC Tools Simulation tools Debugging tools Examples Simple Counter DCT

How to Download SystemC Download procedure SystemC download website Visit OSCI home page: http://www.systemc.org About SystemC  Download (OSCI standards) Download what you want We assume Cygwin (Windows) for the OS throughout this lecture. Core SystemC language and examples ‘systemc-2.2.0.tgz’ You may need a registration for download.

How to Download SystemC OSCI homepage

How to Install SystemC System requirements For SystemC release 2.2.0 UNIX platform Sun Solaris Linux HP_UX Windows platform Windows NT with Visual C++ 6.0 Cygwin

SystemC Installation with Windows Cygwin Cygwin installation Cygwin is a UNIX environment, developed by RedHat, for windows. Installation guide Cygwin home page  http://www.cygwin.com Click 'Install or update now!' Run ‘setup.exe’ to get Cygwin packages Select “install from internet” Select install directory and local package directory Select “direct connection” Select your preferred ftp site Change ‘ALL@default’ to ‘ALL@install’ ‘C:\cygwin’ will be the installation directory

SystemC installation notes How to Install SystemC SystemC installation notes Uncompress the ‘systemc-2.2.0.tgz’ file on your working dir. - We assume current working directory is ‘/home/userid/works’ tar zxvf systemc-2.2.0.tgz Change to the top level directory (systemc-2.2.0) cd systemc-2.2.0 Create a installation directory and change to that directory, e.g., mkdir build cd build Configure the package for your system ../configure –prefix=/home/userid/works/systemc-2.2.0/build It will automatically generate the Makefile Compile the package > make (or gmake) Install the package > make install (or gmake install)

Directory tree systemc-2.2.0/ config/ docs/ examples/ msvc60/ src/ How to Install SystemC Directory tree systemc-2.2.0/ config/ docs/ examples/ msvc60/ src/ build/ include/ lib-cygwin/ Install directory that contains ‘systemc.h’ header file and ‘libsystemc.a’ system-dependent library file

How to Install SystemC Running an example Move to the directory for pipe example (e.g. systemc-2.2.0/examples/pipe/ ) > cd ./examples/sysc/pipe/ Read the brief description of the example in the ‘README’ file Build the example using make > make check

How to Install SystemC Run the executable ./pipe

GTKWave: electronic waveform viewer Useful SystemC Tools Useful SystemC Tools GTKWave: electronic waveform viewer Viewer for waveforms in [VCD/EVCD/LXT/Synopsys] output format Built using the GTK+ toolkit GTKWave home page http://www.cs.manchester.ac.uk/apt/projects/tools/gtkwave GTKWave installation with Cygwin Get ‘gtkwave-1.3.19-setup.exe’ from ftp://ftp.cs.man.ac.uk/pub/amulet/gtkwave/1.3/ Run ‘gtkwave-1.3.19-setup.exe’, which is self-extracting installation program Make a symbolic link as follows ln –s /cygdrive/c/Program\ Files/GTKWave\ 1.3.19/winwave.exe /usr/local/bin/gtkwave

Useful SystemC Tools ModelSim 6.2 Unified kernel for Verilog, VHDL, and SystemC for a true mixed-language environment Requires optional product add-on to ModelSim 6.2 SE/LE An additional license is required Download website http://www.model.com/downloads/default.asp

Debugging tools GDB INSIGHT DDD GNU source-level debugger Useful SystemC Tools Debugging tools GDB GNU source-level debugger http://www.gnu.org/software/gdb/ INSIGHT Graphical user interface to GDB http://sources.redhat.com/insight/ DDD Data display debugger http://www.gnu.org/software/ddd/

Examples Simple Counter Environment Function SystemC-2.2.0 Cygwin with gcc compiler GTKWave waveform viewer Function Count from ‘0’ to ‘255’ Reset signal set cntvalue[7:0] signal to ‘0x00’ If count it up to ‘255’, overflow signal is set to ‘1’.

Simple counter block diagram Examples Simple counter block diagram testbench count reset overflow cntvalue[7:0] clk clk clock

Counter module: counter.h Examples Counter module: counter.h in/out ports process function data member process registration sensitivity list initialization

Counter module: counter.cpp Examples Counter module: counter.cpp reset behavior Increase the ‘local_cntvalue’ on clock rising edge overflow detect ‘local_cntvalue’ to cntvalue port

Examples Testbench module

Top level 10 ns module instantiation & pin connection Examples Top level 10 ns module instantiation & pin connection trace file (wave.vcd) generation SystemC simulation start for ‘simul_time’

Examples Makefile

Examples Compilation make

Simulation reset  restart the count Examples Simulation reset  restart the count overflow  set overflow signal & restart the count

Waveform ‘wave.vcd’ file is generated after executing the ‘run.x’. Examples Waveform ‘wave.vcd’ file is generated after executing the ‘run.x’.

Append the signal names to waveform list Examples Append the signal names to waveform list

Examples Simulated waveform

Examples Reset test

Examples Overflow test

Algorithm level DCT simulation Examples Algorithm level DCT simulation Functional block diagram Data Gen function (for input data setup) FDCT function ‘sample1’ ‘result’ fdct(in, out) Implemented in C code

FDCT source code in C ‘fdct_ref.c’ from MPEG Software Simulation Group Examples FDCT source code in C ‘fdct_ref.c’ from MPEG Software Simulation Group Forward DCT  8x8 matrix of 16-bit data value

Input/output of ‘fdct’ function Input: ‘sample1’ Output: ‘result’ Examples Input/output of ‘fdct’ function Input: ‘sample1’ Output: ‘result’

Timed level DCT simulation Examples Timed level DCT simulation Top level block diagram f_in[64] f_out[64] DataGen Module FDCT Module Sink Module request ready valid ack clock

Assignment These files are given from presentation. Examples Assignment These files are given from presentation. header files data_gen_sc.h sink_sc.h c++ files data_gen_sc.cpp sink_sc.cpp main.cpp Make file Makefile Sample file sample1 You can make your own fdct module. header file fdct_sc.h c++ file fdct_sc.cpp

DataGen Module data_gen_sc.h 64 parallel output port Examples DataGen Module data_gen_sc.h 64 parallel output port ports for handshake text file pointer for read data set file pointer to ‘sample1’ text file read and send data to fdct module & synchronize

Examples data_gen_sc.cpp Data_gen_module::set_input(char*)

Data_gen_module::do_gen() Examples Data_gen_module::do_gen()

fdct module & synchronize Examples Sink module sink_sc.h 64 parallel in port ports for handshake read data from fdct module & synchronize

Examples sink_sc.cpp

Examples Top module main.cpp

This file is same with ‘exmple1’ Examples Makefile & sample1 files This file is same with ‘exmple1’

void init_fdct(void); Examples FDCT module (HW) Now, you can make your own FDCT module. FDCT Module f_in[64] f_out[64] member variables double c[8][8]; double tmp[64]; in[64] out[64] f_req f_rdy req rdy member function void init_fdct(void); f_vld f_ack ack vld process function void do_fdct(void); clk

::init_fdct() ::do_fdct() Examples ::init_fdct() You can use the same behavior code that is used at algorithm level simulation ::do_fdct() 1. call init_fdct();  To initialize coefficient (c[8][8]) 2. send request to DataGen module; 3. while( vld==0 ) { wait(); } 4. turn off the request signal 5. while( vld==1 ) { wait(); } 6. delay computation cycles (8 cycles) 7. write code for DCT  read input data into temp[64] and run DCT 8. set ready so that Sink module can receive the data 7. while( ack==0 ) { wait(); } 9. turn off the ready signal 10. while( ack==1 ) { wait(); }

Compile & Simulation make ./run.x sample1 Examples Compile & Simulation make ./run.x sample1 The result is same as c code does.

Run ‘gtkwave’ waveform viewer Examples Run ‘gtkwave’ waveform viewer

Examples The waveform 8 cycle execution

Discussion Latency of DCT function Timed vs. Untimed Simulation speed Examples Discussion Latency of DCT function The waveform has been obtained by setting the latency of DCT function to 8 cycles. Cycle accurate model can be obtained thru ‘wait()’ annotation. Timed vs. Untimed SystemC supports both timed and untimed models. Simulation speed Faster than other HDL simulators