Skip to content

Commit aec8907

Browse files
Merge pull request #3343 from verilog-to-routing/feature-remove-cad-types
[LibArchFPGA] Moved CAD Types out of Lib
2 parents 3ac0d07 + 48b3fe0 commit aec8907

File tree

6 files changed

+24
-20
lines changed

6 files changed

+24
-20
lines changed

libs/libarchfpga/src/physical_types.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ struct t_pin_to_pin_annotation;
7777
struct t_interconnect;
7878
class t_pb_graph_pin;
7979
class t_pb_graph_edge;
80-
struct t_cluster_placement_primitive;
8180
struct t_arch;
8281
enum class e_sb_type;
8382
struct t_interposer_cut_inf;

vpr/src/analytical_place/model_grouper.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
#include <queue>
1111
#include <unordered_set>
1212
#include <vector>
13-
#include "cad_types.h"
1413
#include "logic_types.h"
14+
#include "pack_patterns.h"
15+
#include "physical_types.h"
1516
#include "prepack.h"
1617
#include "vtr_assert.h"
1718
#include "vtr_log.h"

vpr/src/pack/cluster_legalizer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <vector>
1818
#include "atom_lookup.h"
1919
#include "atom_netlist.h"
20-
#include "cad_types.h"
2120
#include "cluster_placement.h"
2221
#include "cluster_router.h"
2322
#include "globals.h"

vpr/src/pack/cluster_placement.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
// Forward declarations
1313
class AtomBlockId;
1414

15+
/**
16+
* Keeps track of locations that a primitive can go to during packing
17+
* Linked list for easy insertion/deletion
18+
*/
19+
struct t_cluster_placement_primitive {
20+
t_cluster_placement_primitive() {
21+
pb_graph_node = nullptr;
22+
}
23+
t_pb_graph_node* pb_graph_node;
24+
bool valid;
25+
float base_cost; /* cost independent of current status of packing */
26+
float incremental_cost; /* cost dependent on current status of packing */
27+
};
28+
1529
/**
1630
* @brief Stats keeper for placement within the cluster during packing
1731
*

libs/libarchfpga/src/cad_types.h renamed to vpr/src/pack/pack_patterns.h

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#pragma once
22
/*
3-
* Data types used to give architectural hints for the CAD algorithm
3+
* Data types used to give architectural hints for the CAD algorithm through pack
4+
* patterns.
45
*/
56

6-
#include "physical_types.h"
7+
#include <vector>
78

9+
struct t_pb_type;
10+
struct t_pb_graph_pin;
811
struct t_pack_pattern_connections;
912

1013
/**
@@ -112,17 +115,3 @@ struct t_pack_patterns {
112115
is_chain = false;
113116
}
114117
};
115-
116-
/**
117-
* Keeps track of locations that a primitive can go to during packing
118-
* Linked list for easy insertion/deletion
119-
*/
120-
struct t_cluster_placement_primitive {
121-
t_cluster_placement_primitive() {
122-
pb_graph_node = nullptr;
123-
}
124-
t_pb_graph_node* pb_graph_node;
125-
bool valid;
126-
float base_cost; /* cost independent of current status of packing */
127-
float incremental_cost; /* cost dependent on current status of packing */
128-
};

vpr/src/pack/prepack.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
*/
1010

1111
#include <algorithm>
12+
#include <map>
1213
#include "atom_netlist_fwd.h"
13-
#include "cad_types.h"
14+
#include "pack_patterns.h"
1415
#include "vtr_assert.h"
1516
#include "vtr_range.h"
1617
#include "vtr_strong_id.h"
@@ -21,6 +22,7 @@
2122
class t_pack_molecule;
2223
class LogicalModels;
2324
struct t_logical_block_type;
25+
struct t_pb_graph_node;
2426

2527
// A unique ID used to identify a molecule generated by the prepacker.
2628
typedef vtr::StrongId<struct pack_molecule_id_tag, size_t> PackMoleculeId;

0 commit comments

Comments
 (0)