Skip to content

Commit 6b80de0

Browse files
add forward decls and include needed header files in read_place.h
1 parent f574059 commit 6b80de0

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

vpr/src/base/read_place.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#include <cstdio>
22
#include <cstring>
33
#include <fstream>
4-
#include <algorithm>
54

6-
#include "vtr_assert.h"
75
#include "vtr_util.h"
86
#include "vtr_log.h"
97
#include "vtr_digest.h"
@@ -16,7 +14,6 @@
1614
#include "read_place.h"
1715
#include "read_xml_arch_file.h"
1816
#include "place_util.h"
19-
#include "placer_context.h"
2017

2118
static void read_place_header(std::ifstream& placement_file,
2219
const char* net_file,

vpr/src/base/read_place.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
#ifndef READ_PLACE_H
22
#define READ_PLACE_H
33

4+
#include "vtr_vector_map.h"
5+
6+
#include <string>
7+
8+
49
class PlacerContext;
10+
class ClusterBlockId;
11+
struct t_block_loc;
512

613
/**
714
* This function is for reading a place file when placement is skipped.

vpr/src/draw/draw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ void free_draw_structs() {
570570
#endif /* NO_GRAPHICS */
571571
}
572572

573-
void place_loc_vars(float width_val, const PlaceLocVars& place_loc_vars) {
573+
void init_draw_coords(float width_val, const PlaceLocVars& place_loc_vars) {
574574
#ifndef NO_GRAPHICS
575575
/* Load the arrays containing the left and bottom coordinates of the clbs *
576576
* forming the FPGA. tile_width_val sets the width and height of a drawn *

vpr/src/place/initial_noc_placement.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ static bool accept_noc_swap(double delta_cost, double prob);
3131
* @brief Places a constrained NoC router within its partition region.
3232
*
3333
* @param router_blk_id NoC router cluster block ID
34+
* @param place_loc_vars Placement block location information. To be
35+
* filled with the location where pl_macro is placed.
3436
*/
3537
static void place_constrained_noc_router(ClusterBlockId router_blk_id,
3638
PlaceLocVars& place_loc_vars);
@@ -41,6 +43,8 @@ static void place_constrained_noc_router(ClusterBlockId router_blk_id,
4143
* @param unfixed_routers Contains the cluster block ID for all unconstrained
4244
* NoC routers.
4345
* @param seed Used for shuffling NoC routers.
46+
* @param place_loc_vars Placement block location information. To be filled
47+
* with the location where pl_macro is placed.
4448
*/
4549
static void place_noc_routers_randomly(std::vector<ClusterBlockId>& unfixed_routers,
4650
int seed,
@@ -50,6 +54,8 @@ static void place_noc_routers_randomly(std::vector<ClusterBlockId>& unfixed_rout
5054
* @brief Runs a simulated annealing optimizer for NoC routers.
5155
*
5256
* @param noc_opts Contains weighting factors for NoC cost terms.
57+
* @param place_loc_vars Placement block location information.
58+
* To be filled with the location where pl_macro is placed.
5359
*/
5460
static void noc_routers_anneal(const t_noc_opts& noc_opts,
5561
PlaceLocVars& place_loc_vars);

vpr/src/place/initial_noc_placment.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* to minimize NoC costs.
1111
*
1212
* @param noc_opts NoC-related options. Used to calculate NoC-related costs.
13+
* @param placer_opts Contain the placement algorithm options including the seed.
14+
* @param place_loc_vars Placement block location information. To be filled
15+
* with the location where pl_macro is placed.
1316
*/
1417
void initial_noc_placement(const t_noc_opts& noc_opts,
1518
const t_placer_opts& placer_opts,

vpr/src/place/place_util.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
#include "vtr_vector_map.h"
1515
#include "globals.h"
1616

17-
#include "placer_context.h"
17+
1818

1919
// forward declaration of t_placer_costs so that it can be used an argument
2020
// in NocCostTerms constructor
2121
class t_placer_costs;
22+
class PlaceLocVars;
2223

2324
/**
2425
* @brief Data structure that stores different cost terms for NoC placement.

0 commit comments

Comments
 (0)