@@ -816,6 +816,14 @@ static void LoadPinLoc(pugi::xml_node Locations,
816
816
VTR_ASSERT (ipin == output_pins.size ());
817
817
818
818
} else {
819
+ int capacity;
820
+ if (type->capacity_type == e_capacity_type::DUPLICATE) {
821
+ capacity = type->capacity ;
822
+ } else {
823
+ VTR_ASSERT (type->capacity_type == e_capacity_type::EXPLICIT);
824
+ capacity = 1 ;
825
+ }
826
+
819
827
VTR_ASSERT (type->pin_location_distribution == E_CUSTOM_PIN_DISTR);
820
828
for (int width = 0 ; width < type->width ; ++width) {
821
829
for (int height = 0 ; height < type->height ; ++height) {
@@ -836,12 +844,12 @@ static void LoadPinLoc(pugi::xml_node Locations,
836
844
}
837
845
838
846
for (int pin_num = pin_range.first ; pin_num < pin_range.second ; ++pin_num) {
839
- VTR_ASSERT (pin_num < type->num_pins / type-> capacity );
840
- for (int capacity = 0 ; capacity < type-> capacity ; ++capacity ) {
841
- type->pinloc [width][height][side][pin_num + capacity * type->num_pins / type-> capacity ] = true ;
842
- type->pin_width_offset [pin_num + capacity * type->num_pins / type-> capacity ] += width;
843
- type->pin_height_offset [pin_num + capacity * type->num_pins / type-> capacity ] += height;
844
- physical_pin_counts[pin_num + capacity * type->num_pins / type-> capacity ] += 1 ;
847
+ VTR_ASSERT (pin_num < type->num_pins / capacity);
848
+ for (int icapacity = 0 ; icapacity < capacity; ++icapacity ) {
849
+ type->pinloc [width][height][side][pin_num + icapacity * type->num_pins / capacity] = true ;
850
+ type->pin_width_offset [pin_num + icapacity * type->num_pins / capacity] += width;
851
+ type->pin_height_offset [pin_num + icapacity * type->num_pins / capacity] += height;
852
+ physical_pin_counts[pin_num + icapacity * type->num_pins / capacity] += 1 ;
845
853
}
846
854
}
847
855
}
@@ -891,6 +899,8 @@ static std::pair<int, std::pair<int, int>> ProcessPinString(pugi::xml_node Locat
891
899
pin_loc_string);
892
900
}
893
901
902
+ instance_idx = vtr::atoi (token.data );
903
+
894
904
token_index++;
895
905
token = tokens[token_index];
896
906
@@ -903,7 +913,6 @@ static std::pair<int, std::pair<int, int>> ProcessPinString(pugi::xml_node Locat
903
913
token_index++;
904
914
token = tokens[token_index];
905
915
906
- instance_idx = vtr::atoi (token.data );
907
916
}
908
917
909
918
if (token.type != TOKEN_DOT) {
@@ -3331,7 +3340,7 @@ static void ProcessEquivalentSiteDirectConnection(pugi::xml_node Parent,
3331
3340
" Pin definition differ between site %s and tile %s. User-defined pin mapping is required.\n " , LogicalBlockType->pb_type ->name , PhysicalTileType->name );
3332
3341
}
3333
3342
3334
- if (PhysicalTileType->capacity_type == e_capacity_type::EXPLICIT ) {
3343
+ if (PhysicalTileType->capacity_type != e_capacity_type::DUPLICATE ) {
3335
3344
archfpga_throw (loc_data.filename_c_str (), loc_data.line (Parent),
3336
3345
" Custom site pins are required if capacity_type == explicit\n " );
3337
3346
}
@@ -5017,7 +5026,15 @@ static void check_port_direct_mappings(t_physical_tile_type_ptr physical_tile, t
5017
5026
5018
5027
auto & pin_direct_mapping = physical_tile->tile_block_pin_directs_map .at (logical_block->index );
5019
5028
5020
- if (pb_type->num_pins != (int )pin_direct_mapping.size ()) {
5029
+ int capacity;
5030
+ if (physical_tile->capacity_type == e_capacity_type::DUPLICATE) {
5031
+ capacity = 1 ;
5032
+ } else {
5033
+ VTR_ASSERT (physical_tile->capacity_type == e_capacity_type::EXPLICIT);
5034
+ capacity = physical_tile->capacity ;
5035
+ }
5036
+
5037
+ if (pb_type->num_pins * capacity != (int )pin_direct_mapping.size ()) {
5021
5038
archfpga_throw (__FILE__, __LINE__,
5022
5039
" Logical block (%s) and Physical tile (%s) have a different number of ports.\n " ,
5023
5040
logical_block->name , physical_tile->name );
0 commit comments