Chapter 4 : Simulation and Debugging. Original Monitor Module Problem Text are hard to read Undesired changes In file: c:\temp\systemc- 2.0.1\src\systemc\kernel\sc_object.cpp:217.

Slides:



Advertisements
Similar presentations
CPSC 441 TUTORIAL – JANUARY 16, 2012 TA: MARYAM ELAHI INTRODUCTION TO C.
Advertisements

Write a function to calculate the cubic function: y = 4x 3 + 2x 2 –5x – 4 The function should return y for any given value of x. Question One #include.
Verilog.
CSE 341 Verilog HDL An Introduction. Hardware Specification Languages Verilog  Similar syntax to C  Commonly used in  Industry (USA & Japan) VHDL 
1 Processor Design 5Z032 SystemC + miniMIPS Henk Corporaal Eindhoven University of Technology 2011.
Lab2 TA Notes. Set up for Visual C++ New Workspace Win32 Console Application – This runs from a command line Chose Blank Project Add your.C file Build.
SIMULINK Dr. Samir Al-Amer. SIMULINK SIMULINK is a power simulation program that comes with MATLAB Used to simulate wide range of dynamical systems To.
Chapter 05 Tutorial Using Verilog
Advanced Programming in the UNIX Environment Hop Lee.
Chapter 5. SystemC 1.0 Main Purpose  Model RTL Instruments  Support diverse data type  Execute concurrently by using METHODs.
Simulink ® From Simulink® 7 Getting Started Guide.
1 Chapter 5 File Objects and Looping Statements (Some slides have been modified from their original format)
 Delay values control the time between the change in a right-hand-side operand and when the new value is assigned to the left- hand side.  Three ways.
Digital Arithmetic and Arithmetic Circuits
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
VHDL TUTORIAL Preetha Thulasiraman ECE 223 Winter 2007.
SystemC and Levels of System Abstraction: Part I.
1 Freeha Azmat Saba Zia Dec 02, Agenda Installation Introduction From Verilog to SystemC Counter as an Example Complete SystemC Modeling 2.
1 Workshop Topics - Outline Workshop 1 - Introduction Workshop 2 - module instantiation Workshop 3 - Lexical conventions Workshop 4 - Value Logic System.
Chapter 6 Looping. 2 Chapter 6 Topics l While Statement Syntax l Count-Controlled Loops l Event-Controlled Loops l Using the End-of-File Condition to.
1 Very Large Scale Integration II - VLSI II SystemC Gürer Özbek ITU VLSI Laboratories Istanbul Technical University.
Module 1.2 Introduction to Verilog
SKKU 휴대폰학과 © 조준동 조 준 동 SoC 설계방법론 - 실습.
1 4-Development Environment Development processor  The processor on which we write and debug our programs Usually a PC Target processor  The processor.
Constructive Computer Architecture Tutorial 3 Debugging BSV Andy Wright TA September12, 2014http://csg.csail.mit.edu/6.175T01-1.
Winter-Spring 2001Codesign of Embedded Systems1 Debug and Trace Facilities in SystemC Part of HW/SW Codesign of Embedded Systems Course (CE )
Number Systems and Circuits for Addition Lecture 5 Section 1.5 Thu, Jan 26, 2006.
CSE 232: C++ memory management Overview of Arrays Arrays are the simplest kind of data structure –One item right after another in memory (“contiguous range”
Constructive Computer Architecture Tutorial 4 Debugging Sizhuo Zhang TA Oct 23, 2015T04-1http://csg.csail.mit.edu/6.175.
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
Number Systems and Circuits for Addition – Binary Adders Lecture 6 Section 1.5 Fri, Jan 26, 2007.
Design & Co-design of Embedded Systems Introduction to SystemC Maziar Goudarzi.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Recursion.
Introduction to Verilog. Data Types A wire specifies a combinational signal. – Think of it as an actual wire. A reg (register) holds a value. – A reg.
CPE 626 The SystemC Language Aleksandar Milenkovic Web:
Constructive Computer Architecture Tutorial 4: Running and Debugging SMIPS Andy Wright TA October 10, 2014http://csg.csail.mit.edu/6.175T04-1.
EE694v - Verification - Lect Lect 12,13,14 – 762 Testbenches Lets look at the EE 762 testbenches Look at stimulus generation techniques Look at response.
C Programming Chapters 11, . . .
1 of 14 TDTS07: System Design and Methodology Introduction to Lab 1 and 2 Ivan Ukhov Embedded Systems Laboratory Department of Computer and Information.
Chapter1: Introduction Digital System Designs and Practices Using Verilog HDL and 2008~2010, John Wiley 1-1 Chapter 1: Introduction Prof. Ming-Bo.
CIS 4930/6930 System-on-Chip Design Transaction-Level Modeling with SystemC Dr. Hao Zheng Comp. Sci & Eng. U of South Florida.
Chapter 6 Looping. 2 l A loop is a repetition control structure. l it causes a single statement or block to be executed repeatedly What is a loop?
1 of 14 Ivan Ukhov Embedded Systems Laboratory Department of Computer and Information Science Linköping University TDDI08: Embedded Systems Design Introduction.
CIS 4930/6930 System-on-Chip Design Introduction to SystemC Hao Zheng Computer Science & Engineering U of South Florida.
Pseudocode FORTRAN (original) INPUT number
Tutorial 1 COEN691B.
Chapter 6 Looping.
CPE 626 The SystemC Language
Command line arguments
Command Line Arguments
A SoC Design Automation Seoul National University
Structure of C Programs
Program Execution in Linux
Chapter 5: Repetition Structures
Multi-dimensional Array
Real-time Software Design
Tsao, Lin-wei Li, Han-lin Hu, Sun-Bo
Recitation: C Review TA’s 19 Feb 2018.
Design Flow System Level
Introduction to Verilog
C Stuff CS 2308.
Chapter 6: Repetition Structures
Chapter 5: Repetition Structures
PPT1: How failures come to be
Design & Co-design of Embedded Systems
Introduction to Verilog
Program Execution in Linux
Introduction to Verilog
Today’s Lab Start working with Xilinx
Chapter 1 : SystemC Overview
Presentation transcript:

Chapter 4 : Simulation and Debugging

Original Monitor Module Problem Text are hard to read Undesired changes In file: c:\temp\systemc \src\systemc\kernel\sc_object.cpp:217 At time 0 s::(a, b, carry): 000 (sum, carry_out): 00 At time 5 ns::(a, b, carry): 100 (sum, carry_out): 00 At time 5 ns::(a, b, carry): 100 (sum, carry_out): 10

Replace with Trace orignal modified … sc_trace_file *tf = sc_create_vcd_trace_file(“dump"); sc_trace(tf, a, "a"); sc_trace(tf, b, "b"); sc_trace(tf, carry, "carry"); sc_trace(tf, sum, "sum"); sc_trace(tf, co, "cout"); sc_start(100, SC_NS); sc_close_vcd_trace_file(tf); return 0; } int sc_main(int argc, char* argv[]) { sc_signal t_a, t_b, t_cin, t_sum, t_cout; full_adder f1(“Fulladder”); //connect using positional association f1 << t_a << t_b << t_cin << t_sum << t_cout; pattern_gen pg_ptr = new pattern_gen(“Genartion”); //connection using named association pg_ptr->d_a(t_a); pg_ptr->d_b(t_b); (*pg_ptr->d_cin(t_cin); monitor mol(“Monitor”); mo1 << t_a << t_b << t_cin << t_sum << t_cout; sc_start(100, SC_NS); return 0; }

Control Functions sc_clock : generate a clock signal sc_trace : trace information into a file in the specified sc_start : Run simulation for specified time sc_stop : stop simulation sc_time_stamp : get current simulation time with time units sc_simulation_time : Get current simulation time without time units sc_time : set simulation time resolution sc_set_time_resolution : Specify a time value

Control Functions (cont.) sc_clock  Sc_clock rclk(“rclk”, 10, SC_NS);  Sc_clock mclk(“mclk”, 10, SC_NS, 0.2, 5, SC_NS, false) sc_trace  Three format VCD (Value Change Dump) WIF (Waveform Interchange Format) ISDB (Integrated Signal Data Base)  Related function sc_create_xxx_trace_file(filename); sc_close_xxx_trace_file(filename); sc_trace(tfile, signal_name, “signal_name”);

Control Functions (cont.) sc_start  sc_start(100, SC_NS);  sc_start(-1); sc_stop  Stop simulation. Can be used in any process

Control Functions (cont.) sc_set_time_resolution  sc_set_time_resolution(100, SC_PS); sc_time sc_time t1(100, SC_NS); sc_time t2(20, SC_PS); sc_start(t1); sc_start(t2);