31
31
#include < unordered_map>
32
32
#include < string>
33
33
#include < map>
34
- #include < unordered_map>
35
34
#include < limits>
36
35
#include < numeric>
36
+ #include < unordered_set>
37
37
38
38
#include " vtr_ndmatrix.h"
39
39
#include " vtr_hash.h"
@@ -556,6 +556,20 @@ constexpr int DEFAULT_SWITCH = -2;
556
556
* pb_type: Internal subblocks and routing information for this physical block
557
557
* pb_graph_head: Head of DAG of pb_types_nodes and their edges
558
558
*
559
+ *
560
+ * num_equivalent_tiles: Specifies the number of equivalent physical types that can be used during placement.
561
+ * If the value is `0` all the data structures relative to the equivalent tiles will be empty.
562
+ * equivalent_tiles: Array containing pointers to the equivalent tiles. The number of elements contained is specified
563
+ * by num_equivalent_tiles.
564
+ * equivalent_tile_pin_mapping: Multi-dimensional array that, for each different equivalent tile contains a mapping between
565
+ * the pins of the two tiles.
566
+ * Example: equivalent_tile_pin_mapping[eq_tile_index][pin_index] = equivalent_pin_index
567
+ * This is necessary to maintain consistency between two equivalent tiles that have the same pins
568
+ * defined with different indeces.
569
+ * equivalent_tile_inverse_pin_mapping: Multi-dimensional array that works as the previous one, but the mapping is inverse in this case.
570
+ * Example: equivalent_tile_pin_mapping[eq_tile_index][equivalent_pin_index] = pin_index
571
+ * available_tiles_indices: unordered map used to have a fast lookup on the available tiles.
572
+ *
559
573
* area: Describes how much area this logic block takes, if undefined, use default
560
574
* type_timing_inf: timing information unique to this type
561
575
* num_drivers: Total number of output drivers supplied
@@ -595,6 +609,13 @@ struct t_type_descriptor /* TODO rename this. maybe physical type descriptor or
595
609
t_pb_type* pb_type = nullptr ;
596
610
t_pb_graph_node* pb_graph_head = nullptr ;
597
611
612
+ /* Equivalent tiles information */
613
+ int num_equivalent_tiles = 0 ;
614
+ std::unordered_map<int , t_type_descriptor*> equivalent_tiles; /* [0..num_equivalent_tiles-1] */
615
+ std::unordered_map<int , std::unordered_map<int , int >> equivalent_tile_pin_mapping; /* [0..num_equivalent_tiles-1][0..num_pins-1] */
616
+ std::unordered_map<int , std::unordered_map<int , int >> equivalent_tile_inverse_pin_mapping; /* [0..num_equivalent_tiles-1][0..num_pins-1] */
617
+ std::unordered_set<int > available_tiles_indices;
618
+
598
619
float area = 0 ;
599
620
600
621
/* This info can be determined from class_inf and pin_class but stored for faster access */
@@ -603,8 +624,15 @@ struct t_type_descriptor /* TODO rename this. maybe physical type descriptor or
603
624
604
625
int index = -1 ; /* index of type descriptor in array (allows for index referencing) */
605
626
627
+ /* **********
628
+ * Methods *
629
+ ***********/
630
+
606
631
/* Returns the indices of pins that contain a clock for this physical logic block */
607
632
std::vector<int > get_clock_pins_indices () const ;
633
+
634
+ /* Returns a boolean set to True if the input index belongs to an available tile, False otherwise */
635
+ bool is_available_tile_index (int index_to_check) const ;
608
636
};
609
637
typedef const t_type_descriptor* t_type_ptr;
610
638
@@ -1200,6 +1228,7 @@ struct t_segment_inf {
1200
1228
std::vector<bool > cb;
1201
1229
std::vector<bool > sb;
1202
1230
// float Cmetal_per_m; /* Wire capacitance (per meter) */
1231
+ t_metadata_dict* meta = nullptr ;
1203
1232
};
1204
1233
1205
1234
enum class SwitchType {
0 commit comments