CSE 466 – Fall 2000 - Introduction - 1 COMMANDS RESPONSES Master/Slave Software Architecture Master void master() _task_ MAST{ Button(mode); // enq(cmd)

Slides:



Advertisements
Similar presentations
Why to learn OSI reference Model? The answer is too simple that It tells us that how communication takes place between computers on internet but how??
Advertisements

OSI Model OSI MODEL.
Lecture 8: Serial Interfaces
Open System Interconnection
Lecture 2 Protocol Layers CPE 401 / 601 Computer Network Systems slides are modified from Dave Hollinger.
Protocols and the TCP/IP Suite
EE 4272Spring, 2003 EE4272: Computer Networks Instructor: Tricia Chigan Dept.: Elec. & Comp. Eng. Spring, 2003.
Introduction to Management Information Systems Chapter 5 Data Communications and Internet Technology HTM 304 Fall 07.
EE 4272Spring, 2003 Protocols & Architecture A Protocol Architecture is the layered structure of hardware & software that supports the exchange of data.
Data Communications Architecture Models. What is a Protocol? For two entities to communicate successfully, they must “speak the same language”. What is.
1 Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
CSE 466 – Fall Introduction - 1 Implementation of Shared Memory  Considerations  Network traffic due to create/read/write  Latency of create/read/write.
Review on Networking Technologies Linda Wu (CMPT )
 The Open Systems Interconnection model (OSI model) is a product of the Open Systems Interconnection effort at the International Organization for Standardization.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
Lecturer: Tamanna Haque Nipa
SERIAL BUS COMMUNICATION PROTOCOLS
CSE 466 – Fall Introduction - 1 Fuel Cell Power Plant A Control Dominated Example H2H2 Air H20H20 Heat controller sense: Temperature H 2 Output.
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Presentation on Osi & TCP/IP MODEL
Introduction1-1 Data Communications and Computer Networks Chapter 5 CS 3830 Lecture 27 Omar Meqdadi Department of Computer Science and Software Engineering.
Protocols and the TCP/IP Suite
CSE 466 – Fall Introduction - 1 Reentrant Driver open() { if (count++) return(0); else return(grab_resources()); } release() { if (--count) return(0);
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Introduction Slide 1 A Communications Model Source: generates.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
Lecture 3 Overview. Protocol An agreed upon convention for communication both endpoints need to understand the protocol. Protocols must be formally defined.
ECE 526 – Network Processing Systems Design Networking: protocols and packet format Chapter 3: D. E. Comer Fall 2008.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_b Protocol Layering Instructor: Dr. Li-Chuan Chen Date: 09/15/2003 Based in part upon slides of Prof.
UNDERSTANDING THE HOST-TO-HOST COMMUNICATIONS MODEL - OSI LAYER & TCP/IP MODEL 1.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Chapter 15 – Part 2 Networks The Internal Operating System The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
©Brooks/Cole, 2003 Model and protocol  A model is the specification set by a standards organization as a guideline for designing networks.  A protocol.
Chapter 2 Protocols and the TCP/IP Suite 1 Chapter 2 Protocols and the TCP/IP Suite.
William Stallings Data and Computer Communications
BZUPAGES.COM Presentation on TCP/IP Presented to: Sir Taimoor Presented by: Jamila BB Roll no Nudrat Rehman Roll no
Networking Basics CCNA 1 Chapter 11.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
THE OSI MODEL ISO is the organization.OSI is the model. ISO  International Standards Organization OSI  Open Systems Interconnection.
CHAPTER 4 PROTOCOLS AND THE TCP/IP SUITE Acknowledgement: The Slides Were Provided By Cory Beard, William Stallings For Their Textbook “Wireless Communication.
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces Rajesh K. Gupta Computer Science and Engineering University of California, San Diego.
1 Chapter 4. Protocols and the TCP/IP Suite Wen-Shyang Hwang KUAS EE.
Protocol Layering Chapter 11.
2.1 Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
OSI Model. Open Systems Interconnection (OSI) is a set of internationally recognized, non proprietary standards for networking and for operating system.
COMPUTER NETWORK AND DESIGN CSCI 3385K. Host-to-Host Communications Model Older model Proprietary Application and combinations software controlled by.
Network Models. The OSI Model Open Systems Interconnection (OSI). Developed by the International Organization for Standardization (ISO). Model for understanding.
Computer Network Lab. 1 3 장 OSI 기본 참조 모델 n OSI : Open System Interconnection n Basic Reference Model : ISO-7498 n Purpose of OSI Model ~ is to open communication.
LonWorks Introduction Hwayoung Chae.
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
CSE 466 – Fall Introduction - 1 Fuel Cell Power Plant A Control Dominated Example H2H2 Air H20H20 Heat controller sense: Temperature H 2 Output.
Computer Engineering and Networks, College of Engineering, Majmaah University Protocols OSI reference MODEL TCp /ip model Mohammed Saleem Bhat
Network Models. 2.1 what is the Protocol? A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow,
Lab 9 Multiprocessor, Buses, SPI, I2C. Multiprocessors Why multiprocessors? The structure of multiprocessors. Elements of multiprocessors: – Processing.
OSI Model OSI MODEL. Communication Architecture Strategy for connecting host computers and other communicating equipment. Defines necessary elements for.
OSI Model OSI MODEL.
© 2003, Cisco Systems, Inc. All rights reserved.
Distributed Systems.
Transport Layer.
TCP/IP Transmission Control Protocol / Internet Protocol
Introduction of Transport Protocols
CPEG514 Advanced Computer Networkst
OSI Model OSI MODEL.
Another Physical Layer – I2C
Network Architecture Models
Computer Networks Protocols
Presentation transcript:

CSE 466 – Fall Introduction - 1 COMMANDS RESPONSES Master/Slave Software Architecture Master void master() _task_ MAST{ Button(mode); // enq(cmd) checkDB(mode); // enq(cmd) } void comTop() _task_ COM{ wait(K_TMO, 1); if (!deq(cmd)) { cmd = pollCmd(next++); slave = next; } else slave = toWho(cmd); write(slave, cmd); read(response); signal(VERIFY); } void comBot() _task_ VERIFY{ // match up resp. and commds wait(K_SIG); verify(response); updateDB(response); } Slave void mainTask() _task_ SL{ manageLoad(mode); } void comTop() _task_ TOP{ read(master,cmd); write(master,response); //prev signal(DO); }// could be ISR void comBot() _task_ DO { wait(K_SIG); response = do(cmd); // set local mode } commands and responses are packets not single bytes responses are for previous command mode is NOT a global variable

CSE 466 – Fall Introduction - 2 Sockets are a logical constructs Master slave socket == 2-way fifo Socket could be implemented in shared memory, internet, or anything in between. High level architecture can be independent of implementation choices.

CSE 466 – Fall Introduction - 3 Physical Network MCU1 MCU2 Device1 Device2 Bus

CSE 466 – Fall Introduction - 4 ISO Network Layers – modularity/interop.  Physical Layer: What physically moves a bit/byte from one place to another (ethernet). Devices have a local physical address.  Voltage  Current  Photons  Radio  Sonar  Data Link Layer: Guarantees delivery of “frames” over the physical layer, to the physical address. Assembles/dissembles packets from/to frames.  Address (Source and Destination)  Checksum  Data  Usually a fixed size or maximum size.  Network Layer: Primarily responsible for routing of network packets  Maps packet destination address from/to local physical address  Adds network layer header to packet  Gives packets w/ header to data link layer, along with physical address.

CSE 466 – Fall Introduction - 5 ISO Layers Continued  Transport Layer: responsible for end-to-end protocol of user data buffer transmissions. Source and destination addresses are private – host to host.  Maps application space channel (socket) name to network address.  makes network packets w/ transport header and communicates w/ network layer.  Each layer has a peer-to-peer and an intra-stack protocol Transport -- TCP Network -- IP Datalink -- Ether Physical -- Etherethernet fiber Datalink -- Ether Network -- IP fiber ethernet Datalink -- Ether Network -- IP Transport -- TCP Network -- IP Datalink -- Ether Physical -- Ether write(s, buf,n);read(s, buf,n ); Application

CSE 466 – Fall Introduction - 6 Transport Network -- IP Transport Network -- IP Embedded Networking: Simplest Case  Simple case: socket name is the same as physical address. No mapping, we just need to break our message into frames…maybe  Physical Layer – typically low bandwidth, serial, byte oriented  Data link layer – read/write interface to the application  frames: destination address, data, checksum.  No mapping from sockets to network address  No mapping from network address to physical address (no routing) Datalink Physicalethernet fiber Datalink -- Ether fiber ethernet Datalink -- EtherDatalink Physical write(s, buf,n);read(s, buf,n ); Application

CSE 466 – Fall Introduction - 7 Example of Physical Layer: SPI Bus Master Slave SCK SDO SDI SCK SDI SDO void isr() interrupt TIMER { SDR = S; while(!SPF); R = SDR; } void isr() interrupt SPF{ R = SDR; SDR = S signal(RECV); } shift reg shift reg

CSE 466 – Fall Introduction - 8 Multiple Slave Configuration Master Slave SCK SDO SDI SCK SDI SDO Slave SCK SDI SDO

CSE 466 – Fall Introduction - 9 Master Slave Data Link Protocol  As an example frame is [destination address, command, data]  An acknowledgement frame is [address, data, checksum] Master Slave SCK SDO SDI SCK SDI SDO Slave SCK SDI SDO mux dstcmddatadsttypedata addrdatasumtypedatasum mux x x x

CSE 466 – Fall Introduction - 10 Data Link Layer (Master/Slave) void physical() interrupt TIMER { S = deq() setMux(S); SDR = S while (!SDF); R = SDR; signal(DLIN); } void datalink() _task_ DLIN { while(1) { wait(); frame[i++] = R; if (i == 3) { i = 0; process(frame); } void physical() interrupt SF { R = SDR; SDR = deq(); signal(DLIN); } void datalink _task_ DLIN { while (1) { wait(); frame[i++] = R; if (i == 3) { i = 0; process(frame); } longer packets = less overhead but longer latency (response time) loadtable slave110cont.slave115endslave130 o o o write(slave1, “loadtable ”); //transport interface verify checksum update local DB with data in the ACK frame. Handle error. if for me, prepare ACK assemble into packets and signal app when packet complete not shown: synchronizing dealing w/ errors

CSE 466 – Fall Introduction - 11 Application Interface to Data Link Layer void mast() _task_ app { … // application layer protocol defines meaning write(SLAVE1, “loadtable ”); //blocking … } void write(int dst, char *command{ // transport interface frame_array = mkFrames(dst,command); for (each byte in frame array) enq(byte); } loadtable slave110 cont.slave115 endslave130 void slave()_task_ app( while(1) { if (!read(master, cmd)) do(cmd); other_processing() } int read() { if (test(READ)) { sprintf(cmd,”%s”,deq()) return(0); } return(-1) } void process(char *frame) { response = resp(frame); for (each byte) enq(response); if (addframe(p,frame)) { enq(p); p = new packet(); signal(READ); }

CSE 466 – Fall Introduction - 12 Trade-off Between Frame Size and Overhead write(p1, “loadtable ”); //transport interface loadtable p110 cont.p115 endp130 or loadtable p end Frame: bus is dedicated to that transmission during the entire frame similar to the OS time slice problem: efficiency v. responsiveness

CSE 466 – Fall Introduction - 13 Another Physical Layer – I2C  Multi-mastered  Send and receive  Two wire (plus ground)  Packet oriented (block send)

CSE 466 – Fall Introduction - 14 Major Features of I2C

CSE 466 – Fall Introduction - 15 Physical Layer

CSE 466 – Fall Introduction - 16 Bit Transfer Transmitter Master

CSE 466 – Fall Introduction - 17 Who gets to be master The one who initiates a frame: A frame is: … OR … …

CSE 466 – Fall Introduction - 18 An I2C Byte Transfer Tx Device Rx Device master slave Rx MSB First MSB……………….LSB

CSE 466 – Fall Introduction - 19 “Bit Banging” v. Bus Controller Bit Banging do all signal transitions in SW very difficult IC Interface: Mem Mapped device: set your address initiate transfer service the device on interrupt byte received transmission complete

CSE 466 – Fall Introduction - 20 Schematic from App Note Something is wrong with this picture…but its close

CSE 466 – Fall Introduction - 21 Arbitration what’s the backoff rule?

CSE 466 – Fall Introduction - 22 A Complete Frame MSB……..LSB

CSE 466 – Fall Introduction - 23