Tutorial 1 COEN691B.

Slides:



Advertisements
Similar presentations
Connecting to GMT machine via Windows 7. Windows PuTTy GMT on Mac server int-038.geosci.usyd.edu.au To use GMT, you will connect to a Mac server via PuTTy.
Advertisements

Linux Orientation Computer Systems Lab Computer Sciences Department Room 2350.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Basic linux shell commands and Makefiles. Log on to engsoft.rutgers.edu Open SSH Secure Shell – Quick Connect Hostname: engsoft.rutgers.edu Username/password:
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Dayu Zhang 9/3/2014 Lab01. Lab Instructor: Dayu Zhang Office Hour Mon/Wed 10:40am – 11:10am Room A201 Lab Website
Midterm Thursday Topics: First Midterm Instructions Set Architecture Machine Language Programming Assembly Language Programming Traps, Subroutines, & Interrupts.
Virtual Machine and UNIX. What is a VM? VM stands for Virtual Machine. It is a software emulation of hardware. By using a VM, you can have the same hardware.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
A crash course in njit’s Afs
CprE 288 – Quick intro for compiling C in Linux
Eucalyptus Virtual Machines Running Maven, Tomcat, and Mysql.
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
CNIT 132 Intermediate HTML and CSS Publish Web Page.
CSN08101 Digital Forensics Lecture 1B: Essential Linux and Caine Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Alice off-line meeting Alberto Colla Cern, October 3, 2005 AliEn How-To Alice off-line meeting Cern, October 3, 2005 Alberto Colla (Alice off-line Calibration.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
TAMU CSCE 313 (the basics). Basic Unix/Linux programming Accessing CS systems  PuTTY (putty.exe) – a Telnet and SSH client  Common hosts: unix.cs.tamu.edu.
COMPSCI 210 Semester Tutorial 7 – C Exercises.
AE6382 Secure Shell Usually referred to as ssh, the name refers to both a program and a protocol. The program ssh is one of the most useful networking.
1 Freeha Azmat Saba Zia Dec 02, Agenda Installation Introduction From Verilog to SystemC Counter as an Example Complete SystemC Modeling 2.
ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU Usage of Workstation Lecturer: Yu-Hao( 陳郁豪 ) Date:
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
Fall 08, Oct 31ELEC Lecture 8 (Updated) 1 Lecture 8: Design, Simulation Synthesis and Test Tools ELEC 2200: Digital Logic Circuits Nitin Yogi
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Illustration of a Visual Basic Program Running an Ada Program 1 by Richard Conn 11 September 1999.
Intro to Programming Environment 1. Today You Will Learn how to connect to a machine remotely with “nomachine NX client” Learn how to create a new “source.
Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason.
City Cluster Quickstart Lien-Chi Lai, COLA Lab, Department of Mathematics, NTU 2010/05/11.
PostgreSQL Installation By: Keerthi Nelaturu Previous version by Ahmed Jeddah & Miguel Garzon.
Produced;: Tartu Kutsehariduskeskus FTP – File Transfer Protocol Maarja Kask ACTION PROGRAMME OF THE EUROPEAN UNION LEONARDO DA VINCI PROJEKT NO.: 2002.
Introduction to Programming Using C An Introduction to Operating Systems.
Hitchhiker’s Guide to CS Lee Sieger, Tim Cook, Jason Day, Zuozhi Yang.
Shell Interface Shell Interface Functions Data. Graphical Interface Graphical Interface Command-line Interface Command-line Interface Experiments Private.
Introduction to SAS/willow (Unix) Sam Gordji Weir 107.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
Getting Connected CPSC 1010 August 21, Connecting to the SOC Servers Why would we need to connect Work with files Transfer files from your local.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
CIS 4930/6930 System-on-Chip Design Transaction-Level Modeling with SystemC Dr. Hao Zheng Comp. Sci & Eng. U of South Florida.
Learning Unix/Linux Based on slides from: Eric Bishop.
PuTTY Introduction to Web Programming Kirkwood Continuing Education by Fred McClurg © Copyright 2016, All Rights Reserved ssh client.
1 of 14 Ivan Ukhov Embedded Systems Laboratory Department of Computer and Information Science Linköping University TDDI08: Embedded Systems Design Introduction.
Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.
CIS 4930/6930 System-on-Chip Design Introduction to SystemC Hao Zheng Computer Science & Engineering U of South Florida.
Review Why do we use protection levels? Why do we use constructors?
Tutorial Six Linux Basics CompSci Semester Two 2016.
ENEE150 Discussion 01 Section 0101 Adam Wang.
SEEM3460 Tutorial Unix Introduction.
CS1010: Intro Workshop.
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
Web Programming Essentials:
Andy Wang Object Oriented Programming in C++ COP 3330
Lab 1 introduction, debrief
Tsao, Lin-wei Li, Han-lin Hu, Sun-Bo
Md. Istiaque Shahriar COMP346 Lab1 - How to start? Md. Istiaque Shahriar
Operating Systems Lecture 5.
Andy Wang Object Oriented Programming in C++ COP 3330
Tutorial Unix Command & Makefile CIS 5027
Yung-Hsiang Lu Purdue University
CSCE 206 Lab Structured Programming in C
DIBBs Brown Dog Tutorial Setup
Presentation transcript:

Tutorial 1 COEN691B

Coverage Linux SSH through Windows (skip to slide 11) SystemC (basic) Producer Consumer Demo

Linux Basic to Using Command Line Open the Terminal Applications Accessories Terminal

Linux Right now in home directory (folder) “pwd” to print the working directory

Linux Which is equivalent to:

Linux “ls” to list the files and folders in the current directory

Linux “mkdir directory_name” to create a folder

Linux “cd dir_name” to go into dir_name Equivalent to going into

Linux “cd ..” goes up one directory Note that you are not allowed to work above your home directory (other people’s directories)

SSH through Windows ENCS Computer Labs’ Windows OS is connected to your Linux drive Use SSH Secure Shell Client (or other SSH programs) to connect to Concordia’s Linux Server: Host Name: login.encs.concordia.ca Port Number: 22

SSH through Windows Your Linux data is on the U-Drive

SSH through Windows

SSH through Windows SSH with SSH Secure Shell Client

SSH through Windows Click on Quick Connect or the Connect buttons or

SSH through Windows Press Enter or Click on Connect Host Name: login.encs.concordia.ca User Name: your_username Port Number: 22 Press Enter or Click on Connect

SSH through Windows

SystemC Module #include “systemc.h” SC_MODULE(Module_name){ void thread1(); void thread2(); sc_event event; //constructor SC_CTOR(Module_name){ SC_THREAD(thread1); SC_THREAD(thread2); } } Module_name thread1 thread2 2 Concurrent threads

SystemC Module Functions void Module_name::thread1(){ cout << sc_time_stamp() << “ I’m thread1” << endl; } void Module_name::thread2(){ cout << sc_time_stamp() << “ I’m thread2” << endl; }

SystemC Main Function sc_main(int argc, char* argv[]){ Module_name mod_var(“mod_instance_name”); //run for 100 simulated seconds sc_start(100, SC_SEC); }

SystemC Compile using the following command: g++ -I. -I$(SYSTEMC_HOME)/include -L. -L$(SYSTEMC_HOME)/lib-linux64 -o sim Module_name.cpp -lsystemc –lm ./sim $(SYSTEMC_HOME) on login.encs.concordia.ca is /CMC/tools/systemc

SystemC Output: SystemC 2.2.0 --- Sep 14 2011 13:22:38 Copyright (c) 1996-2006 by all Contributors ALL RIGHTS RESERVED 0 s I’m thread1 0 s I’m thread2

SystemC SystemC Time The sc_start(some_time) run the simulation for some time, but in our example does not logical (simulated) advance time. If we add time to the threads, output of the threads will be different.

SystemC Module Functions void Module_name::thread1(){ wait(10, SC_SEC) cout << sc_time_stamp() << “ I’m thread1” << endl; } void Module_name::thread2(){ wait(2, SC_SEC); cout << sc_time_stamp() << “ I’m thread2” << endl; }

SystemC Output: SystemC 2.2.0 --- Sep 14 2011 13:22:38 Copyright (c) 1996-2006 by all Contributors ALL RIGHTS RESERVED 2 s I’m thread2 10 s I’m thread1

SystemC SystemC Time Macros Macro Meaning SC_SEC Seconds SC_MS Milliseconds SC_US Microseconds SC_NS Nanoseconds SC_PS Picoseconds SC_FS Femtoseconds

SystemC sc_event SystemC threads can wait on time or events. Whenever an event is notified, the threads which are waiting on the event wakes up and can continue execution.

SystemC Module Functions void Module_name::thread1(){ wait(event); wait(5, SC_SEC); cout << sc_time_stamp() << “ I’m thread1” << endl; } void Module_name::thread2(){ wait(25, SC_SEC); cout << sc_time_stamp() << “ I’m thread2” << endl; event.notify(); }

SystemC Output: SystemC 2.2.0 --- Sep 14 2011 13:22:38 Copyright (c) 1996-2006 by all Contributors ALL RIGHTS RESERVED 25 s I’m thread2 30 s I’m thread1

SystemC sc_fifo: First-in first-out (FIFO) channel The type of values in the FIFO must be defined. sc_fifo <type> fifoVar; The FIFO channel can be used to write and read values in the order they were written X Y A B Z C

sc_fifo functions write(data_var): Blocking Write data_var into the FIFO. If the FIFO is full, wait until there is room (when data are read) nb_write(data_var): Non-Blocking Same as write(), but if the FIFO is full, nothing is written and it returns false

sc_fifo functions read(data_var) Blocking Read the first value in the FIFO into data_var. If the FIFO is empty, wait until there is data (when data are written) nb_read(data_var): Non-Blocking Same as read(), but if the FIFO is full, no data is read and it returns false

sc_fifo functions num_available(): Returns how many data is available in the FIFO to be read num_free(): Returns how much free space is in the FIFO to write.

Producer Consumer Demo A module with two threads One thread is the producer which produces data into a FIFO. The other thread is the consumer which consumes data from the FIFO How can a Makefile be used and how it is used for the assignments