DREAMPlace的json数据讲解
时间: 2023-06-02 13:02:34 浏览: 85
DREAMPlace是一个开源的芯片布局布线工具,其json数据文件用于描述电路设计中的物理布局和布线,其结构如下:
```json
{
"dieArea": [
[x1, y1],
[x2, y2]
],
"tracks": [
{
"layer": "M1",
"start": 0,
"num": 20,
"step": 2,
"origin": [0, 0]
},
{
"layer": "M2",
"start": 0,
"num": 10,
"step": 1,
"origin": [0, 0]
}
],
"gcells": [
{
"id": 0,
"lx": 0,
"ly": 0,
"width": 10,
"height": 10,
"site": 0,
"orient": "N"
},
{
"id": 1,
"lx": 0,
"ly": 10,
"width": 10,
"height": 10,
"site": 0,
"orient": "N"
}
],
"nets": [
{
"name": "net1",
"connected_pins": [
{
"id": 0,
"node": 0
},
{
"id": 1,
"node": 0
}
],
"weight": 1
},
{
"name": "net2",
"connected_pins": [
{
"id": 2,
"node": 0
},
{
"id": 3,
"node": 0
}
],
"weight": 1
}
],
"pins": [
{
"id": 0,
"net_id": 0,
"gcell_id": 0,
"layer": "M1",
"orient": "N",
"pos": [0, 0]
},
{
"id": 1,
"net_id": 0,
"gcell_id": 1,
"layer": "M1",
"orient": "N",
"pos": [0, 10]
},
{
"id": 2,
"net_id": 1,
"gcell_id": 0,
"layer": "M1",
"orient": "N",
"pos": [10, 0]
},
{
"id": 3,
"net_id": 1,
"gcell_id": 1,
"layer": "M1",
"orient": "N",
"pos": [10, 10]
}
]
}
```
其中,`dieArea`表示芯片的边界框;`tracks`表示布线的水平或垂直轨道;`gcells`表示物理单元格,即芯片中的基本单位;`nets`表示电路中的连线;`pins`表示端口,即与外部连接的引脚。
`tracks`中的每个元素包含以下属性:
- `layer`: 轨道所在的层,如M1、M2等;
- `start`: 轨道的起始索引;
- `num`: 轨道数量;
- `step`: 轨道之间的间距;
- `origin`: 轨道的坐标原点。
`gcells`中的每个元素包含以下属性:
- `id`: 单元格的唯一标识符;
- `lx`: 单元格左下角的x坐标;
- `ly`: 单元格左下角的y坐标;
- `width`: 单元格的宽度;
- `height`: 单元格的高度;
- `site`: 单元格所在的站点;
- `orient`: 单元格的方向。
`nets`中的每个元素包含以下属性:
- `name`: 连线的名称;
- `connected_pins`: 连线所连接的引脚;
- `weight`: 连线的权重。
`pins`中的每个元素包含以下属性:
- `id`: 引脚的唯一标识符;
- `net_id`: 引脚所连接的连线;
- `gcell_id`: 引脚所在的单元格;
- `layer`: 引脚所在的层;
- `orient`: 引脚的方向;
- `pos`: 引脚的坐标。