Skip to content

Commit a2e91dc

Browse files
authored
Merge pull request #2526 from w0lek/ipa_it2_clean
Interactive Path Analysis Feature Integration
2 parents 8f20622 + 2b74463 commit a2e91dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2912
-5
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ jobs:
197197
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=off',
198198
suite: 'vtr_reg_basic'
199199
},
200+
{
201+
name: 'Basic with NO_SERVER',
202+
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVPR_USE_EZGL=on -DVPR_USE_SERVER=off',
203+
suite: 'vtr_reg_basic'
204+
},
200205
{
201206
name: 'Basic with CAPNPROTO disabled',
202207
params: '-DVTR_ASSERT_LEVEL=3 -DWITH_BLIFEXPLORER=on -DVTR_ENABLE_CAPNPROTO=off',

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
[submodule "libs/EXTERNAL/libcatch2"]
22
path = libs/EXTERNAL/libcatch2
33
url = https://github.com/catchorg/Catch2.git
4+
[submodule "libs/EXTERNAL/sockpp"]
5+
path = libs/EXTERNAL/sockpp
6+
#url = git@github.com:fpagliughi/sockpp.git
7+
url = git@github.com:w0lek/sockpp.git # fork where in branch v1.0.0_no_complication_warnings there are compilation warnings fixes for upstream tag v1.0.0 of sockpp

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ set(VPR_USE_EZGL "auto" CACHE STRING "Specify whether vpr uses the graphics libr
3939
set_property(CACHE VPR_USE_EZGL PROPERTY STRINGS auto off on)
4040
option(VTR_ENABLE_CAPNPROTO "Enable capnproto binary serialization support in VPR." ON)
4141

42+
#Allow the user to decide whether to compile the server module
43+
option(VPR_USE_SERVER "Specify whether vpr enables the server mode" ON)
44+
4245
#Allow the user to enable/disable VPR analytic placement
4346
#VPR option --enable_analytic_placer is also required for Analytic Placement
4447
option(VPR_ANALYTIC_PLACE "Enable analytic placement in VPR." ON)

libs/EXTERNAL/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ add_subdirectory(libtatum)
1111
add_subdirectory(libcatch2)
1212
#add_subdirectory(parmys)
1313

14+
#VPR_USE_SERVER is initialized in the root CMakeLists
15+
#compile sockpp only if server mode is enabled
16+
if (VPR_USE_SERVER)
17+
set(SOCKPP_BUILD_SHARED OFF CACHE BOOL "Override default value" FORCE)
18+
set(SOCKPP_BUILD_STATIC ON CACHE BOOL "Override default value" FORCE)
19+
add_subdirectory(sockpp)
20+
endif()
21+
1422
#VPR_USE_EZGL is initialized in the root CMakeLists.
1523
#compile libezgl only if the user asks for or has its dependencies installed.
1624
if (VPR_USE_EZGL STREQUAL "on")
@@ -132,3 +140,12 @@ target_include_directories(Catch2
132140
$<INSTALL_INTERFACE:include>
133141
)
134142

143+
# Some sockpp headers generate warnings, so treat them as system headers to suppress warnings
144+
if (VPR_USE_SERVER)
145+
target_include_directories(sockpp-static
146+
SYSTEM
147+
PUBLIC
148+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/sockpp/include>
149+
$<INSTALL_INTERFACE:include>
150+
)
151+
endif()

libs/EXTERNAL/libtatum/libtatum/tatum/TimingReporter.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ void TimingReporter::report_timing_setup(std::ostream& os,
9999
report_timing(os, paths);
100100
}
101101

102+
void TimingReporter::report_timing_setup(std::vector<tatum::TimingPath>& paths,
103+
std::ostream& os,
104+
const SetupTimingAnalyzer& setup_analyzer,
105+
size_t npaths) const {
106+
paths = path_collector_.collect_worst_setup_timing_paths(timing_graph_, setup_analyzer, npaths);
107+
108+
report_timing(os, paths);
109+
}
110+
102111
void TimingReporter::report_timing_hold(std::string filename,
103112
const HoldTimingAnalyzer& hold_analyzer,
104113
size_t npaths) const {
@@ -114,6 +123,15 @@ void TimingReporter::report_timing_hold(std::ostream& os,
114123
report_timing(os, paths);
115124
}
116125

126+
void TimingReporter::report_timing_hold(std::vector<tatum::TimingPath>& paths,
127+
std::ostream& os,
128+
const HoldTimingAnalyzer& hold_analyzer,
129+
size_t npaths) const {
130+
paths = path_collector_.collect_worst_hold_timing_paths(timing_graph_, hold_analyzer, npaths);
131+
132+
report_timing(os, paths);
133+
}
134+
117135
void TimingReporter::report_skew_setup(std::string filename,
118136
const SetupTimingAnalyzer& setup_analyzer,
119137
size_t nworst) const {

libs/EXTERNAL/libtatum/libtatum/tatum/TimingReporter.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ class TimingReporter {
6464
public:
6565
void report_timing_setup(std::string filename, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
6666
void report_timing_setup(std::ostream& os, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
67+
void report_timing_setup(std::vector<tatum::TimingPath>& paths, std::ostream& os, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
6768

6869
void report_timing_hold(std::string filename, const tatum::HoldTimingAnalyzer& hold_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
6970
void report_timing_hold(std::ostream& os, const tatum::HoldTimingAnalyzer& hold_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
71+
void report_timing_hold(std::vector<tatum::TimingPath>& paths, std::ostream& os, const tatum::HoldTimingAnalyzer& hold_analyzer, size_t npaths=REPORT_TIMING_DEFAULT_NPATHS) const;
7072

7173
void report_skew_setup(std::string filename, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t nworst=REPORT_TIMING_DEFAULT_NPATHS) const;
7274
void report_skew_setup(std::ostream& os, const tatum::SetupTimingAnalyzer& setup_analyzer, size_t nworst=REPORT_TIMING_DEFAULT_NPATHS) const;

libs/EXTERNAL/sockpp

Submodule sockpp added at 5388c4b

vpr/CMakeLists.txt

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,25 @@ else()
3232
message(STATUS "EZGL: graphics disabled")
3333
endif()
3434

35+
36+
#Handle server setup
37+
set(SERVER_DEFINES "")
38+
39+
set(SERVER_DISABILED_REASON "")
40+
if (VPR_USE_SERVER)
41+
if (VPR_USE_EZGL STREQUAL "off")
42+
set(SERVER_DISABILED_REASON ", due to EZGL being disabled")
43+
set(VPR_USE_SERVER OFF)
44+
endif()
45+
endif()
46+
47+
if (VPR_USE_SERVER)
48+
message(STATUS "Server mode is enabled")
49+
else()
50+
list(APPEND SERVER_DEFINES "-DNO_SERVER")
51+
message(STATUS "Server mode is disabled${SERVER_DISABILED_REASON}")
52+
endif()
53+
3554
#
3655
# Build Configuration
3756
#
@@ -87,6 +106,13 @@ target_link_libraries(libvpr
87106
librrgraph
88107
)
89108

109+
if(VPR_USE_SERVER)
110+
target_link_libraries(libvpr
111+
sockpp-static
112+
-lz
113+
)
114+
endif()
115+
90116
#link graphics library only when graphics set to on
91117
if (VPR_USE_EZGL STREQUAL "on")
92118
target_link_libraries(libvpr
@@ -123,7 +149,7 @@ if (VPR_USE_EZGL STREQUAL "on")
123149

124150
endif()
125151

126-
target_compile_definitions(libvpr PUBLIC ${GRAPHICS_DEFINES})
152+
target_compile_definitions(libvpr PUBLIC ${GRAPHICS_DEFINES} ${SERVER_DEFINES})
127153

128154
if(${VTR_ENABLE_CAPNPROTO})
129155
target_link_libraries(libvpr libvtrcapnproto)

vpr/src/base/CheckSetup.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
void CheckSetup(const t_packer_opts& PackerOpts,
1111
const t_placer_opts& PlacerOpts,
1212
const t_router_opts& RouterOpts,
13+
const t_server_opts& ServerOpts,
1314
const t_det_routing_arch& RoutingArch,
1415
const std::vector<t_segment_inf>& Segments,
1516
const t_timing_inf Timing,
@@ -105,4 +106,12 @@ void CheckSetup(const t_packer_opts& PackerOpts,
105106
"Place channel width must be even for unidirectional.\n");
106107
}
107108
}
109+
110+
if (ServerOpts.is_server_mode_enabled) {
111+
if (ServerOpts.port_num < DYMANIC_PORT_RANGE_MIN || ServerOpts.port_num > DYNAMIC_PORT_RANGE_MAX) {
112+
VPR_FATAL_ERROR(VPR_ERROR_OTHER,
113+
"Specified server port number `--port %d` is out of range [%d-%d]. Please specify a port number within that range.\n",
114+
ServerOpts.port_num, DYMANIC_PORT_RANGE_MIN, DYNAMIC_PORT_RANGE_MAX);
115+
}
116+
}
108117
}

vpr/src/base/CheckSetup.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
#define CHECKSETUP_H
33
#include "vpr_types.h"
44

5+
const int DYMANIC_PORT_RANGE_MIN = 49152;
6+
const int DYNAMIC_PORT_RANGE_MAX = 65535;
7+
58
void CheckSetup(const t_packer_opts& PackerOpts,
69
const t_placer_opts& PlacerOpts,
710
const t_router_opts& RouterOpts,
11+
const t_server_opts& ServerOpts,
812
const t_det_routing_arch& RoutingArch,
913
const std::vector<t_segment_inf>& Segments,
1014
const t_timing_inf Timing,

0 commit comments

Comments
 (0)