Skip to content
Snippets Groups Projects
Commit 8e01a8ea authored by David Sidler's avatar David Sidler
Browse files

merge

parents 0c774c1a ba6f242f
No related branches found
No related tags found
Loading
# TCP/IP Stack Design Using Vivado HLS
TCP/IP Stack Design Using Vivado HLS
======================================
## Getting Started
### Prerequisites
- Xilinx Vivado 2018.1
- License for Xilinx 10G MAC IP
- Linux OS
Supported boards (out of the box)
- Xilinx VC709
- Xilinx VCU118
- Alpha Data ADM-PCIE-7V3
### Installation
Make sure that Vivado and Vivado HLS are in your PATH. Use version 2018.1
Navigate to the _hls_ directory:
cd hls
Execute the script generate the HLS IP cores for your board:
./generate_hls vc709
For the VCU118 run
./generate_hls vcu118
Navigate to the _projects_ directory:
cd ../projects
Create the example project for your board.
For the Xilinx VC709:
vivado -mode batch -source create_vc709_proj.tcl
For the Alpha DATA ADM-PCIE-7V3:
vivado -mode batch -source reate_adm7v3_proj.tcl
For the Xilinx VCU118:
vivado -mode batch -source create_vcu118_proj.tcl
After the previous command executed, a Vivado project will be created and the Vivado GUI is started.
Click "Generate Bitstream" to generate a bitstream for the FPGA.
## Testing the example project
The default configuration deploys a TCP echo server and a UDP iperf client. The default IP address the board is 10.1.212.209. Make sure the testing machine conencted to the FPGA board is in the same subnet 10.1.212.*
As an intial connectivity test ping the FPGA board by running
ping 10.1.212.209
After reprogramming the FPGA the first ping message is lost due to a missing ARP entry in the ARP table. However, the FPGA should reply to all following ping messages.
For the TCP echo server you can use netcat:
echo 'hello world' | netcat -q 1 11.1.212.209 7
Alternatively, you can use the _echoping_ linux commandline tool.
For the TCP and UDP iperf test, see [here](http://github.com/dsidler/fpga-network-stack/wiki/iPerf-Benchmark).
## Configuration
Coming soon
## Publications
- D. Sidler, G. Alonso, M. Blott, K. Karras et al., *Scalable 10Gbps
TCP/IP Stack Architecture for Reconfigurable Hardware,* in FCCM’15, [Paper](http://davidsidler.ch/files/fccm2015-tcpip.pdf), [Slides](http://fccm.org/2015/pdfs/M2_P1.pdf)
- D. Sidler, Z. Istvan, G. Alonso, *Low-Latency TCP/IP Stack for Data Center Applications,* in FPL'16, [Paper](http://davidsidler.ch/files/fpl16-lowlatencytcpip.pdf)
## Citation
If you use the TCP/IP stack in your project please cite one of the following papers and/or link to the github project:
```
@INPROCEEDINGS{sidler2015tcp,
author={D. Sidler and G. Alonso and M. Blott and K. Karras and others},
booktitle={FCCM'15},
title={{Scalable 10Gbps TCP/IP Stack Architecture for Reconfigurable Hardware}},
}
@INPROCEEDINGS{sidler2016lowlatencytcp,
author={D. Sidler and Z. Istvan and G. Alonso},
booktitle={FPL'16},
title={{Low-Latency TCP/IP Stack for Data Center Applications}},
}
```
For more information please visit the [wiki](http://github.com/dsidler/fpga-network-stack/wiki)

$IP_CORES = "ip_handler", "mac_ip_encode", "arp_server_subnet", "icmp_server", "toe", "echo_server_application", "ethernet_frame_padding", "iperf_client", "udp", "ipv4", "iperf_udp_client", "dhcp_client"
$HLS_DIR = $PSScriptRoot
if ($args.Count -eq 1) {
if ($args.Get(0) -eq "vc709") {
$PART = "xc7vx690tffg1761-2"
Write-Output "Compiling for $PART"
}
elseif ($args.Get(0) -eq "vcu118") {
$PART = "xcvu9p-flga2104-2L-e"
Write-Output "Compiling for $PART"
}
else {
Write-Output "Part not supported!"
exit
}
}
else {
Write-Output "Argument missing!"
exit
}
$IP_REPO = "$HLS_DIR\..\iprepo"
if (!(Test-Path -Path $IP_REPO)){
mkdir $IP_REPO
Write-Output "IP repo created at $IP_REPO!"
}
foreach ($IP in $IP_CORES) {
Write-Output "---------------------------------------------"
Write-Output "Compiling for $IP"
Write-Output "---------------------------------------------"
$TCL_FILE = "$HLS_DIR\" + $IP + "\run_hls.tcl"
if ([System.IO.File]::Exists($TCL_FILE)) {
$NEW_LINE = "set_part {" + $PART + "}"
$regex = 'set_part {.*}'
(Get-Content $TCL_FILE) -replace $regex, $NEW_LINE | Set-Content $TCL_FILE
Set-Location "$HLS_DIR\$IP"
&vivado_hls -f run_hls.tcl
if (!(Test-Path -Path "$IP_REPO\$IP")){
mkdir "$IP_REPO\$IP"
}
else {
Remove-Item -LiteralPath "$IP_REPO\$IP" -Force -Recurse
mkdir "$IP_REPO\$IP"
}
$ZIP_PATH = "$HLS_DIR\$IP\$IP" + "_prj\solution1\impl\ip"
$FILES = Get-ChildItem $ZIP_PATH -Filter *.zip
if ($FILES.Count -eq 1){
Write-Output $files[0].FullName
$OUTDIR = "$IP_REPO\$IP\" + [io.path]::GetFileNameWithoutExtension($files[0].FullName)
mkdir $OUTDIR
Expand-Archive $files[0].FullName -DestinationPath $OUTDIR
}
else {
Write-Output "The output .zip file for $IP could not be found!"
Write-Output "Did the build fail?"
}
}
else {
Write-Output "No .tlc file were found for the IP!"
Write-Output "The IP will not be generated"
Write-Output "The expected path was $TCL_FILE"
}
}
Write-Output "Generated and copied all HLS IPs to ip repository."
Write-Output "Go to the projects directory and run vivado -mode batch -source create_<board>_proj.tcl to create the vivado project"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment