Skip to content

Commit

Permalink
first init
Browse files Browse the repository at this point in the history
  • Loading branch information
eraser333 committed May 21, 2024
0 parents commit 2a5477f
Show file tree
Hide file tree
Showing 586 changed files with 40,122 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Sample workflow for building and deploying a Hugo site to GitHub Pages
name: Deploy Hugo site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.126.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
TZ: America/Los_Angeles
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/hugo-book"]
path = themes/hugo-book
url = https://github.com/alex-shpak/hugo-book
Empty file added .hugo_build.lock
Empty file.
5 changes: 5 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
Binary file added assets/figs/Alinx7021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/FPGA_boot_mode_switch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/demo-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/example_topology.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/framework.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/moba_serial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/switch_fabric.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/testbed.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/time_sync_state_machine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/figs/zynq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 152 additions & 0 deletions content/docs/device/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
title: ZIGGO Device
weight: 1000
---
<div align="center">

# ZIGGO Device: A flexible and standard-compliant toolkit for TSN performance evaluation.

</div>

<h3 align="center">
<a href="http://tns.thss.tsinghua.edu.cn/ziggo/">Project Page</a> |
<a href="https://ieeexplore.ieee.org/document/10228980">Paper</a> |
<a href="https://github.com/Mobisense/Ziggo-CaaS-Switch">ZIGGO-CaaS-Switch</a> |
<a href="https://github.com/MobiSense/Ziggo-Device">ZIGGO-Device</a>
</h3>

![](figs/banner.jpg)

## Table of Contents

- [ZIGGO Device: A flexible and standard-compliant toolkit for TSN performance evaluation.](#ziggo-device-a-flexible-and-standard-compliant-toolkit-for-tsn-performance-evaluation)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [ZIGGO Open Platform](#ziggo-open-platform)
- [Demo](#demo)
- [Features](#features)
- [Read before start](#read-before-start)
- [Getting Started](#getting-started)
- [System Design](#system-design)
- [Demo APP Tutorial](#demo-app-tutorial)
- [License and Citation](#license-and-citation)
- [TODO List](#todo-list)
- [Contributing](#contributing)

## Introduction

ZIGGO is a `flexible`, `standard-compliant`, and `control-function-virtualized` TSN switch platform ready for **industrial control**, **automotive electronics**, and other **time-sensitive applications**.

This is the document for the ZIGGO Device. (We also offer [ZIGGO-CaaS-Switch](https://github.com/Mobisense/Ziggo-CaaS-Switch) that comply with the IEEE 802.1 TSN standard.) Our Device supports testing all standards-compliant switches.

## ZIGGO Open Platform

![](./demo-app.png)

The construction of the ZIGGO Open Platform consists of three levels: network device, management tools, and a Demo App:

- The software and hardware projects, along with the development board startup [tutorial](/ZIGGO_WEB/device/getting-started/), provide instructions for setting up an individual network device.

- The [CNC User Manual](docs/cnc-manual.md) and [Device User Manual](/ZIGGO_WEB/device/getting-started/) cover system configuration and management tools.

- Lastly, we offer a comprehensive [Demo App building tutorial](/ZIGGO_WEB/device/testbed/) that instructs how to
collaboratively build a complete and functional Demo using network devices and
management tools.

## Demo

We provide a demonstration video of the TSN switch. It demonstrates the superior performance of the `ZIGGO-CaaS-Switch` compared to the normal switch.

The left side of the picture is the ZYNQ development board we use, and the right side is the TSN display board we built.

[![Watch the video](figs/testbed.jpg)](https://cloud.tsinghua.edu.cn/f/b307da6840d84e5f9ff1/)

> Click the pic to watch the video! Or just click [here](https://cloud.tsinghua.edu.cn/f/b307da6840d84e5f9ff1/).
## Features

* ZIGGO supports the simultaneous transmission of both `Information Technology (IT)` and `Operation Technology (OT)` data traffic with QoS guarantee.

* ZIGGO complies with IEEE standards `802.1AS`, `Qav`, `Qbv`, and `Qcc`.

* ZIGGO provides `Real-time` and `Deterministic` Ethernet transport

* ZIGGO achieve **Zero Packet Loss** , **Microsecond-level Latency** with **Nanosecond-level Jitter Gate Ability**.
* ZIGGO guarantee **Gigabit Throughput**.
* ZIGGO provide gate accuracy applicable to **All Ethernet Frame Sizes**.

## Read before start

Getting started with ZIGGO-CaaS-Switch/ZIGGO-Device is a ***pretty hard*** task. Users/developers need to have sufficient basic knowledge and be prepare to for a long periond of learning and debugging.

Please refer to [basic_knowledge.md](/ZIGGO_WEB/device/basic_knowledge/) to check if you have ability to use ZIGGO competently.

## Getting Started

Please refer to [required.md](/ZIGGO_WEB/device/require/) to get prepared.

After that, please refer to [getting_started.md](/ZIGGO_WEB/device/getting-started/) for the build and run a single ZIGGO Device.

## System Design

ZIGGO is implemented on ZYNQ-7000 SoC and exploits ZYNQ's both hardware and software programmability.

![framework](figs/framework.jpg)

We also provide more in-depth [documentation](/ZIGGO_WEB/device/system-design/) explaining specific design principles for ZIGGO Device.

## Demo APP Tutorial

We also provide a [testbed build document](/ZIGGO_WEB/device/testbed/) that allows you to build a real-time Ethernet system using the ZIGGO swtich and Device.

Through this platform, we can measure the `delay` and `jitter` of TSN time-critcial traffic, the switch's `gating capability`, `bandwidth guarantee` and `gating accuracy`.

Replacing ZIGGO CaaS switches with commercial TSN switches can also test its above capabilities.

## License and Citation

ZIGGO is released under a [MIT license](https://github.com/MobiSense/Ziggo-Device/blob/main/LICENSE.txt).

Please consider citing our papers if the project helps your research with the following BibTex:

```bibtex
@inproceedings{caas,
author={Yang, Zheng and Zhao, Yi and Dang, Fan and He, Xiaowu and Wu, Jiahang and Cao, Hao and Wang, Zeyu and Liu, Yunhao},
booktitle={IEEE INFOCOM 2023 - IEEE Conference on Computer Communications},
title={CaaS: Enabling Control-as-a-Service for Time-Sensitive Networking},
year={2023},
pages={1-10},
doi={10.1109/INFOCOM53939.2023.10228980}}
```

```bibtex
@inproceedings{etsn,
author={Zhao, Yi and Yang, Zheng and He, Xiaowu and Wu, Jiahang and Cao, Hao and Dong, Liang and Dang, Fan and Liu, Yunhao},
booktitle={IEEE ICDCS 2022 - IEEE International Conference on Distributed Computing Systems},
title={E-TSN: Enabling Event-triggered Critical Traffic in Time-Sensitive Networking for Industrial Applications},
year={2022},
volume={},
number={},
pages={691-701},
doi={10.1109/ICDCS54860.2022.00072}}
```

## TODO List

- [x] ZIGGO CaaS Switch Release
- [x] ZIGGO Device Release
- [x] ZIGGO Device Source Code
- [x] Tutorial for build a testbed
- [ ] Test Case for TSN

> We will expand each test in the tutorial to multiple test cases to cover different edge cases and comprehensively test the performance of TSN switches.
- [ ] Support Device List

> At present, we have only tested our own Ziggo switches and are testing other commercial switches (such as Huawei ,H3C and NXP). We expect to maintain a list of test results in the future.
## Contributing

Please see the [guide](/ZIGGO_WEB/device/contributing/) for information on how to ask for help or contribute to the development of ZIGGO!

> The development team will only answer questions on github issues and reject other forms of questions.
Binary file added content/docs/device/basic_knowledge/featured.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions content/docs/device/basic_knowledge/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: 基础知识列表
summary: 使用 ZIGGO-SWITCH/ZIGGO-DEVICE 的基础知识列表
date: 2024-05-01
authors:
- admin
tags:
- TSNPerf
- ZIGGO-Device
- Basic
image:

weight: 980
---
# 基础知识列表
我们再次重申,使用或者开发ZIGGO-CaaS-Switch或者ZIGGO-Device是有较高门槛的,您必须掌握一定的软硬件知识。如果您之间没有任何的硬件开发经验,您可能需要慎重考虑自己是否适合这个项目,因为学习这些知识是非常花时间的。

学习使用ZIGGO项目比学习FPGA、MCU、ARM等传统开发工具要求更高,想如臂指使一般地使用ZIGGO设备也不是一蹴而就的事情。

如果您希望使用ZIGGO项目,您至少应该有以下知识:

## 硬件知识

* 计算机组成原理
* C语言
* 数字电路基础
* Verilog、VHDL语言
* 良好的英语阅读基础

## 软件知识

* 计算机组成原理
* 计算机网络
* 计算机操作系统
* C、C++语言
* tcl脚本
* 良好的英语阅读基础
Binary file added content/docs/device/cnc_manual/featured.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 103 additions & 0 deletions content/docs/device/cnc_manual/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
title: CNC脚本使用指南
summary: 使用CNC脚本运行ZIGGO系统的7步指南
date: 2024-05-01
authors:
- admin
tags:
- CNC
- ZIGGO-Device
- Basic
weight: 988
---
# CNC脚本使用指南
## 1. 运行脚本前,在batch.mjs中要配置好以下变量:

```javascript
// IP address format: 192.168.137.*
// 测试数据
const conf_default = "<需要执行的配置名称>"
// 时钟主节点
const master = 40

const hosts = {
device: [43, 44],
switch: [40, 41],
}
```
```
安装好需要的依赖:
```bash
sudo npm install -g [email protected]
pip install -r requirements.txt
npm install
```

配置好环境变量,在.bashrc中加入:

```bash
export PYTHONPATH="/home/<用户名>/scripts"
```

## 2. 下载好Switch和TSNPerf的软件代码

> (记得提前配置好树莓派和所有板子之间的ssh public key,方便免密登录)

```bash
./batch.mjs clone
```

## 3. 拉取最新的软件代码并同步到远程板子上

> 默认时master分支,如果需要指定分支,需要修改batch.mjs文件中的pull()函数,具体参考注释的部分

```javascript
// pull all the latest code
const pull = async () => {
cd(`${os.homedir()}/repos`)
// 如果需要指定分支,类似下面指定qbv-test分支的操作
// await $`cd pkt_gen_app; git stash; git checkout qbv-test; git pull origin qbv-test; cd ..`
// await $`cd time_sync_app; git stash; git checkout qbv-test; git pull origin qbv-test; cd ..`
await Promise.all(hosts.all.map(host => {
const type = hosts.device.includes(host) ? 'device' : 'switch'
if (type === 'device') {
return $`rsync -avPh ${os.homedir}/repos/pkt_gen_app root@192.168.137.${host}:~/`
} else if (type === 'switch') {
return $`rsync -avPh ${os.homedir}/repos/time_sync_app root@192.168.137.${host}:~/;`
}
}))
}
```

同步到所有板子上:

```bash
./batch.mjs pull
```

## 4. 使远程所有板子编译代码

```bash
./batch.mjs build
```

## 5. 将配置文件下发到所有板子上

```bash
./batch.mjs distribute
```

## 6. 开始启动所有板子的程序

```bash
./batch.mjs launch
```

## 7. 收集延迟和抖动的统计信息

```bash
./batch.mjs collect
```
Binary file added content/docs/device/contributing/featured.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2a5477f

Please sign in to comment.