Spring Camp 2013 1 Getting ready for day 2 • Yesterday’s tree was moved to NetFPGA-10G-live-BACKUP-Day1/ • IF you edited code cp NetFPGA-10G-live-BACKUP-Day1/projects/crypto_nic/hw/ pcores/crypto/ hdl/verilog/crypto.v \ NetFPGA-10G-live/ projects/crypto_nic/hw/pcores/crypto/hdl/verilog/ nf10_crypto_v1_00_a.v • Edit your nf10_crypto_v1_00_a.v – Rename the module to nf10_crypto
56
Embed
Spring Camp 2013 1 Getting ready for day 2 Yesterdays tree was moved to NetFPGA- 10G-live-BACKUP-Day1/ IF you edited code cp NetFPGA-10G-live-BACKUP- Day1/projects/crypto_nic/hw
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Spring Camp 2013 1
Getting ready for day 2
• Yesterday’s tree was moved to NetFPGA-10G-live-BACKUP-Day1/
•The Life of a Packet Through the NetFPGA– Hardware Datapath – Interface to software: Exceptions and Host I/O
•Implementation– Module Template– Write Crypto NIC using a static key
•Simulation and Debug– Write and Run Simulations for Crypto NIC
Spring Camp 2013 4
Tutorial Outline
•Registers
– Explain Register System– Use AXI Lite registers modules to implement register– Add register access stimulus to define Crypto NIC encryption key– Update Simulations
•Build and Test Hardware– Build– Explanation of Hardware Tests– Write and run Hardware Tests
always @(posedge Bus2IP_Clk) if (~Bus2IP_Resetn) begin dummy_reg <= 'h0; end else begin dummy_reg <= rw_regs [C_S_AXI_DATA_WIDTH*(DUMMY_REG_ADDR) + 31 :
C_S_AXI_DATA_WIDTH*(DUMMY_REG_ADDR) ]; end
Spring Camp 2013 14
Adding Registers Logic (3)
Registers usage:•RO, WO, RW refers to software access•Write only registers can be written only by the software• Read only registers are set by hardware and
read by software or hardware • Read/Write registers can set by software and
• Your task:edit ~/.bashrc and change NF_DESIGN_DIR to be crypto_nicreopen your Terminal (to force this change)cd ~/NetFPGA-10G-live/projects/cp --archive reference_nic/test crypto_nic/.
This creates a directory of hardware tests just like the reference_niccd ~/NetFPGA-10G-live/projects/projects/crypto_nic/testcp hw_external_loopback hw_crypto_encrypt
• Now edithw_crypto_encrypt/run.py
to create your tests.
Spring Camp 2013 30
Running Hardware Tests
• Use command nf_test.py– Required Parameter
• sim hw or both (right now only use hw)– Optional parameters
• --major <major_name>• --minor <minor_name>
both_crypto_encrypt
• Run the commandnf_test.py hw --major crypto --minor encrypt
majormajor minorminor
Spring Camp 2013 31
Section III: Interface with Software
Spring Camp 2013 32
NetFPGA-Host Interaction (recap)
–Register reads/writes via ioctl system call with wrapper functions:
–Useful command line utilitiescd ~/NetFPGA-10-live/projects/crypto_nic/sw/host/apps./rdaxi 0x7d4000000./wraxi 0x7d4000000 0x1
Spring Camp 2013 33
Recap
Build a complete NetFPGA design
Learn:• Module creation (Verilog)• Reference pipeline integration• Verification via simulation• Verification via hardware tests• Interaction with software
Spring Camp 2013 34
Step 1. Program NetFPGA-10G Guidelines
1) Prepare a bit file, nf10.ko driver for a NetFPGA cardcd ~/NetFPGA-10G-live/projects/crypto_nic/sw/host/driver; makeOR, do your make from the DESIGN directorycd ~/NetFPGA-10G-live/projects/crypto_nic; make
Reference_nic driver is used for most projects.
2) cd ~/NetFPGA-10G-live/projects/crypto_nic/bitfiles3) Load a bit file for programming FPGA ~/NetFPGA-10G-live/tools/scripts/impact_run.sh <bit_file_name.bit>
• Intelligent IP-enabled device controller (e.g. IP cameras or IP powermeters)
• DES breaker
• platform for flexible NIC API evaluations
• snmp statistics reference implementation
• sflow (hp) reference implementation
• trajectory sampling (reference implementation)
• implementation of zeroconf/netconf configuration language for routers
• h/w openflow and (simple) NOX controller in one…
• Network RAID (multicast TCP with redundancy)
• inline compression
• hardware accelorator for TOR
• load-balancer
• openflow with (netflow, ACL, ….)
• reference NAT device
• active measurement kit
• network discovery tool
• passive performance measurement
• active sender control (e.g. performance feedback fed to endpoints for control)
• Prototype platform for NON-Ethernet or near-Ethernet MACs– Optical LAN (no buffers)
Stuck for a NetFPGA project?Well I’m not sure about you but here is a list I created:• Build an accurate, fast, line-rate NetDummy/nistnet element
• A flexible home-grown monitoring card• Evaluate new packet classifiers
– (and application classifiers, and other neat network apps….)• Prototype a full line-rate next-generation Ethernet-type• Trying any of Jon Crowcrofts’ ideas (Sourceless IP routing for example)• Demonstrate the wonders of Metarouting in a different implementation (dedicated hardware)• Provable hardware (using a C# implementation and kiwi with NetFPGA as target h/w)• Hardware supporting Virtual Routers• Check that some brave new idea actually works
e.g. Rate Control Protocol (RCP), Multipath TCP, • toolkit for hardware hashing• MOOSE implementation• IP address anonymization • SSL decoding “bump in the wire”• Xen specialist nic• computational co-processor• Distributed computational co-processor• IPv6 anything• IPv6 – IPv4 gateway (6in4, 4in6, 6over4, 4over6, ….)• Netflow v9 reference• PSAMP reference• IPFIX reference• Different driver/buffer interfaces (e.g. PFRING)• or “escalators” (from gridprobe) for faster network monitors• Firewall reference• GPS packet-timestamp things• High-Speed Host Bus Adapter reference implementations
– Infiniband– iSCSI– Myranet– Fiber Channel
• Smart Disk adapter (presuming a direct-disk interface)• Software Defined Radio (SDR) directly on the FPGA (probably UWB only)• Routing accelerator
– Hardware route-reflector– Internet exchange route accelerator
• Hardware channel bonding reference implementation• TCP sanitizer• Other protocol sanitizer (applications… UDP DCCP, etc.)• Full and complete Crypto NIC• IPSec endpoint/ VPN appliance• VLAN reference implementation• metarouting implementation• virtual <pick-something>• intelligent proxy• application embargo-er• Layer-4 gateway• h/w gateway for VoIP/SIP/skype• h/w gateway for video conference spaces• security pattern/rules matching• Anti-spoof traceback implementations (e.g. BBN stuff)• IPtv multicast controller• Intelligent IP-enabled device controller (e.g. IP cameras or IP powermeters)• DES breaker• platform for flexible NIC API evaluations• snmp statistics reference implementation• sflow (hp) reference implementation• trajectory sampling (reference implementation)• implementation of zeroconf/netconf configuration language for routers• h/w openflow and (simple) NOX controller in one…• Network RAID (multicast TCP with redundancy)• inline compression• hardware accelorator for TOR• load-balancer• openflow with (netflow, ACL, ….)• reference NAT device• active measurement kit• network discovery tool• passive performance measurement• active sender control (e.g. performance feedback fed to endpoints for control)• Prototype platform for NON-Ethernet or near-Ethernet MACs
– Optical LAN (no buffers)
Spring Camp 2013 53
Project Ideas for the NetFPGA• NetFPGA-10G Test Harness• Drop 1-in-N packet module• Rate-limited module• Event capture module• Statistics and Counters• Measurement sketch• Advanced OPL • Input / Output scheduler• 40G Port• VLAN Tagging• ….
• Ideas from NetFPGA-1G
Spring Camp 2013 54
Visit http://NetFPGA.org
Spring Camp 2013 55
• Wednesday restart from 9am• This evening is time to try hw testing &
synthesis crypto_nic design if you didn’t manage that
• Make your group, leader&project
• Specific, Realistic• Time-bounded
• Modest is good…..
Spring Camp 2013 56
Section IX: Conclusion
Spring Camp 2013 57
Nick McKeown, Glen Gibb, Jad Naous, David Erickson, G. Adam Covington, John W. Lockwood, Jianying Luo, Brandon Heller,
Paul Hartke, Neda Beheshti, Sara Bolouki, James Zeng, Jonathan Ellithorpe, Sachidanandan Sambandan, Eric Lo
AcknowledgmentsNetFPGA Team at Stanford University (Past and Present):
NetFPGA Team at University of Cambridge (Past and Present):
Andrew Moore, David Miller, Muhammad Shahbaz, Martin ZadnikMatthew Grosvenor, Gianni Antichi, Neelakandan Manihatty-Bojan,
Georgina Kalogeridou, Jong Hun Han, Noa Zilberman
All Community members (including but not limited to):
Paul Rodman, Kumar Sanghvi, Wojciech A. Koszek, Yahsar Ganjali, Martin Labrecque, Jeff Shafer,
Eric Keller , Tatsuya Yabe, Bilal Anwer,Yashar Ganjali, Martin Labrecque
Kees Vissers, Michaela Blott, Shep Siegel
Spring Camp 2013 58
Thanks to our Sponsors:
• Support for the NetFPGA project has been provided by the following companies and institutions
Disclaimer: Any opinions, findings, conclusions, or recommendations expressed in these materials do not necessarily reflect the views of the National Science Foundation or of any other sponsors supporting this project.This effort is also sponsored by the Defense Advanced Research Projects Agency (DARPA) and the Air Force Research Laboratory (AFRL), under contract FA8750-11-C-0249. This material is approved for public release, distribution unlimited. The views expressed are those of the authors and do not reflect the official policy or position of the Department of Defense or the U.S. Government.