Skip to content

Commit 5f75b3a

Browse files
committed
vpr: add heterogeneous tiles
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent b111918 commit 5f75b3a

File tree

2 files changed

+442
-320
lines changed

2 files changed

+442
-320
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ struct t_class {
442442
enum e_pin_type type;
443443
PortEquivalence equivalence;
444444
int num_pins;
445-
int* pinlist; /* [0..num_pins - 1] */
445+
std::vector<int> pinlist; /* [0..num_pins - 1] */
446446
};
447447

448448
enum e_power_wire_type {
@@ -582,21 +582,15 @@ struct t_physical_tile_type {
582582
int width = 0;
583583
int height = 0;
584584

585-
bool**** pinloc = nullptr; /* [0..width-1][0..height-1][0..3][0..num_pins-1] */
585+
std::vector<std::vector<std::vector<std::vector<bool>>>> pinloc; /* [0..width-1][0..height-1][0..3][0..num_pins-1] */
586586

587-
enum e_pin_location_distr pin_location_distribution = E_SPREAD_PIN_DISTR;
588-
int*** num_pin_loc_assignments = nullptr; /* [0..width-1][0..height-1][0..3] */
589-
char***** pin_loc_assignments = nullptr; /* [0..width-1][0..height-1][0..3][0..num_tokens-1][0..string_name] */
587+
std::vector<t_class> class_inf; /* [0..num_class-1] */
590588

591-
int num_class = 0;
592-
t_class* class_inf = nullptr; /* [0..num_class-1] */
593-
594-
std::vector<t_physical_tile_port> ports;
595-
std::vector<int> pin_width_offset; //[0..num_pins-1]
596-
std::vector<int> pin_height_offset; //[0..num_pins-1]
597-
int* pin_class = nullptr; /* [0..num_pins-1] */
598-
bool* is_ignored_pin = nullptr; /* [0..num_pins-1] */
599-
bool* is_pin_global = nullptr; /* [0..num_pins -1] */
589+
std::vector<int> pin_width_offset; // [0..num_pins-1]
590+
std::vector<int> pin_height_offset; // [0..num_pins-1]
591+
std::vector<int> pin_class; // [0..num_pins-1]
592+
std::vector<bool> is_ignored_pin; // [0..num_pins-1]
593+
std::vector<bool> is_pin_global; // [0..num_pins-1]
600594

601595
std::vector<t_fc_specification> fc_specs;
602596

@@ -611,6 +605,8 @@ struct t_physical_tile_type {
611605

612606
int index = -1; /* index of type descriptor in array (allows for index referencing) */
613607

608+
std::vector<t_sub_tile> sub_tiles;
609+
614610
std::vector<t_logical_block_type_ptr> equivalent_sites;
615611

616612
/* Unordered map indexed by the logical block index.
@@ -630,6 +626,19 @@ struct t_physical_tile_type {
630626
bool is_output_type;
631627
};
632628

629+
/** Describes the possible placeable blocks within a physical tile type.
630+
* A sub tile adds flexibility in the tile composition description.
631+
*/
632+
struct t_sub_tile {
633+
// Mapping between the sub tile's pins and the physical pins corresponding
634+
// to the physical tile type.
635+
std::vector<int> sub_tile_to_tile_pin_indices;
636+
637+
std::vector<t_physical_tile_port> ports;
638+
639+
std::vector<t_logical_block_type_ptr> equivalent_sites;
640+
}
641+
633642
/** A logical pin defines the pin index of a logical block type (i.e. a top level PB type)
634643
* This structure wraps the int value of the logical pin to allow its storage in the
635644
* vtr::bimap container.

0 commit comments

Comments
 (0)