Skip to content

Contrib. Project: Reference_emu

Salvator Galea edited this page Jul 12, 2021 · 1 revision

Reference_emu

Reference_emu is a contrib-project implemented on the NetFPGA-SUME platform, using kiwi.
Kiwi is a High-Level Synthesis (HLS) system that primarily generates FPGA designs from C# source code. Kiwi was a collaborative project between the University of Cambridge Computer Laboratory and Microsoft Research Limited, headed by David Greaves (UoCCL) and Satnam Singh (MRL).
The main idea behind the reference_emu contrib-project, is to replace the Output Port Lookup logic of the NetFPGA's reference datapath with the generated verilog code of the kiwi compiler (kiwic). In other words, you will program in C# and you will have your hardware design.

The reference_emu contrib-project has been set up based on the reference_nic project and supports currently 3 designs:

  1. emu_icmp_echo (ICMP echo-responder)
  2. emu_memcached_binary (Memcached Server, UDP, binary protocol, SET/GET/DELETE) *CAM is required
  3. emu_memcached_ascii (Memcached Server, UDP, ascii protocol, SET/GET/DELETE) *CAM is required

Each of these projects has been implemented in C# and have been compiled with the kiwic.
The C# source code and the generated verilog code is located under this directory.

Project Setup

Before start the emu_reference project, you need to setup the basic configurations of the NetFPGA SUME platform. Please refer to Reference Operating System Setup Guide and Projects.

  1. Edit and source the settings.sh and Vivado tool chain.
  2. Make the standard (std) cores.
  • cd $SUME_FOLDER
  • make
  1. Prepare the emu_output_port_lookup_v1_0_0
    cd $SUME_FOLDER/lib/hw/contrib/cores/emu_output_port_lookup_v1_0_0/
  • emu_icmp_echo
    Modify the emu_output_port_lookup.tcl, comment lines 132-133 (CAM IP core instatiation).
    Modify the emu_output_port_lookup.v, comment lines 250-263 (CAM module).
    cp hdl/emu_icmp_echo.v hdl/Emu.v
  • emu_memcached_binary, emu_memcached_ascii
    Install the CAM.
    Modify the emu_output_port_lookup.tcl, uncomment lines 132-133 (CAM IP core instatiation).
    Modify the emu_output_port_lookup.v, uncomment lines 250-263 (CAM module).
    cp hdl/emu_memcached_binary.v hdl/Emu.v or cp hdl/emu_memcached_ascii.v hdl/Emu.v
  • cd make

Simulation

  • emu_icmp_echo
    $SUME_FOLDER/tools/scripts/nf_test.py sim --major icmp --minor echo
  • emu_memcached_binary, emu_memcached_ascii
    $SUME_FOLDER/tools/scripts/nf_test.py sim --major memcached --minor binary
    $SUME_FOLDER/tools/scripts/nf_test.py sim --major memcached --minor ascii

Hardware

  • emu_icmp_echo
    $SUME_FOLDER/tools/scripts/nf_test.py hw --major icmp --minor echo
  • emu_memcached_binary, emu_memcached_ascii
    $SUME_FOLDER/tools/scripts/nf_test.py hw --major memcached --minor binary
    $SUME_FOLDER/tools/scripts/nf_test.py hw --major memcached --minor ascii

OR follow this guide.

Clone this wiki locally