@@ -42,12 +42,12 @@ static int** f_port_from_blk_pin = nullptr;
42
42
43
43
/* f_port_pin_from_blk_pin array allow us to quickly find what port pin a*
44
44
* block pin corresponds to. *
45
- * [0...device_ctx.logical_block_types .size()-1][0...blk_pin_count-1] */
45
+ * [0...device_ctx.physical_tile_types .size()-1][0...blk_pin_count-1] */
46
46
static int ** f_port_pin_from_blk_pin = nullptr ;
47
47
48
48
/* f_port_pin_to_block_pin array allows us to quickly find what block *
49
49
* pin a port pin corresponds to. *
50
- * [0...device_ctx.logical_block_types .size()-1][0...num_ports-1][0...num_port_pins-1] */
50
+ * [0...device_ctx.physical_tile_types .size()-1][0...num_ports-1][0...num_port_pins-1] */
51
51
static int *** f_blk_pin_from_port_pin = nullptr ;
52
52
53
53
// Regular expressions used to determine register and logic primitives
@@ -731,15 +731,6 @@ void get_pin_range_for_block(const ClusterBlockId blk_id,
731
731
*pin_high = (place_ctx.block_locs [blk_id].loc .z + 1 ) * (type->num_pins / type->capacity ) - 1 ;
732
732
}
733
733
734
- t_physical_tile_type_ptr find_block_type_by_name (std::string name, const std::vector<t_logical_block_type>& types) {
735
- for (auto const & type : types) {
736
- if (type.name == name) {
737
- return physical_tile_type (&type);
738
- }
739
- }
740
- return nullptr ; // Not found
741
- }
742
-
743
734
t_physical_tile_type_ptr find_tile_type_by_name (std::string name, const std::vector<t_physical_tile_type>& types) {
744
735
for (auto const & type : types) {
745
736
if (type.name == name) {
@@ -843,7 +834,7 @@ InstPort parse_inst_port(std::string str) {
843
834
InstPort inst_port (str);
844
835
845
836
auto & device_ctx = g_vpr_ctx.device ();
846
- auto blk_type = find_block_type_by_name (inst_port.instance_name (), device_ctx.logical_block_types );
837
+ auto blk_type = find_tile_type_by_name (inst_port.instance_name (), device_ctx.physical_tile_types );
847
838
if (blk_type == nullptr ) {
848
839
VPR_FATAL_ERROR (VPR_ERROR_ARCH, " Failed to find block type named %s" , inst_port.instance_name ().c_str ());
849
840
}
@@ -1993,14 +1984,15 @@ static void mark_direct_of_ports(int idirect, int direct_type, char* pb_type_nam
1993
1984
auto & device_ctx = g_vpr_ctx.device ();
1994
1985
1995
1986
// Go through all the block types
1996
- for (itype = 1 ; itype < device_ctx.logical_block_types .size (); itype++) {
1987
+ for (itype = 1 ; itype < device_ctx.physical_tile_types .size (); itype++) {
1988
+ auto & physical_tile = device_ctx.physical_tile_types [itype];
1997
1989
// Find blocks with the same pb_type_name
1998
- if (strcmp (device_ctx. logical_block_types [itype]. pb_type -> name , pb_type_name) == 0 ) {
1999
- num_ports = device_ctx. logical_block_types [itype]. pb_type -> num_ports ;
1990
+ if (strcmp (physical_tile. name , pb_type_name) == 0 ) {
1991
+ num_ports = physical_tile. ports . size () ;
2000
1992
for (iport = 0 ; iport < num_ports; iport++) {
2001
1993
// Find ports with the same port_name
2002
- if (strcmp (device_ctx. logical_block_types [itype]. pb_type -> ports [iport].name , port_name) == 0 ) {
2003
- num_port_pins = device_ctx. logical_block_types [itype]. pb_type -> ports [iport].num_pins ;
1994
+ if (strcmp (physical_tile. ports [iport].name , port_name) == 0 ) {
1995
+ num_port_pins = physical_tile. ports [iport].num_pins ;
2004
1996
2005
1997
// Check whether the end_pin_index is valid
2006
1998
if (end_pin_index > num_port_pins) {
@@ -2057,13 +2049,13 @@ void alloc_and_load_idirect_from_blk_pin(t_direct_inf* directs, int num_directs,
2057
2049
auto & device_ctx = g_vpr_ctx.device ();
2058
2050
2059
2051
/* Allocate and initialize the values to OPEN (-1). */
2060
- temp_idirect_from_blk_pin = (int **)vtr::malloc (device_ctx.logical_block_types .size () * sizeof (int *));
2061
- temp_direct_type_from_blk_pin = (int **)vtr::malloc (device_ctx.logical_block_types .size () * sizeof (int *));
2062
- for (const auto & type : device_ctx.logical_block_types ) {
2052
+ temp_idirect_from_blk_pin = (int **)vtr::malloc (device_ctx.physical_tile_types .size () * sizeof (int *));
2053
+ temp_direct_type_from_blk_pin = (int **)vtr::malloc (device_ctx.physical_tile_types .size () * sizeof (int *));
2054
+ for (const auto & type : device_ctx.physical_tile_types ) {
2063
2055
if (is_empty_type (&type)) continue ;
2064
2056
2065
2057
int itype = type.index ;
2066
- num_type_pins = type.pb_type -> num_pins ;
2058
+ num_type_pins = type.num_pins ;
2067
2059
2068
2060
temp_idirect_from_blk_pin[itype] = (int *)vtr::malloc (num_type_pins * sizeof (int ));
2069
2061
temp_direct_type_from_blk_pin[itype] = (int *)vtr::malloc (num_type_pins * sizeof (int ));
0 commit comments