Skip to content

Commit fe31ad7

Browse files
authored
Merge pull request #2637 from Wang-Yuanqi-source/patch-1
[WIP] VIB Upgrades for Tileable Routing Resource Graph on OpenFPGA
2 parents 8178b71 + b96878a commit fe31ad7

File tree

79 files changed

+280540
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+280540
-104
lines changed

doc/src/Images/VIB.png

14.9 KB
Loading

doc/src/Images/bent_wires.png

356 KB
Loading

doc/src/Images/double-level.png

11.1 KB
Loading

doc/src/vpr/VIB.rst

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
.. _VIB:
2+
3+
VIB
4+
============
5+
The VIB architecture adds modeling support for double-level MUX topology and bent wires.
6+
7+
.. figure:: ../Images/VIB.png
8+
:align: center
9+
:height: 300
10+
11+
VIB architecture. The connections between the inputs and outputs of the LB and the routing wires are all implemented within the VIB.
12+
13+
.. figure:: ../Images/double-level.png
14+
:align: center
15+
16+
Double-level MUX topology.
17+
18+
.. figure:: ../Images/bent_wires.png
19+
:align: center
20+
21+
Presentation for bent wires.
22+
23+
FPGA Architecture File Modification (.xml)
24+
--------------------------
25+
For original tags of FPGA architecture file see :ref:`fpga_architecture_description`.
26+
27+
Modification for ``<segmentlist>`` Tag
28+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29+
The content within the ``<segmentlist>`` tag consists of a group of ``<segment>`` tags.
30+
The ``<segment>`` tag and its contents are described below.
31+
32+
.. arch:tag:: <segment axis="{x|y}" name="unique_name" length="int" type="{bidir|unidir}" res_type="{GCLK|GENERAL}" freq="float" Rmetal="float" Cmetal="float">content</segment>
33+
34+
:req_param content:
35+
The switch names and the depopulation pattern as described below.
36+
37+
.. arch:tag:: <sb type="pattern">int list</sb>
38+
39+
.. arch:tag:: <cb type="pattern">int list</cb>
40+
41+
.. arch:tag:: <mux name="string"/>
42+
43+
For bent wires, a new content ``<bent>`` is added in the ``<segment>`` tag.
44+
45+
.. arch:tag:: <cb type="pattern">bent pattern list</cb>
46+
47+
This tag describes the bent pattern for this particular wire segment.
48+
For example, a length 4 wire has a bent pattern of ``- - U``.
49+
A ``-`` indicates no bent at this position and a ``U`` indicates a conterclockwise bent at the position. (``D`` indicates a clockwise bent.)
50+
51+
.. note:: A bent wire should remain consistent in both the x and y axes.
52+
53+
New Added Top Level Tag ``<vib_arch>``
54+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55+
The content within the ``<vib_arch>`` tag consists of a group of ``<vib>`` tags. Different ``<vib>`` tags describe the paradigms of VIB, which apply to different positions.
56+
57+
.. arch:tag:: <vib name="vib_name" pbtype_name="pbtype_name" vib_seg_group="int" arch_vib_switch="string">content</vib>
58+
59+
:req_param name:
60+
A unique alphanumeric name to identify this VIB type.
61+
62+
:req_param pbtype_name:
63+
The name of the block type (e.g. clb, memory) that this VIB connects to.
64+
65+
:req_param vib_seg_group:
66+
The number of the segment types in this VIB.
67+
68+
:req_param arch_vib_switch:
69+
Name of the mux switch type used to drive wires in the VIB by default, and a custom switch can override this switch type for specific connections if desired.
70+
71+
:req_param content:
72+
The segment groups and the multistage MUX topology as described below.
73+
74+
The ``content`` of ``<vib>`` tag consists of several ``<seg_group>`` tags and a ``<multistage_muxs>`` tag.
75+
For example:
76+
77+
.. code-block:: xml
78+
79+
<vib_arch>
80+
<vib name="vib0" pbtype_name="clb" vib_seg_group="4" arch_vib_switch="mux0">
81+
<seg_group name="L1" track_nums="12"/>
82+
<seg_group name="L2" track_nums="20"/>
83+
<seg_group name="L4" track_nums="16"/>
84+
<seg_group name="L8" track_nums="16"/>
85+
<multistage_muxs>
86+
<first_stage switch_name="mux0">
87+
...
88+
</first_stage>
89+
<second_stage>
90+
...
91+
</second_stage>
92+
</multistage_muxs>
93+
</vib>
94+
<vib name="vib1" pbtype_name="dsp" vib_seg_group="4" arch_vib_switch="mux0">
95+
...
96+
</vib>
97+
</vib_arch>
98+
99+
.. arch:tag:: <seg_group name="seg_name" track_nums="int"/>
100+
101+
:req_param name:
102+
The name of the segment in this VIB described in ``<segmentlist>``.
103+
104+
:req_param track_nums:
105+
The track number of the segment in this VIB.
106+
107+
.. note:: When using unidirectional segments, the track number of the segment represents the number for one direction. For example, the ``track_nums`` is ``10``, which means total ``20`` tracks of the segment in the channel for both (INC & DEC) directions.
108+
109+
.. arch:tag:: <multistage_muxs>content</multistage_muxs>
110+
111+
:req_param content:
112+
The detaild information for first and second MUXes.
113+
114+
The ``content`` of ``<multistage_muxs>`` tag consists of a ``<first_stage>`` tag and a ``<secong_stage>`` tag.
115+
116+
.. arch:tag:: <first_stage switch_name="switch_name">content</first_stage>
117+
118+
:req_param switch_name:
119+
Name of the mux switch type used to drive first stage MUXes in the VIB.
120+
121+
:req_param content:
122+
The details of each MUX.
123+
124+
For example:
125+
126+
.. code-block:: xml
127+
128+
<first_stage switch_name="mux0">
129+
<mux name="f_mux_0">
130+
<from>clb.O[0] clb.O[8] clb.O[12:16]</from>
131+
</mux>
132+
<mux name="f_mux_1">
133+
<from>L1.E2 L1.W2 L1.S8 L1.N8</from>
134+
</mux>
135+
...
136+
</first_stage>
137+
138+
The ``<from>`` tag in ``<mux>`` describes nodes that connects to the MUX. ``clb.O[*]`` means output pin(s); ``L1.E2`` means the track ``2`` in the ``East`` direction of ``L1`` segment.
139+
140+
.. arch:tag:: <second_stage>content</second_stage>
141+
142+
:req_param content:
143+
The details of each MUX.
144+
145+
For example:
146+
147+
.. code-block:: xml
148+
149+
<second_stage switch_name="mux0">
150+
<mux name="s_mux_0">
151+
<to>clb.I[0]</to>
152+
<from>clb.O[0] clb.O[8] f_mux_0</from>
153+
</mux>
154+
<mux name="s_mux_1">
155+
<to>L1.S1</to>
156+
<from>L1.E1 L1.W1 f_mux_0 f_mux_1</from>
157+
</mux>
158+
...
159+
</second_stage>
160+
161+
The ``<to>`` tag describes the node this MUX connects to. ``clb.I[*]`` means input pin(s); ``L1.S1`` means the track ``1`` in the ``South`` direction of ``L1`` segment. The ``<from>`` tag in ``<mux>`` describes nodes that connects to the MUX. ``clb.O[*]`` means output pin(s); ``L1.E2`` means the track ``2`` in the ``East`` direction of ``L1`` segment. ``f_mux_0`` means the name of the specific first stage MUX.
162+
163+
New Added Top Level Tag ``<vib_layout>``
164+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165+
Content inside this tag specifies VIB grid layout to describe different VIBs applied on different locations.
166+
167+
.. arch:tag:: <fixed_layout name="string">content</fixed_layout>
168+
169+
:req_param name:
170+
The name identifying this VIB grid layout. It should be the same as the corresponding layout name inside the ``<layout>`` tag.
171+
172+
:req_param content:
173+
The content should contain a set of grid location tags. For grid location tags of vib_layout see :ref:`fpga_architecture_description`; ref:`grid_expressions`

doc/src/vpr/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ The purpose of VPR is to make the packing, placement, and routing stages of the
6060

6161
file_formats
6262
debug_aids
63+
64+
VIB

libs/libarchfpga/src/physical_types.h

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
#include "logic_types.h"
4848
#include "clock_types.h"
4949

50+
#include "vib_inf.h"
51+
5052
//Forward declarations
5153
struct t_clock_arch;
5254
struct t_clock_network;
@@ -1629,7 +1631,16 @@ enum e_Fc_type {
16291631
* For backward compatibility, this attribute is optional. If not *
16301632
* specified, the resource type for the segment is considered to *
16311633
* be GENERAL. *
1632-
* meta: Table storing extra arbitrary metadata attributes. */
1634+
* meta: Table storing extra arbitrary metadata attributes. *
1635+
*
1636+
*
1637+
* New added parameters for bend wires: *
1638+
* isbend: This segment is bend or not *
1639+
* bend: The bend type of the segment, "-"-0, "U"-1, "D"-2 *
1640+
* For example: bend pattern <- - U ->; corresponding bend: [0,0,1,0] *
1641+
* part_len: Divide the segment into several parts based on bend position. *
1642+
* For example: length-5 bend segment: <- - U ->; *
1643+
* Corresponding part_len: [3,2] */
16331644
struct t_segment_inf {
16341645
std::string name;
16351646
int frequency;
@@ -1648,6 +1659,9 @@ struct t_segment_inf {
16481659
enum e_parallel_axis parallel_axis;
16491660
std::vector<bool> cb;
16501661
std::vector<bool> sb;
1662+
bool isbend;
1663+
std::vector<int> bend;
1664+
std::vector<int> part_len;
16511665
int seg_index;
16521666
enum SegResType res_type = SegResType::GENERAL;
16531667
//float Cmetal_per_m; /* Wire capacitance (per meter) */
@@ -2048,7 +2062,9 @@ struct t_noc_inf {
20482062
std::string noc_router_tile_name;
20492063
};
20502064

2051-
/* Detailed routing architecture */
2065+
2066+
2067+
/* Detailed routing architecture */
20522068
struct t_arch {
20532069
/** Stores unique strings used as key and values in <metadata> tags,
20542070
* i.e. implements a flyweight pattern to save memory.*/
@@ -2133,10 +2149,16 @@ struct t_arch {
21332149
//If the layout is not specified in the command line options, this variable will be set to "auto"
21342150
std::string device_layout;
21352151

2152+
std::vector<t_vib_grid_def> vib_grid_layouts;
2153+
21362154
t_clock_arch_spec clock_arch; // Clock related data types
21372155

21382156
/// Stores NoC-related architectural information when there is an embedded NoC
21392157
t_noc_inf* noc = nullptr;
2158+
2159+
// added for vib
2160+
//bool is_vib_arch = false;
2161+
std::vector<VibInf> vib_infs;
21402162
};
21412163

21422164
#endif

0 commit comments

Comments
 (0)