Skip to content

Commit d61831e

Browse files
authored
Merge branch 'master' into flat_router_test
2 parents 171ab85 + 8d119de commit d61831e

19 files changed

+310
-26
lines changed

doc/src/api/vprinternals/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ VPR INTERNALS
99
draw_structs
1010
vpr_ui
1111
draw_files
12+
vpr_noc
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
==============
2+
NoC Data Types
3+
==============
4+
5+
Data Types
6+
----------
7+
.. doxygenfile:: noc_data_types.h
8+
:project: vpr

doc/src/api/vprinternals/noc_link.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
========
2+
NoC Link
3+
========
4+
5+
NocLink
6+
-------
7+
.. doxygenfile:: noc_link.h
8+
:project: vpr
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
==========
2+
NoC Router
3+
==========
4+
5+
NocRouter
6+
---------
7+
.. doxygenfile:: noc_router.h
8+
:project: vpr
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
===========
2+
NoC Routing
3+
===========
4+
5+
NocRouting
6+
---------------
7+
.. doxygenfile:: noc_routing.h
8+
:project: vpr
9+
10+
NocRoutingAlgorithmCreator
11+
--------------------------
12+
.. doxygenfile:: noc_routing_algorithm_creator.h
13+
:project: vpr
14+
15+
XYRouting
16+
---------
17+
.. doxygenfile:: xy_routing.h
18+
:project: vpr
19+
20+
BFSRouting
21+
----------
22+
.. doxygenfile:: bfs_routing.h
23+
:project: vpr
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
===========
2+
NoC Storage
3+
===========
4+
5+
NocStorage
6+
----------
7+
.. doxygenfile:: noc_storage.h
8+
:project: vpr
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
=================
2+
NoC Traffic Flows
3+
=================
4+
5+
NocTrafficFlows
6+
---------------
7+
.. doxygenfile:: noc_traffic_flows.h
8+
:project: vpr

doc/src/api/vprinternals/vpr_noc.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.. _noc:
2+
3+
=======
4+
VPR NoC
5+
=======
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
10+
noc_router
11+
noc_link
12+
noc_storage
13+
noc_traffic_flows
14+
noc_routing
15+
noc_data_types

doc/src/arch/reference.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ The architecture tag contains the following tags:
2323
* ``<segmentlist>``
2424
* ``<directlist>``
2525
* ``<complexblocklist>``
26+
* ``<noc>``
2627

2728
.. _arch_models:
2829

@@ -136,6 +137,10 @@ Global FPGA Information
136137
137138
Content inside this tag contains a group of ``<pb_type>`` tags that specify the types of functional blocks and their properties.
138139

140+
.. arch:tag:: <noc link_bandwidth="float" link_latency="float" router_latency="float" noc_router_tile_name="string">content</noc>
141+
142+
Content inside this tag specifies the Network-on-Chip (NoC) architecture on the FPGA device and its properties.
143+
139144
.. _arch_grid_layout:
140145

141146
FPGA Grid Layout
@@ -1855,6 +1860,95 @@ Power
18551860
:opt_param scaled_by_static_prob: Port name by which to scale ``energy_per_toggle`` based on its logic high probability.
18561861
:opt_param scaled_by_static_prob_n: Port name by which to scale ``energy_per_toggle`` based on its logic low probability.
18571862
1863+
NoC Description
1864+
---------------
1865+
1866+
The ``<noc>`` tag is an optional tag and its contents allows designers to describe a NoC on an FPGA device.
1867+
The ``<noc>`` tag is the top level tag for the NoC description and its attributes define the overall properties
1868+
of the NoC; refer below for its contents.
1869+
1870+
.. arch:tag:: <noc link_bandwidth="float" link_latency="float" router_latency="float" noc_router_tile_name="string">
1871+
1872+
:req_param link_bandwidth:
1873+
Specifies the maximum bandwidth in bits-per-second (bps) that a link in the NoC can support
1874+
1875+
:req_param link_latency:
1876+
Specifies the delay in seconds seen by a flit as it travels from one physical NoC router to another using a NoC link.
1877+
1878+
:req_param router_latency:
1879+
Specifies the un-loaded delays in seconds as it travels through a physical router.
1880+
1881+
:req_param noc_router_tile_name:
1882+
Specifies a string which represents the name used to identify a NoC router tile (physical hard block) in the
1883+
corresponding FPGA architecture. This information is needed to create a model of the NoC.
1884+
1885+
The ``<noc>`` tag contains a single ``<topology>`` tag which describes the topology of the NoC.
1886+
1887+
NoC topology
1888+
~~~~~~~~~~~~
1889+
1890+
As mentioned above the ``<topology>`` tag can be used to specify the topology or how the routers in the NoC
1891+
are connected to each other. The ``<topology>`` tag consists of a group ``<router>``tags.
1892+
1893+
Below is an example of how the ``<topology>`` tag is used.
1894+
1895+
.. code-block:: xml
1896+
1897+
<topology>
1898+
<!--A number of <router> tags go here-->
1899+
</topology>
1900+
1901+
The ``<router>`` tag and its contents are described below.
1902+
1903+
.. arch:tag:: <router id="int" positionx="float" positiony="float" connections="int int int int ...">
1904+
1905+
This tag represents a single physical NoC router on the FPGA device and specifies how it is connected within the NoC.
1906+
1907+
:req_param id:
1908+
Specifies a user identification (ID) number which is associate to the physical
1909+
router that this tag is identifying. This ID is used to report errors and
1910+
warnings to the user.
1911+
1912+
:req_param positionx:
1913+
Specifies the horizontal position of the physical router block that this
1914+
tag is identifying. This position does not have to be exact, it can
1915+
be an approximate value.
1916+
1917+
:req_param positiony:
1918+
Specifies the vertical position of the physical router block that this
1919+
tag is identifying. This position does not have to be exact, it can
1920+
be an approximate value.
1921+
1922+
:req_param connections:
1923+
Specifies a list of numbers seperated by spaces which are the user IDs supplied to other
1924+
``<router>`` tags. This describes how the current physical Noc router
1925+
that this tag is identifying is connected to the other physical NoC routers on the device.
1926+
1927+
Below is an example of the ``<router>`` tag which identifies a physical router located near (0,0) with ID 0. This router
1928+
is also connected to two other routers identified by IDs 1 and 2.
1929+
1930+
.. code-block:: xml
1931+
1932+
<router id="0" positionx="0" positiony="0" connections="1 2"/>
1933+
1934+
NoC Description Example
1935+
~~~~~~~~~~~~~~~~~~~~~~~
1936+
1937+
Below is an example which describes a NoC architecture which has 4 physical routers that are connected to each other to form a
1938+
2x2 mesh topology.
1939+
1940+
.. code-block:: xml
1941+
1942+
<!-- Description of a 2x2 mesh NoC-->
1943+
<noc link_bandwidth="1.2e9" router_latency="1e-9" link_latency="1e-9" noc_router_tile_name="noc_router_adapter">
1944+
<topology>
1945+
<router id="0" positionx="0" positiony="0" connections="1 2"/>
1946+
<router id="1" positionx="5" positiony="0" connections="0 3"/>
1947+
<router id="2" positionx="0" positiony="5" connections="0 3"/>
1948+
<router id="3" positionx="5" positiony="5" connections="1 2"/>
1949+
</topology>
1950+
</noc>
1951+
18581952
Wire Segments
18591953
-------------
18601954

doc/src/vpr/command_line_usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ Analysis Options
16811681
16821682
It is possible that by opening a switch between (1,2) to (1,1), CHANY:2113 actually only extends from (1,3) to (1,2).
16831683

1684-
2. The preceding channel's ending coordinates have no relation to the following channel's starting coordinates.
1684+
1. The preceding channel's ending coordinates have no relation to the following channel's starting coordinates.
16851685
There is no logical contradiction, but for clarification, it is best to see an explanation of the VPR coordinate system.
16861686
The path can also be visualized by VPR graphics, as an illustration of this point:
16871687

doc/src/vpr/file_formats.rst

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,95 @@ To aid in handling large graphs, rr_graph files can also be :ref:`saved in <file
10741074

10751075
.. _end:
10761076

1077+
1078+
Network-on-Chip (NoC) Traffic Flows Format (.flows)
1079+
---------------------------------------------------
1080+
1081+
In order to co-optimize for the NoC placement VPR needs expected performance metrics of the NoC.
1082+
VPR defines the performance requirements of the NoC as traffic flows. A traffic flow is a one-way communication between two
1083+
logical routers in a design. The traffic flows provide the communications bandwidth and Quality of
1084+
Service (QoS) requirements. The traffic flows are application dependant and need to be supplied
1085+
externally by a user. The traffic flows file is an XML based file format which designers
1086+
can use to describe the traffic flows in a given application.
1087+
1088+
.. note:: Use :option:`vpr --noc_traffic_flows` to specify an NoC traffic flows file to be loaded.
1089+
1090+
Top Level Tags
1091+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1092+
1093+
The first tag in all NoC traffic flow files is the ``<traffic_flows>`` tag that contains detailed subtags for each catagory in the NoC traffic flows.
1094+
1095+
The ``traffic_flows`` tag contains the following tags:
1096+
1097+
* ``<single_flow>``
1098+
* ``<single_flow>``content``</single_flow>``
1099+
1100+
Detailed Tag Information
1101+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
1102+
1103+
Single Flow
1104+
^^^^^^^^^^^
1105+
1106+
A given traffic flow information is contained within the ``single_flow`` tag. There can be 0 or more single flow tags.
1107+
0 would indicate that an application does not have any traffic flows.
1108+
1109+
.. rrgraph:tag:: <channel src="logical_router_name" dst="logical_router_name" bandwidth="float" latency_cons="float" priority="int"/>
1110+
1111+
:opt_param latency_cons:
1112+
A floating point number which indicates the upper bound
1113+
on the latency for a traffic flow. This is in units of seconds and is an optional attribute.
1114+
If this attribute is not provided then the CAD tool will try to reduce the latency as much
1115+
as possible.
1116+
1117+
:opt_param priority:
1118+
An integer which represents the relative importance of the traffic flow
1119+
against all other traffic flows in an application. For example, a traffic flow with priority
1120+
10 would be weighted ten times more than a traffic flow with priority 1. This is an
1121+
optional attribute and by default all traffic flows have a priority of 1
1122+
1123+
:req_param src:
1124+
A string which represents a logical router name in an application.
1125+
This logical router is the source endpoint for the traffic flow being described by the cor-
1126+
responding single flow tag. The logical router name must match the name of the router
1127+
as found in the clustered netlist; since this name assigned by the CAD tool, instead of
1128+
having the designer go through the clustered netlist to retrieve the exact name we instead
1129+
allow designers to use regex patters in the logical router name. For example, instead of
1130+
”noc_router_adapter_block:noc_router_layer1_mvm2:slave_tready_reg0” user could pro-
1131+
vide ”.*noc_router_layer1_mvm2.*”. This allows users to provide the instance name for a given logical router
1132+
module in the design. This is a required attribute.
1133+
1134+
:req_param dst:
1135+
A string which represents a logical router name in an application.
1136+
This logical router is the deastination endpoint for the traffic flow being described by the cor-
1137+
responding single flow tag. The logical router name must match the name of the router
1138+
as found in the clustered netlist; since this name assigned by the CAD tool, instead of
1139+
having the designer go through the clustered netlist to retrieve the exact name we instead
1140+
allow designers to use regex patters in the logical router name. For example, instead of
1141+
”noc_router_adapter_block:noc_router_layer1_mvm3:slave_tready_reg0” user could pro-
1142+
vide ”.*noc_router_layer1_mvm3.*”. This allows users to provide the instance name for a given logical router
1143+
module in the design. This is a required attribute.
1144+
1145+
:req_param bandwidth:
1146+
A floating point number which indicates the data size in the
1147+
traffic flow communication. This is in units of bits-per-second (bps) and is a required
1148+
attribute.
1149+
1150+
NoC Traffic Flows File Example
1151+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1152+
1153+
An example of what a NoC traffic flows file looks like is shown below:
1154+
1155+
.. code-block:: xml
1156+
:caption: Example of a NoC traffic flows file in XML format
1157+
:linenos:
1158+
1159+
<traffic_flows>
1160+
<single_flow src="m0" dst="m1" bandwidth="2.3e9" latency_cons="3e-9"/>
1161+
<single_flow src="m0" dst="m2" bandwidth="5e8"/>
1162+
<single_flow src="ddr" dst="m0" bandwidth="1.3e8" priority=3/>
1163+
<single_flow src="m3" dst="m2" bandwidth="4.8e9" latency_cons="5e-9" priority=2/>
1164+
</traffic_flows>
1165+
10771166
Block types usage summary (.txt .xml or .json)
10781167
-----------------------------------------
10791168

vpr/src/noc/noc_data_types.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
#ifndef NOC_DATA_TYPES_H
22
#define NOC_DATA_TYPES_H
33

4+
/**
5+
* @file
6+
* @brief This file contains datatype definitions which are used by the NoC datastructures.
7+
*
8+
*/
9+
410
#include "vtr_strong_id.h"
511

612
// data types used to index the routers and links within the noc
713
struct noc_router_id_tag;
814
struct noc_link_id_tag;
915

16+
/** Datatype to index routers within the NoC */
1017
typedef vtr::StrongId<noc_router_id_tag, int> NocRouterId;
18+
/** Datatype to index links within the NoC */
1119
typedef vtr::StrongId<noc_link_id_tag, int> NocLinkId;
1220

1321
// data type to index traffic flows within the noc
1422
struct noc_traffic_flow_id_tag;
1523

24+
/** Datatype to index traffic flows within the application */
1625
typedef vtr::StrongId<noc_traffic_flow_id_tag, int> NocTrafficFlowId;
1726

1827
#endif

0 commit comments

Comments
 (0)