sv_lab/2_vcs_comp/ReadMe.md
2024-12-23 09:42:14 +08:00

162 lines
3.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# VCS分块编译穿层引用对重用效果的影响
验证问题有不同穿层信号时模块的partition库能否reuse?
结论:**当穿层信号变化时受影响的模块不能reuse**。
## 快速开始
`LAB` :实验序号,可选值[1,2,3,4]
### 第一次编译
```bash
make all LAB=1 GENLIB=1
```
### 第二次编译
```bash
make all LAB=1 GENLIB=0
```
## 实验框架
### 实验一
```mermaid
flowchart LR
tb["testbench1"]
dut["top"]
tb --> dut
dut --> ca
dut ----> cb
dut ------> cc
tb -.第一次.-> namea
tb -.第二次.-> namea
tb -.第二次.-> nameb
tb -.第二次.-> namec
subgraph ca[counter_a]
direction LR
namea["name = counter_a"]
agea["age = 10"]
end
subgraph cb[counter_b]
direction LR
nameb["name = counter_b"]
ageb["age = 11"]
end
subgraph cc[counter_c]
direction LR
namec["name = counter_c"]
agec["age = 12"]
end
```
### 实验二
```mermaid
flowchart LR
tb["testbench2"]
dut["top"]
tb --> dut
dut --> ca
dut ----> cb
dut ------> cc
tb -.第一次.-> namea
tb -.第二次.-> agea
subgraph ca[counter_a]
direction LR
namea["name = counter_a"]
agea["age = 10"]
end
subgraph cb[counter_b]
direction LR
nameb["name = counter_b"]
ageb["age = 11"]
end
subgraph cc[counter_c]
direction LR
namec["name = counter_c"]
agec["age = 12"]
end
```
### 实验三
```mermaid
flowchart LR
tb["testbench3"]
dut["top"]
tb --> dut
dut --> ca
dut ----> cb
dut ------> cc
tb -.第一次.-> namea
tb -.第一次.-> agea
tb -.第二次.-> namea
subgraph ca[counter_a]
direction LR
namea["name = counter_a"]
agea["age = 10"]
end
subgraph cb[counter_b]
direction LR
nameb["name = counter_b"]
ageb["age = 11"]
end
subgraph cc[counter_c]
direction LR
namec["name = counter_c"]
agec["age = 12"]
end
```
### 实验四
```mermaid
flowchart LR
tb["testbench4"]
dut["top"]
tb --> dut
dut --> ca
dut ----> cb
dut ------> cc
tb -.第一次.-> namea
tb -.第二次.-> namea
tb -.第二次.-> agea
subgraph ca[counter_a]
direction LR
namea["name = counter_a"]
agea["age = 10"]
end
subgraph cb[counter_b]
direction LR
nameb["name = counter_b"]
ageb["age = 11"]
end
subgraph cc[counter_c]
direction LR
namec["name = counter_c"]
agec["age = 12"]
end
```
## 结论
| 序号 | 条件 | 现象 | 结论 | 备注 |
| ---- | ----------------------------------------------------- | ------- | ---------------------------- | ---- |
| 1 | 第一次引用a.name 第二次引用a.name/b.name/c.name | b/c重编 | 不同的模块,增加的引用会重编 | |
| 2 | 第一次引用a.name第二次引用a.age | a重编 | 同一个模块,不同引用也会重编 | |
| 3 | 第一次引用a.name/a.age第二次引用a.name | a重编 | 同一个模块,减少引用也会重编 | |
| 4 | 第一次引用a.name第二次引用a.name/a.age | a重编 | 同一个模块,增加引用也会重编 | |
⚠:只要模块的穿层引用发生变化,就会导致该模块重编。
✍官方文档VCSLCAFeatures.pdf第408页也有类似表述Any change in XMRs, trigger recompilation of the referee partition.