Skip to content

Commit

Permalink
done with noc
Browse files Browse the repository at this point in the history
  • Loading branch information
RockyQLuo committed Oct 12, 2024
1 parent bbccb78 commit d72b903
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ CURRENT_TIME := $(shell date "+%Y-%m-%d %H:%M:%S")
commit ?="update at $(CURRENT_TIME)"

push:
cp -rf /Users/qluo/gits/notebook/notebook/image /Users/qluo/gits/RockyQLuo.github.io/assets/img
#cp -rf /Users/qluo/gits/notebook/notebook/image /Users/qluo/gits/RockyQLuo.github.io/assets/img
git add .
git commit -m "$(commit)"
git push
help:
@echo "make commit=xxx"
@echo "make commit=xxx"
5 changes: 4 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ defaults:
values:
layout: page
permalink: /:title/

- scope:
path: assets/img/favicons
values:
swcache: true
sass:
style: compressed

Expand Down
38 changes: 36 additions & 2 deletions _posts/协议类/2024-10-11-noc.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ _缓冲区和VC组织结构_
上述的VC受调度影响,可能VC0一直full但另一个VC经常空闲。为此,出现了每个 VC 队列可以是可变长度的,共享一个大缓冲区 ,这允许更好的缓冲区利用率,但代价是更复杂的电路来跟踪队列的头部和尾部。此外,为避免死锁,需要为每个 VC 保留一个 flit 缓冲区,以便其他 VC 不会填满整个共享缓冲区并耗尽 VC,从而确保前进进度。[buffers数量参考这里](#BufferBackpressure)
> Beyond that, for sustaining full throughput, there needs to be a minimum number of buffers (within each VC or in total, depending on the buffer organization) to cover the buffer turnaround time
{: .prompt-warning }
### 5.2 输入VC状态
#### 输入VC状态
每个VC都和其中flit的以下状态有关:
1. 全局状态(Global, G)
* Idle(空闲):VC 当前未被使用。
Expand All @@ -122,7 +122,7 @@ _缓冲区和VC组织结构_
Active 状态的VC可以请求交换机的访问权限,以传输其 flit。
2. 路由信息(Route, R)
<font color="#d99694">Output port for the packet,用于交换分配(Switch Allocation),决定 flit 将被发送到哪个输出端口。</font>
* 头 flit 在路由计算阶段确定输出端口,并将此信息存储在 R 字段中。这里的路由终点分配有多种设计考虑:1️⃣使用预见路由(lookahead routing)或源路由(source routing)的设计中,头 flit 在到达当前路由器时已经携带了目标输出端口信息。2️⃣路由计算器将计算(或查找)当前数据包的输出端口
头 flit 在路由计算阶段确定输出端口,并将此信息存储在 R 字段中。这里的路由终点分配有多种设计考虑:1️⃣使用预见路由(lookahead routing)或源路由(source routing)的设计中,头 flit 在到达当前路由器时已经携带了目标输出端口信息。2️⃣路由计算器将计算(或查找)当前数据包的输出端口
3. 输出 VC(Output VC, O)
<font color="#d99694">该数据包在下游路由器中使用的 VC</font>
在 VC 分配后由头 flit 填充,供该数据包的所有后续 flit 使用,确保整个数据包通过相同的路径和 VC 传输。
Expand Down Expand Up @@ -150,3 +150,37 @@ Each Virtual Channel is associated with the following state for flits sitting in
5️⃣Pointers (P ): Pointers to head and tail flits. This is required if buffers are implemented as a shared pool of multiple variable-length queues, as described above.
</details>

### 5.2 开关设计
路由器的crossbar开关是路由器数据通路的核心部分,将数据从输入端口移动到输出端口。大多数低频路由器使用下面这种很简单粗暴的crossbar
![5-2]({{ page.img_path }}xbar.png){: width="972" height="589" }
当频率要求更高时,下面展示了5x5的crossbar
![5-3]({{ page.img_path }}5-3.png){: width="972" height="589" }
> 这里我不是很明白,可能得看看相关代码
{: .prompt-danger }
### 5.3 分配器与仲裁器
VC分配器(VA):将VC分配给数据包或flit,即找到输出端口的VC(即下一个路由器输入端口的VC)
Switch Allocator(交换机分配器):将crossbar端口分配给VC
> 在大多数NoC中,路由器的分配逻辑决定了周期时间,因此分配器和仲裁器必须是快速的,并且是流水线的,以便在高时钟频率下工作。
{: .prompt-tip }
#### 仲裁器
1. RRArb:If Granti is high, PriorityiC1 becomes high in the next cycle and all other priorities become low.理解成一个指针每次仲裁完了+1
![5-4]({{ page.img_path }}5-4.png){: width="972" height="589" }
2. 矩阵仲裁
![5-5]({{ page.img_path }}5-5.png){: width="972" height="589" }
#### 分离式分配器
为了降低分配器的复杂度,并使其流水化,分配器可以被构建为多个仲裁器的组合。
![5-6]({{ page.img_path }}5-6.png){: width="972" height="589" }
_三个请求者,四个资源的分配器设计_
>还有更多分配器请查看原文
{: .prompt-tip }
### 5.4 VC路由器的逻辑流水线
1️⃣(BW)head flit到达一个输入端口时,首先<font color="#d99694">根据其输入的VC在BW级进行解码并放入缓冲区</font>
2️⃣(RC)RC级路由逻辑进行计算以<font color="#d99694">确定包的输出端口</font>
3️⃣(VA)head flit在VA级进行仲裁,<font color="#d99694">找到输出端口的VC(即下一个路由器输入端口的VC)</font>
4️⃣(SA)进入SA级,对switch的输入和输出端口进行仲裁
5️⃣(ST)遍历crossbar
6️⃣(LT),该flit被传送到下一个节点
>body和tail flit遵循类似的流水线,但不会经过RC和VA级。而是直接继承header flit分配的路由和VC,tail flit在离开路由器时,会移除head flit保留的VC
{: .prompt-tip }
下图中介绍了几种优化措施,具体见原文page91
![5-7]({{ page.img_path }}5-7.png){: width="972" height="589" }
Binary file added assets/img/image/5-3.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/img/image/5-4.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/img/image/5-5.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/img/image/5-6.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/img/image/5-7.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/img/image/xbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d72b903

Please sign in to comment.