CPRE 583 Reconfigurable Computing

Slides:



Advertisements
Similar presentations
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
Advertisements

1 - ECpE 583 (Reconfigurable Computing): State Machines (Part 2) Iowa State University (Ames) ECpE 583 Reconfigurable Computing Lect 5: Tues 9/9/2008 (State.
UDP - User Datagram Protocol UDP – User Datagram Protocol Author : Nir Shafrir Reference The TCP/IP Guide - ( Version Version.
CIS 235: Networks Fall, 2007 Western State College Computer Networks Fall, 2007 Prof Peterson.
1 Application TCPUDP IPICMPARPRARP Physical network Application TCP/IP Protocol Suite.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Gursharan Singh Tatla Transport Layer 16-May
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a
1 - ECpE 583 (Reconfigurable Computing): Course overview Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 1: Wed 8/24/2011 (Course.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.6 UDP Principles (Chapter 24) (User Datagram Protocol)
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_a Transport Protocols - UDP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
CS/CoE 536 : Lockwood 1 CS/CoE 536 Reconfigurable System On Chip Design Lecture 4 : Demonstration of Machine Problem 1 : CAM-based Firewall Washington.
1 - CPRE 583 (Reconfigurable Computing): Reconfigurable Computing Architectures Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture.
1 Network Layer Lecture 16 Imran Ahmed University of Management & Technology.
1 - CPRE 583 (Reconfigurable Computing): Reconfigurable Computing Systems Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 8: Wed.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Internet Protocol Formats. IP (V4) Packet byte 0 byte1 byte 2 byte 3 data... – up to 65 K including heading info Version IHL Serv. Type Total Length Identifcation.
1 - CPRE 583 (Reconfigurable Computing): VHDL to FPGA: A Tool Flow Overview Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 5: 9/7/2011.
Decoding an IP Header (1)
1 - CPRE 583 (Reconfigurable Computing): Reconfiguration Management Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 11: Wed 9/28/2011.
1 - CPRE 583 (Reconfigurable Computing): Reconfigurable Computing HW, VHDL 2 Iowa State University (Ames) CPRE 583 Reconfigurable Computing (VHDL Overview.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
1 - CPRE 583 (Reconfigurable Computing): VHDL overview 1 Iowa State University (Ames) CPRE 583 Reconfigurable Computing Lecture 2: 8/26/2011 (VHDL Overview.
Graciela Perera Department of Computer Science and Information Systems Slide 1 of 18 INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723 Graciela.
Snort – IDS / IPS.
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer.
Internet Protocol Formats
CPRE 583 Reconfigurable Computing Instructor: Dr. Phillip Jones
Instructor: Dr. Phillip Jones
CPRE 583 Common VHDL mistakes “It works perfect in simulation,
CPRE 583 Reconfigurable Computing (VHDL Overview )
Instructor: Dr. Phillip Jones
Instructor: Dr. Phillip Jones
Washington University
CPRE 583 Reconfigurable Computing
Instructor: Dr. Phillip Jones
Dr. John P. Abraham Professor UTPA
CPRE 583 Reconfigurable Computing
IP : Internet Protocol Surasak Sanguanpong
Instructor: Dr. Phillip Jones
Network Core and QoS.
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
CPRE 583 Reconfigurable Computing
CPRE 583 Reconfigurable Computing Instructor: Dr. Phillip Jones
What does this packet do?
Washington University in St. Louis
Dr. John P. Abraham Professor UTPA
Advanced Computer Networks
Instructor: Dr. Phillip Jones
Net 323 D: Networks Protocols
CSCD 330 Network Programming
CPRE 583 Reconfigurable Computing
Internet Protocol Formats
Instructor: Alexander Stoytchev
Advanced Computer Networks
Network Architecture Models: Layered Communications
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
UDP Principles (Chapter 24) (User Datagram Protocol)
NET 323D: Networks Protocols
Transport Protocols Relates to Lab 5. An overview of the transport protocols of the TCP/IP protocol suite. Also, a short discussion of UDP.
Transport Layer 9/22/2019.
Instructor: Dr. Phillip Jones
Network Core and QoS.
Electrical Communications Systems ECE
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

CPRE 583 Reconfigurable Computing Lecture 6: 9/9/2011 (VHDL Overview 3 ) Instructor: Dr. Phillip Jones (phjones@iastate.edu) Reconfigurable Computing Laboratory Iowa State University Ames, Iowa, USA http://class.ece.iastate.edu/cpre583/

Announcements/Reminders MP1: will be released by right after class today VERY tentatively due next Friday 9/16. I’ll see how the class is progressing next Wed before giving a solid due date. HW1: will due midnight tonight (Fri 9/9) Mini literary survey assigned PowerPoint tree due: Fri 9/23 by class, so try to have to me by 9/22 night. My current plan is to summarize some of the classes findings during class. Final 5-10 page write up on your tree due: Fri 9/30 midnight.

Literary Survey Start with searching for papers from 2008-2011 on IEEE Xplorer: http://ieeexplore.ieee.org/ Advanced Search (Full Text & Meta data) Find popular cross references for each area For your topic try to identify 1-2 good survey papers For topic Identify 2-3 core Problems/issues For each problem identify 2-3 Approaches for addressing For each approach identify 1-2 papers that Implement the approach.

Literary Survey: Example Structure Hardware Accelerated Bioinformatics P1 P2 P3 A1 A2 A3 A1 A2 A1 A2 I1 I1 I2 I1 I1 I1 I1 I2 I1 5-10 page write up on your survey tree

Fall 2010 Student Example Network Intrusion Detection Systems detection accuracy signatures The Study on Network Intrusion Detection System of Snort heuristics An FPGA-Based Network Intrusion Detection Architecture adaptability to new threats neural networks Network Intrusion Detection Method Based on Radial Basic Function Neural Network principal component analysis An Efficient FPGA Implementation of Principle Component Analysis based Network Intrusion Detection System support vector machine Network Intrusion Detection Based on Support Vector Machine Network Intrusion Detection Method Based on Agent and SVM

Common Questions

Common Questions

Overview Introduction to State machines Jump start introduction to MP1

Finite State Machine (FSM) Design Model of computation High level application example (Networking) Two major types Moore Mealy Detailed view of application example

Finite State Machines What types of applications are they well suited Streaming pattern recognition Sequential event based control logic Allow hardware designer to reason about things in small pieces

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM IP src

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM IP dest IP src

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM src port IP dest IP src

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM dest port src port IP dest IP src

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM length dest port src port IP dest IP src

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM Data 1 length dest port src port IP dest IP src

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM Data 2 Data 1 length dest port src port IP dest IP src

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM Data 3 Data 2 Data 1 length dest port src port IP dest

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM Send Alert Data 3 Data 2 Data 1 length dest port src port IP dest

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM Send Alert r o C length dest port src port IP dest

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM Send Alert n r o C length dest port src port

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM Send Alert Alert!! ! n r o C length dest port

Streaming Network application (MP1) Process UDP packet headers (event driven) Detect patterns in payload (e.g. “Corn”) Modify payload based on header information FSM Send Alert Modify Packet ! n r o C length dest port

Moore and Mealy FSMs Moore: Output is only a function of the current state Mealy: Output is a function of the current state and input (“Mealy is more”)

Moore FSM Moore: Output is only a function of the current state Example detect every occurrence of “1101” State Name Start (0) 1 (0) 11 (0) 110 (0) 1101 (1) FSM output

Moore FSM Moore: Output is only a function of the current state Example detect every occurrence of “1101” Where to go on a given input 1 Start (0) 1 (0) 11 (0) 110 (0) 1101 (1)

Moore FSM Moore: Output is only a function of the current state Example detect every occurrence of “1101” 1 Start (0) 1 (0) 11 (0) 110 (0) 1101 (1) State: Start S_1 Output: 0 0 Input: 1 ? NextState: S_1 ?

Moore FSM Moore: Output is only a function of the current state Example detect every occurrence of “1101” 1 1 1 Start (0) 1 (0) 11 (0) 110 (0) 1101 (1) 1 1 State: Start S_1 S_11 S_110 S_1101 Output: 0 0 0 0 1 Input: 1 1 0 1 ? NextState: S_1 S_11 S_110 S_1101 ?

Moore FSM Moore: Output is only a function of the current state Example detect every occurrence of “0101”

Moore FSM Moore: Output is only a function of the current state Example detect every occurrence of “0101” 10 (0) 1 010 (0) 1010 (1) 1 Start (0) (0) 1 1 1 1

Mealy FSM Moore: Output a function of the current state, and input Example detect every occurrence of “1011” State Name 1 11 011 1011

Mealy FSM Moore: Output a function of the current state, and input Example detect every occurrence of “1101” Input output 1/0 1 11 110 1101 0/0 Start

Mealy FSM Mealy: Output a function of the current state, and input Example detect every occurrence of “1101” 1/0 1/0 0/0 1 11 110 1101 0/0 0/0 1/0 Start 1/1 0/0

FSM: General Circuit Architecture Let: X be inputs Z be outputs State(t) be the state of the FSM at the current time State(t+1) be the next state of the FSM δ be the transition between states State(t+1) = δ(State(t), X) Output Moore: Z(State(t)) Mealy: Z(State(t), X) x=1/z=0 1/0 S1 S2 0/1 z=0 0/0

FSM: General Circuit Architecture Moore Combinational Logic Z(State(t)) Z(State(t),X) Inputs: X Outputs Mealy State Storage DFF Next State State(t+1) = δ(State(t), X) State(t) DFF

VHDL: IF and CASE constructs IF THEN ELSE can be mapped to a 2:1 Multiplexer (Mux) sel = b“0” IF (sel = ‘0’) THEN out_1 <= in_0; ELSE out_1 <= in_1 END IF; x”C” 4 2:1 Mux in_0 4 out_1 x”C” 4 x”D” in_1

VHDL: IF and CASE constructs Mapping a CASE statement to a 4:1 Mux CASE sel is WHEN “00” => out_1 <= in_0; WHEN “01” => out_1 <= in_1; WHEN “10” => out_1 <= in_2; WHEN “11” => out_1 <= in_3 WHEN OTHERS => END CASE; sel = b“10” 2 x”C” 4 in_0 4:1 Mux 4 x”D” in_1 4 out_1 x”7” 4 x”7” in_2 4 x”2” in_3 Why do we need others here?

VHDL: IF and CASE constructs Mapping a CASE statement to a 1:4 Decoder CASE state is WHEN state_1 => IF (sel = ‘0’) THEN mux_out <= ‘1’; ELSE mux_out <= ‘0’; END IF; WHEN state_11 => -- similar code WHEN state_011 => WHEN state_1011 => --similar code END CASE; on 2:1 Mux 1:4 Decoder out_0 off 2:1 Mux out_1 “10” 2 state on 2:1 Mux out_2 out_3 off 2:1 Mux Enumerated Type State = {state_1, state_11, state_011, state_1011} = {“00”, ”01”, ”10”, ”11”}

VHDL: IF and CASE constructs Mapping a CASE statement to a 1:4 Decoder CASE state is WHEN state_1 => IF (sel = ‘0’) THEN mux_out <= ‘1’; ELSE mux_out <= ‘0’; END IF; WHEN state_11 => -- similar code WHEN state_011 => WHEN state_1011 => --similar code END CASE; on 2:1 Mux 1:4 Decoder out_0 off 2:1 Mux out_1 “00” 2 state off 2:1 Mux out_2 out_3 off 2:1 Mux Enumerated Type State = {state_1, state_11, state_011, state_1011} = {“00”, ”01”, ”10”, ”11”}

FSM: General Circuit Architecture Moore Combinational Logic Z(State(t)) Z(State(t),X) Inputs: X Outputs Mealy State Storage DFF Next State State(t+1) = δ(State(t), X) State(t) DFF

VHDL for Mealy (“1101”) Example -- Store the “state” Update_State: process(clk) begin if(clk’event and clk=‘1’) then state <= next_state; end if; end process Update_State; state next_state DFF

VHDL for Mealy (“1101”) Example -- Compute combinational logic Combinational: process(x, state) begin case state is when state_1 => if(x = ‘0’) then z <= ‘0‘; next_state <= state_1; else next_state <= state_11; end if; when state_11 => z <= ‘0’; next_state <= state_011 ; Compute output Compute next_state 1/0 1/0 0/0 1 11 011 1011 0/0 0/0 1/0 Start 1/1 0/0

VHDL for Mealy (“1101”) Example when state_011 => if(x = ‘0’) then z <= ‘0‘; next_state <= state_1011; else next_state <= state_011; end if; when state_1011 => z <= ‘0’; next_state <= state_1; z <= ‘1‘; next_state <= state_11; end case; end process Combinational; 1/0 1/0 0/0 1 11 011 1011 0/0 1/0 1/1 0/0

Network Processing Example: UDP UDP – User Datagram Protocol Popular protocol for sending data over the internet (TCP is popular another protocol) Typical encapsulated within IP (Internet Protocol) UDP/IP Gives no guarantee of delivery Relies on application layer to implement reliability Unlike TCP which has reliably delivery build in. Reference for more info on IP and UDP details http://www.freesoft.org/CIE/ RCFs Course

Destination IP Address UDP/IP Packet Format Ver IHL TOS Total Length Note: flags 3 bits Identification flags fragment offset IP Header UDP Protocol = 17 TTL Protocol Header Checksum Source IP Address Destination IP Address Options Padding Source Port Destination Port UDP Header UDP length (bytes) = UDP header+payload Length Checksum Byte1 Byte2 Byte3 Byte4 Payload 31 32-bits

Example: Network Processing Tasks Raise an alert signal when the pattern “corn!” is detected Return the number of times “corn!” is detected Place count value as the last byte of the payload

Streaming Network application (MP1) Detect patterns in payload (e.g. “Corn!”) Place the number of detections in last byte of payload FSM Send Alert Modify Packet ! n r o C length dest port

Architecture Detect patterns in payload (e.g. “Corn!”) Place the number of detections in last byte of payload Draw out logic, and data flow!!! Alert FSM Alert Register & Counter Management Packet Length output sel position corn_cnt Packet Input Process 2:1 Mux Packet Output Process

Architecture Detect patterns in payload (e.g. “Corn!”) Place the number of detections in last byte of payload Alert FSM Alert Register & Counter Management Packet Length output sel position corn_cnt Packet Input Process 2:1 Mux Packet Output Process

Alert FSM Design Alert signal when the pattern “corn!” is detected Z = {Alert} “c”/0 “o”/0 “r”/0 “n”/0 c o r n ! others/0 Start others/0 others/0 others/0 “!”/1

Alert FSM Design Alert signal when the pattern “corn!” is detected Output Packet’s Length Z = {Alert,length_vld,pack_length} X = {vld,input} : Note “?” is don’t care “c”/0 “o”/0 “r”/0 “n”/0 c o r n ! others/0 Start others/0 others/0 others/0 “!”/1

Alert FSM Design Alert signal when the pattern “corn!” is detected Output Packet’s Length Z = {Alert,length_vld,pack_length} X = {vld,input} : Note “?” is don’t care UDP ports 1,“c”/0,0,0 1,“o”/0,0,0 1,“r”/0,0,0 1,“n”/0,0,0 1,”?”/0,0,0 1,”?”/0,0,0 c o r n ! IPH_5 UDP length 1,others/0,0,0 1,”?”/0,1,length IPH_2 1,others/0,0,0 1,others/0,0,0 1,”?”/0,0,0 1,others/0,0,0 Start IP 1,“!”/1,0,0 Start

Architecture Detect patterns in payload (e.g. “Corn!”) Place the number of detections in last byte of payload Alert FSM Alert Register & Counter Management Packet Length output sel position corn_cnt Packet Input Process 2:1 Mux Packet Output Process

Next Class VHDL overview 4 Avoiding simulation differing from HW implementation

MP1 Jumpstart

Questions/Comments/Concerns