Skip to content

Commit 731e101

Browse files
committed
2 parents 01ce5d5 + 2311863 commit 731e101

24 files changed

+867
-260
lines changed

doc/src/vpr/placement_constraints.rst

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ A Placement Constraints File Example
1818
<partition_list>
1919
<partition name="Part0">
2020
<add_atom name_pattern="li354"/>
21-
<add_atom name_pattern="alu*"/> <!-- Regular expressions can be used to provide name patterns of the primitives to be added -->
21+
<add_atom name_pattern="alu.*"/> <!-- Regular expressions can be used to provide name patterns of the primitives to be added -->
2222
<add_atom name_pattern="n877"/>
2323
<add_region x_low="3" y_low="1" x_high="7" y_high="2"/> <!-- Two rectangular regions are specified, together describing an L-shaped region -->
2424
<add_region x_low="7" y_low="3" x_high="7" y_high="6"/>
@@ -78,7 +78,10 @@ An ``<add_atom>`` tag is used to add an atom that must be constrained to the par
7878
:req_param name_pattern:
7979
The name of the atom.
8080

81-
The ``name_pattern`` can be the exact name of the atom from the input atom netlist that was passed to VPR. It can also be a regular expression, in which case VPR will add all atoms from the netlist which have a portion of their name matching the regular expression to the partition. For example, if a module contains primitives named in the pattern of "alu[0]", "alu[1]", and "alu[2]", the regular expression "alu*" would add all of the primitives from that module.
81+
The ``name_pattern`` can either be the exact name of an atom from the input atom netlist passed to VPR, or a regular expression pattern matching one or more atom names. VPR first searches the netlist for an exact match. If no exact match is found, it then assumes that the given name is a regex pattern and searches for atoms whose names match the pattern.
82+
83+
For example, to add all atoms ``alu[0]``, ``alu[1]``, and ``alu[2]`` to the partition ``Part0``, the user can use ``alu.*`` as the ``name_pattern`` in the ``<add_atom>`` tag.
84+
8285

8386
Region
8487
^^^^^^
@@ -124,12 +127,3 @@ It is strongly recommended that different partitions do not overlap. The packing
124127
blocks and the number of physical blocks in a region to decide pack atoms inside a partition more aggressively when
125128
there are not enough resources in a partition. Overlapping partitions causes some physical blocks to be counted in more
126129
than one partition.
127-
128-
129-
130-
131-
132-
133-
134-
135-

libs/libarchfpga/src/echo_arch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
297297
int num_layers = (int)layout.layers.size();
298298
if (num_layers > 1) {
299299
fprintf(Echo, "\t\t\t\ttype unidir mux_name for between two dice connections: %s\n",
300-
arch->switches[seg.arch_opin_between_dice_switch].name.c_str());
300+
arch->switches[seg.arch_inter_die_switch].name.c_str());
301301
}
302302
}
303303
} else { //Should be bidir

libs/libarchfpga/src/physical_types.h

Lines changed: 110 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,88 +1599,138 @@ enum e_Fc_type {
15991599
FRACTIONAL
16001600
};
16011601

1602-
/* Lists all the important information about a certain segment type. Only *
1603-
* used if the route_type is DETAILED. [0 .. det_routing_arch.num_segment] *
1604-
* name: the name of this segment *
1605-
* frequency: ratio of tracks which are of this segment type. *
1606-
* length: Length (in clbs) of the segment. *
1607-
* arch_wire_switch: Index of the switch type that connects other wires *
1608-
* *to* this segment. Note that this index is in relation *
1609-
* to the switches from the architecture file, not the *
1610-
* expanded list of switches that is built at the end of *
1611-
* build_rr_graph. *
1612-
* arch_opin_switch: Index of the switch type that connects output pins *
1613-
* (OPINs) *to* this segment. Note that this index is in *
1614-
* relation to the switches from the architecture file, *
1615-
* not the expanded list of switches that is built *
1616-
* at the end of build_rr_graph *
1617-
* @param arch_wire_switch_dec: Same as arch_wire_switch but used only for *
1618-
* decremental tracks if it is specified in the *
1619-
* architecture file. If -1, this value was not set in *
1620-
* the architecture file and arch_wire_switch should be *
1621-
* used for "DEC_DIR" wire segments. *
1622-
* @param arch_opin_switch_dec: Same as arch_opin_switch but used only for *
1623-
* decremental tracks if it is specified in the *
1624-
* architecture file. If -1, this value was not set in *
1625-
* the architecture file and arch_opin_switch should be *
1626-
* used for "DEC_DIR" wire segments. *
1627-
* @param arch_opin_between_dice_switch: Index of the switch type that *
1628-
* connects output pins (OPINs) *to* this segment from *
1629-
* *another die (layer)*. Note that this index is in *
1630-
* relation to the switches from the architecture file, *
1631-
* not the expanded list of switches that is built at *
1632-
* the end of build_rr_graph *
1633-
* *
1634-
* frac_cb: The fraction of logic blocks along its length to which this *
1635-
* segment can connect. (i.e. internal population). *
1636-
* frac_sb: The fraction of the length + 1 switch blocks along the segment *
1637-
* to which the segment can connect. Segments that aren't long *
1638-
* lines must connect to at least two switch boxes. *
1639-
* parallel_axis: Defines what axis the segment is parallel to. See *
1640-
* e_parallel_axis comments for more details on the values. *
1641-
* Cmetal: Capacitance of a routing track, per unit logic block length. *
1642-
* Rmetal: Resistance of a routing track, per unit logic block length. *
1643-
* (UDSD by AY) drivers: How do signals driving a routing track connect to *
1644-
* the track? *
1645-
* seg_index: The index of the segment as stored in the appropriate Segs list*
1646-
* Upon loading the architecture, we use this field to keep track *
1647-
* the segment's index in the unified segment_inf vector. This is *
1648-
* useful when building the rr_graph for different Y & X channels *
1649-
* in terms of track distribution and segment type. *
1650-
* res_type: Determines the routing network to which the segment belongs. *
1651-
* Possible values are: *
1652-
* - GENERAL: The segment is part of the general routing *
1653-
* resources. *
1654-
* - GCLK: The segment is part of the global routing network. *
1655-
* For backward compatibility, this attribute is optional. If not *
1656-
* specified, the resource type for the segment is considered to *
1657-
* be GENERAL. *
1658-
* meta: Table storing extra arbitrary metadata attributes. */
1602+
/**
1603+
* @brief Lists all the important information about a certain segment type. Only
1604+
* used if the route_type is DETAILED. [0 .. det_routing_arch.num_segment]
1605+
*/
16591606
struct t_segment_inf {
1607+
/**
1608+
* @brief The name of the segment type
1609+
*/
16601610
std::string name;
1611+
1612+
/**
1613+
* @brief ratio of tracks which are of this segment type.
1614+
*/
16611615
int frequency;
1616+
1617+
/**
1618+
* @brief Length (in clbs) of the segment.
1619+
*/
16621620
int length;
1621+
1622+
/**
1623+
* @brief Index of the switch type that connects other wires to this segment.
1624+
* Note that this index is in relation to the switches from the architecture file,
1625+
* not the expanded list of switches that is built at the end of build_rr_graph.
1626+
*/
16631627
short arch_wire_switch;
1628+
1629+
/**
1630+
* @brief Index of the switch type that connects output pins to this segment.
1631+
* Note that this index is in relation to the switches from the architecture file,
1632+
* not the expanded list of switches that is built at the end of build_rr_graph.
1633+
*/
16641634
short arch_opin_switch;
1635+
1636+
/**
1637+
* @brief Same as arch_wire_switch but used only for decremental tracks if it is
1638+
* specified in the architecture file. If -1, this value was not set in the
1639+
* architecture file and arch_wire_switch should be used for "DEC_DIR" wire segments.
1640+
*/
16651641
short arch_wire_switch_dec = -1;
1642+
1643+
/**
1644+
* @brief Same as arch_opin_switch but used only for decremental tracks if
1645+
* it is specified in the architecture file. If -1, this value was not set in
1646+
* the architecture file and arch_opin_switch should be used for "DEC_DIR" wire segments.
1647+
*/
16661648
short arch_opin_switch_dec = -1;
1667-
short arch_opin_between_dice_switch = -1;
1649+
1650+
/**
1651+
* @brief Index of the switch type that connects output pins (OPINs) to this
1652+
* segment from another die (layer). Note that this index is in relation to
1653+
* the switches from the architecture file, not the expanded list of switches
1654+
* that is built at the end of build_rr_graph.
1655+
*/
1656+
short arch_inter_die_switch = -1;
1657+
1658+
/**
1659+
* @brief The fraction of logic blocks along its length to which this segment can connect.
1660+
* (i.e. internal population).
1661+
*/
16681662
float frac_cb;
1663+
1664+
/**
1665+
* @brief The fraction of the length + 1 switch blocks along the segment to which the segment can connect.
1666+
* Segments that aren't long lines must connect to at least two switch boxes.
1667+
*/
16691668
float frac_sb;
1669+
16701670
bool longline;
1671+
1672+
/**
1673+
* @brief The resistance of a routing track, per unit logic block length. */
16711674
float Rmetal;
1675+
1676+
/**
1677+
* @brief The capacitance of a routing track, per unit logic block length. */
16721678
float Cmetal;
1679+
16731680
enum e_directionality directionality;
1681+
1682+
/**
1683+
* @brief Defines what axis the segment is parallel to. See e_parallel_axis
1684+
* comments for more details on the values.
1685+
*/
16741686
enum e_parallel_axis parallel_axis;
1687+
1688+
/**
1689+
* @brief A vector of booleans indicating whether the segment can connect to a logic block.
1690+
*/
16751691
std::vector<bool> cb;
1692+
1693+
/**
1694+
* @brief A vector of booleans indicating whether the segment can connect to a switch block.
1695+
*/
16761696
std::vector<bool> sb;
1697+
1698+
/**
1699+
* @brief The index of the segment as stored in the appropriate Segs list.
1700+
* Upon loading the architecture, we use this field to keep track of the
1701+
* segment's index in the unified segment_inf vector. This is useful when
1702+
* building the rr_graph for different Y & X channels in terms of track
1703+
* distribution and segment type.
1704+
*/
16771705
int seg_index;
1706+
1707+
/**
1708+
* @brief Determines the routing network to which the segment belongs.
1709+
* Possible values are:
1710+
* - GENERAL: The segment is part of the general routing resources.
1711+
* - GCLK: The segment is part of the global routing network.
1712+
* For backward compatibility, this attribute is optional. If not specified,
1713+
* the resource type for the segment is considered to be GENERAL.
1714+
*/
16781715
enum SegResType res_type = SegResType::GENERAL;
1679-
//float Cmetal_per_m; /* Wire capacitance (per meter) */
16801716
};
16811717

16821718
inline bool operator==(const t_segment_inf& a, const t_segment_inf& b) {
1683-
return a.name == b.name && a.frequency == b.frequency && a.length == b.length && a.arch_wire_switch == b.arch_wire_switch && a.arch_opin_switch == b.arch_opin_switch && a.arch_opin_between_dice_switch == b.arch_opin_between_dice_switch && a.frac_cb == b.frac_cb && a.frac_sb == b.frac_sb && a.longline == b.longline && a.Rmetal == b.Rmetal && a.Cmetal == b.Cmetal && a.directionality == b.directionality && a.parallel_axis == b.parallel_axis && a.cb == b.cb && a.sb == b.sb;
1719+
return a.name == b.name
1720+
&& a.frequency == b.frequency
1721+
&& a.length == b.length
1722+
&& a.arch_wire_switch == b.arch_wire_switch
1723+
&& a.arch_opin_switch == b.arch_opin_switch
1724+
&& a.arch_inter_die_switch == b.arch_inter_die_switch
1725+
&& a.frac_cb == b.frac_cb
1726+
&& a.frac_sb == b.frac_sb
1727+
&& a.longline == b.longline
1728+
&& a.Rmetal == b.Rmetal
1729+
&& a.Cmetal == b.Cmetal
1730+
&& a.directionality == b.directionality
1731+
&& a.parallel_axis == b.parallel_axis
1732+
&& a.cb == b.cb
1733+
&& a.sb == b.sb;
16841734
}
16851735

16861736
/*provide hashing for t_segment_inf to enable the use of many std containers.

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3793,7 +3793,7 @@ static std::vector<t_segment_inf> ProcessSegments(pugi::xml_node Parent,
37933793
archfpga_throw(loc_data.filename_c_str(), loc_data.line(SubElem),
37943794
"'%s' is not a valid mux name.\n", tmp);
37953795
}
3796-
Segs[i].arch_opin_between_dice_switch = switch_idx;
3796+
Segs[i].arch_inter_die_switch = switch_idx;
37973797
}
37983798

37993799
/* Get the wire and opin switches, or mux switch if unidir */

0 commit comments

Comments
 (0)