• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

p4fpga/p4fpga: P4-14/16 Bluespec Compiler

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

p4fpga/p4fpga

开源软件地址:

https://github.com/p4fpga/p4fpga

开源编程语言:

Bluespec 66.6%

开源软件介绍:

Build Status

Join P4FPGA email list:

https://groups.google.com/forum/#!forum/p4fpga-dev

As a member of P4FPGA-dev, you can send support requests to p4fpga-dev@googlegroups.com

Bootstrap environment

bash bootstrap_env.sh

Build P4FPGA from Source

git submodule update --init --recursive
bash bootstrap.sh
cd build
make -j8

Generated Bluespec Organization

Main.bsv : contains top level module for connectal framework.

  • Runtime.bsv
  • Program.bsv

Board.bsv : contains runtime environment for p4 program

  • PHY + MAC

Channels.bsv : contains various in/out channels to pipeline

  • RxChannel : uses Parser.bsv
  • TxChannel : uses Deparser.bsv
  • DMAChannel/HostChannel : uses Parser.bsv
  • ReEntryChannel : uses Parser.bsv
  • DropChannel
  • StreamingChannel
  • PktGenChannel
  • PktCapChannel

Memory.bsv :

  • Shared memory (optional)

Program.bsv : contains p4 program according to architecture specification in arch.p4

  • Stream Arbitration (maybe part of program.bsv)
  • Stream Demultiplexer (maybe part of program.bsv)
  • Control.bsv
  • Table.bsv
  • Action.bsv

Parser.bsv : contains parser implementation

  • parser is usually instantiated on a per-port basis, to ensure scalability
  • current implementation uses 128-bit datapath width @ 250 MHz

Deparser.bsv : contains deparser implementation

  • current implementation uses 128-bit datpath width @ 250 MHz

Control.bsv : contains control flow and pipeline implementation

  • instantiate p4 table and action engine
  • connect table and action engine according to control flow

Table.bsv :

  • per P4 table instance
  • include simulation model for match table

Action.bsv :

  • per P4 action instance
  • include ALU / Bluespec operator / DSP-based action engine

Compiler Organization

backend.cpp:

  • entry point to fpga backend
  • translate IR::TopLevelBlock to FPGA program
  • generate Top.bsv
  • Top : Platform, Runtime, Pipeline, API

channel.cpp :

  • generate Channel.bsv
  • Supported channels: RxChannel, TxChannel, DMAChannel, ReEntryChannel*, DropChannel*, PktGenChannel, PktCapChannel

program.cpp :

  • generate Program.bsv
  • Program(arch, runtime)

pipeline.cpp :

  • generate Pipeline.bsv based on arch.p4
  • arch specifies sequence of parser, deparser and control blocks
  • v1model : parser -> ingress -> egress -> deparser

control.cpp :

  • generate Control.bsv
  • Control.bsv contain Ingress and Egress
  • Ingress/Egress implement control flow for tables and actions
  • Table/action can be empty to evaluate cost of pipeline.

table.cpp :

  • implement p4 table (bcam, tcam)

action.cpp :

  • implement p4 action
  • dsp optimizes arithmetic and logic operations
  • bluespec operator implement boolean operations



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
fffaraz/awesome-cpp: A curated list of awesome C++ (or C) frameworks, libraries, ...发布时间:2022-04-20
下一篇:
microsoft/compiler-rt发布时间:2022-04-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap