From 27fea8bbbef48c43310f7d6614cbc68c04567c1b Mon Sep 17 00:00:00 2001 From: tangxifan Date: Tue, 26 Jul 2022 15:54:32 -0700 Subject: [PATCH] [lib] Merge librepackdc into libpcf --- libopenfpga/CMakeLists.txt | 1 - libopenfpga/libpcf/CMakeLists.txt | 4 +-- .../repack_design_constraint_example.xml | 0 .../libpcf/src/{ => base}/pin_constraints.cpp | 0 .../libpcf/src/{ => base}/pin_constraints.h | 0 .../src/{ => base}/pin_constraints_fwd.h | 0 .../src/base}/repack_design_constraints.cpp | 0 .../src/base}/repack_design_constraints.h | 0 .../src/base}/repack_design_constraints_fwd.h | 0 .../src/{ => io}/read_xml_pin_constraints.cpp | 0 .../src/{ => io}/read_xml_pin_constraints.h | 0 .../read_xml_repack_design_constraints.cpp | 0 .../io}/read_xml_repack_design_constraints.h | 0 .../{ => io}/write_xml_pin_constraints.cpp | 0 .../src/{ => io}/write_xml_pin_constraints.h | 0 .../write_xml_repack_design_constraints.cpp | 0 .../io}/write_xml_repack_design_constraints.h | 0 .../test/test_repack_design_constraints.cpp | 0 libopenfpga/librepackdc/CMakeLists.txt | 35 ------------------- openfpga/CMakeLists.txt | 1 - 20 files changed, 2 insertions(+), 39 deletions(-) rename libopenfpga/{librepackdc/dc_example => libpcf/example}/repack_design_constraint_example.xml (100%) rename libopenfpga/libpcf/src/{ => base}/pin_constraints.cpp (100%) rename libopenfpga/libpcf/src/{ => base}/pin_constraints.h (100%) rename libopenfpga/libpcf/src/{ => base}/pin_constraints_fwd.h (100%) rename libopenfpga/{librepackdc/src => libpcf/src/base}/repack_design_constraints.cpp (100%) rename libopenfpga/{librepackdc/src => libpcf/src/base}/repack_design_constraints.h (100%) rename libopenfpga/{librepackdc/src => libpcf/src/base}/repack_design_constraints_fwd.h (100%) rename libopenfpga/libpcf/src/{ => io}/read_xml_pin_constraints.cpp (100%) rename libopenfpga/libpcf/src/{ => io}/read_xml_pin_constraints.h (100%) rename libopenfpga/{librepackdc/src => libpcf/src/io}/read_xml_repack_design_constraints.cpp (100%) rename libopenfpga/{librepackdc/src => libpcf/src/io}/read_xml_repack_design_constraints.h (100%) rename libopenfpga/libpcf/src/{ => io}/write_xml_pin_constraints.cpp (100%) rename libopenfpga/libpcf/src/{ => io}/write_xml_pin_constraints.h (100%) rename libopenfpga/{librepackdc/src => libpcf/src/io}/write_xml_repack_design_constraints.cpp (100%) rename libopenfpga/{librepackdc/src => libpcf/src/io}/write_xml_repack_design_constraints.h (100%) rename libopenfpga/{librepackdc => libpcf}/test/test_repack_design_constraints.cpp (100%) delete mode 100644 libopenfpga/librepackdc/CMakeLists.txt diff --git a/libopenfpga/CMakeLists.txt b/libopenfpga/CMakeLists.txt index f6f812f89..aeb76b691 100644 --- a/libopenfpga/CMakeLists.txt +++ b/libopenfpga/CMakeLists.txt @@ -4,7 +4,6 @@ add_subdirectory(libopenfpgashell) add_subdirectory(libarchopenfpga) add_subdirectory(libopenfpgautil) add_subdirectory(libfabrickey) -add_subdirectory(librepackdc) add_subdirectory(libfpgabitstream) add_subdirectory(libpcf) add_subdirectory(libbusgroup) diff --git a/libopenfpga/libpcf/CMakeLists.txt b/libopenfpga/libpcf/CMakeLists.txt index 8287bb3bc..e491d29ce 100644 --- a/libopenfpga/libpcf/CMakeLists.txt +++ b/libopenfpga/libpcf/CMakeLists.txt @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.9) project("libpcf") file(GLOB_RECURSE EXEC_SOURCES test/*.cpp) -file(GLOB_RECURSE LIB_SOURCES src/*.cpp) -file(GLOB_RECURSE LIB_HEADERS src/*.h) +file(GLOB_RECURSE LIB_SOURCES src/*/*.cpp) +file(GLOB_RECURSE LIB_HEADERS src/*/*.h) files_to_dirs(LIB_HEADERS LIB_INCLUDE_DIRS) #Remove test executable from library diff --git a/libopenfpga/librepackdc/dc_example/repack_design_constraint_example.xml b/libopenfpga/libpcf/example/repack_design_constraint_example.xml similarity index 100% rename from libopenfpga/librepackdc/dc_example/repack_design_constraint_example.xml rename to libopenfpga/libpcf/example/repack_design_constraint_example.xml diff --git a/libopenfpga/libpcf/src/pin_constraints.cpp b/libopenfpga/libpcf/src/base/pin_constraints.cpp similarity index 100% rename from libopenfpga/libpcf/src/pin_constraints.cpp rename to libopenfpga/libpcf/src/base/pin_constraints.cpp diff --git a/libopenfpga/libpcf/src/pin_constraints.h b/libopenfpga/libpcf/src/base/pin_constraints.h similarity index 100% rename from libopenfpga/libpcf/src/pin_constraints.h rename to libopenfpga/libpcf/src/base/pin_constraints.h diff --git a/libopenfpga/libpcf/src/pin_constraints_fwd.h b/libopenfpga/libpcf/src/base/pin_constraints_fwd.h similarity index 100% rename from libopenfpga/libpcf/src/pin_constraints_fwd.h rename to libopenfpga/libpcf/src/base/pin_constraints_fwd.h diff --git a/libopenfpga/librepackdc/src/repack_design_constraints.cpp b/libopenfpga/libpcf/src/base/repack_design_constraints.cpp similarity index 100% rename from libopenfpga/librepackdc/src/repack_design_constraints.cpp rename to libopenfpga/libpcf/src/base/repack_design_constraints.cpp diff --git a/libopenfpga/librepackdc/src/repack_design_constraints.h b/libopenfpga/libpcf/src/base/repack_design_constraints.h similarity index 100% rename from libopenfpga/librepackdc/src/repack_design_constraints.h rename to libopenfpga/libpcf/src/base/repack_design_constraints.h diff --git a/libopenfpga/librepackdc/src/repack_design_constraints_fwd.h b/libopenfpga/libpcf/src/base/repack_design_constraints_fwd.h similarity index 100% rename from libopenfpga/librepackdc/src/repack_design_constraints_fwd.h rename to libopenfpga/libpcf/src/base/repack_design_constraints_fwd.h diff --git a/libopenfpga/libpcf/src/read_xml_pin_constraints.cpp b/libopenfpga/libpcf/src/io/read_xml_pin_constraints.cpp similarity index 100% rename from libopenfpga/libpcf/src/read_xml_pin_constraints.cpp rename to libopenfpga/libpcf/src/io/read_xml_pin_constraints.cpp diff --git a/libopenfpga/libpcf/src/read_xml_pin_constraints.h b/libopenfpga/libpcf/src/io/read_xml_pin_constraints.h similarity index 100% rename from libopenfpga/libpcf/src/read_xml_pin_constraints.h rename to libopenfpga/libpcf/src/io/read_xml_pin_constraints.h diff --git a/libopenfpga/librepackdc/src/read_xml_repack_design_constraints.cpp b/libopenfpga/libpcf/src/io/read_xml_repack_design_constraints.cpp similarity index 100% rename from libopenfpga/librepackdc/src/read_xml_repack_design_constraints.cpp rename to libopenfpga/libpcf/src/io/read_xml_repack_design_constraints.cpp diff --git a/libopenfpga/librepackdc/src/read_xml_repack_design_constraints.h b/libopenfpga/libpcf/src/io/read_xml_repack_design_constraints.h similarity index 100% rename from libopenfpga/librepackdc/src/read_xml_repack_design_constraints.h rename to libopenfpga/libpcf/src/io/read_xml_repack_design_constraints.h diff --git a/libopenfpga/libpcf/src/write_xml_pin_constraints.cpp b/libopenfpga/libpcf/src/io/write_xml_pin_constraints.cpp similarity index 100% rename from libopenfpga/libpcf/src/write_xml_pin_constraints.cpp rename to libopenfpga/libpcf/src/io/write_xml_pin_constraints.cpp diff --git a/libopenfpga/libpcf/src/write_xml_pin_constraints.h b/libopenfpga/libpcf/src/io/write_xml_pin_constraints.h similarity index 100% rename from libopenfpga/libpcf/src/write_xml_pin_constraints.h rename to libopenfpga/libpcf/src/io/write_xml_pin_constraints.h diff --git a/libopenfpga/librepackdc/src/write_xml_repack_design_constraints.cpp b/libopenfpga/libpcf/src/io/write_xml_repack_design_constraints.cpp similarity index 100% rename from libopenfpga/librepackdc/src/write_xml_repack_design_constraints.cpp rename to libopenfpga/libpcf/src/io/write_xml_repack_design_constraints.cpp diff --git a/libopenfpga/librepackdc/src/write_xml_repack_design_constraints.h b/libopenfpga/libpcf/src/io/write_xml_repack_design_constraints.h similarity index 100% rename from libopenfpga/librepackdc/src/write_xml_repack_design_constraints.h rename to libopenfpga/libpcf/src/io/write_xml_repack_design_constraints.h diff --git a/libopenfpga/librepackdc/test/test_repack_design_constraints.cpp b/libopenfpga/libpcf/test/test_repack_design_constraints.cpp similarity index 100% rename from libopenfpga/librepackdc/test/test_repack_design_constraints.cpp rename to libopenfpga/libpcf/test/test_repack_design_constraints.cpp diff --git a/libopenfpga/librepackdc/CMakeLists.txt b/libopenfpga/librepackdc/CMakeLists.txt deleted file mode 100644 index d605e0457..000000000 --- a/libopenfpga/librepackdc/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ -cmake_minimum_required(VERSION 3.9) - -project("librepackdc") - -file(GLOB_RECURSE EXEC_SOURCES test/*.cpp) -file(GLOB_RECURSE LIB_SOURCES src/*.cpp) -file(GLOB_RECURSE LIB_HEADERS src/*.h) -files_to_dirs(LIB_HEADERS LIB_INCLUDE_DIRS) - -#Remove test executable from library -list(REMOVE_ITEM LIB_SOURCES ${EXEC_SOURCES}) - -#Create the library -add_library(librepackdc STATIC - ${LIB_HEADERS} - ${LIB_SOURCES}) -target_include_directories(librepackdc PUBLIC ${LIB_INCLUDE_DIRS}) -set_target_properties(librepackdc PROPERTIES PREFIX "") #Avoid extra 'lib' prefix - -#Specify link-time dependancies -target_link_libraries(librepackdc - libopenfpgautil - libarchopenfpga - libvtrutil - libpugixml - libpugiutil) - -#Create the test executable -foreach(testsourcefile ${EXEC_SOURCES}) - # Use a simple string replace, to cut off .cpp. - get_filename_component(testname ${testsourcefile} NAME_WE) - add_executable(${testname} ${testsourcefile}) - # Make sure the library is linked to each test executable - target_link_libraries(${testname} librepackdc) -endforeach(testsourcefile ${EXEC_SOURCES}) diff --git a/openfpga/CMakeLists.txt b/openfpga/CMakeLists.txt index a9720896c..83e538ccf 100644 --- a/openfpga/CMakeLists.txt +++ b/openfpga/CMakeLists.txt @@ -23,7 +23,6 @@ target_link_libraries(libopenfpga libopenfpgashell libopenfpgautil libfabrickey - librepackdc libfpgabitstream libini libpcf