Merge branch 'master' of gitlab.com:SymbioticEDA/nextpnr
This commit is contained in:
commit
f2ae9a713b
41
3rdparty/QtPropertyBrowser/CMakeLists.txt
vendored
41
3rdparty/QtPropertyBrowser/CMakeLists.txt
vendored
@ -1,17 +1,6 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
|
||||||
PROJECT(QtPropertyBrowser)
|
PROJECT(QtPropertyBrowser)
|
||||||
|
|
||||||
########################### Misc. Configs ##############################
|
|
||||||
# Add custom cmake files folder
|
|
||||||
SET (PROJECT_CMAKE_DIR ${PROJECT_SOURCE_DIR}/cmake)
|
|
||||||
SET (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${PROJECT_CMAKE_DIR}")
|
|
||||||
|
|
||||||
# Add custom Compile Settings and flags
|
|
||||||
INCLUDE(CompileSettings)
|
|
||||||
|
|
||||||
# Add custom Install Settings
|
|
||||||
INCLUDE(InstallSettings)
|
|
||||||
|
|
||||||
##################### Look for required libraries ######################
|
##################### Look for required libraries ######################
|
||||||
|
|
||||||
# Add QT dependencies
|
# Add QT dependencies
|
||||||
@ -19,33 +8,3 @@ FIND_PACKAGE(Qt5Widgets REQUIRED)
|
|||||||
|
|
||||||
######################### Add Primary Targets ##########################
|
######################### Add Primary Targets ##########################
|
||||||
ADD_SUBDIRECTORY(src)
|
ADD_SUBDIRECTORY(src)
|
||||||
|
|
||||||
########################## Add the Examples ############################
|
|
||||||
OPTION (BUILD_EXAMPLES "Build Examples" ON)
|
|
||||||
IF(BUILD_EXAMPLES)
|
|
||||||
ADD_SUBDIRECTORY(examples)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
######################### Installation Stuff ###########################
|
|
||||||
INCLUDE(InstallProjectConfig)
|
|
||||||
|
|
||||||
###################### Add uninstall target ############################
|
|
||||||
ADD_CUSTOM_TARGET(uninstall
|
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${PROJECT_CMAKE_DIR}/cmake_uninstall.cmake)
|
|
||||||
|
|
||||||
##################### Show Configuration Summary ######################
|
|
||||||
MESSAGE(STATUS "===============================================================")
|
|
||||||
MESSAGE(STATUS "================ Configuration Summary ======================")
|
|
||||||
MESSAGE(STATUS "Project Name: ${PROJECT_NAME}")
|
|
||||||
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
|
||||||
MESSAGE(STATUS "Build type Flags: ${CMAKE_BUILD_TYPE_FLAGS}")
|
|
||||||
MESSAGE(STATUS "C++ compile flags: ${CMAKE_CXX_FLAGS}")
|
|
||||||
MESSAGE(STATUS "Install Path: ${CMAKE_INSTALL_PREFIX}")
|
|
||||||
MESSAGE(STATUS "Build Examples: ${BUILD_EXAMPLES}")
|
|
||||||
IF(Qt5Widgets_FOUND)
|
|
||||||
MESSAGE(STATUS "QT Version: ${Qt5Widgets_VERSION_STRING}")
|
|
||||||
MESSAGE(STATUS "QT INCLUDE DIRS: ${Qt5Widgets_INCLUDE_DIRS}")
|
|
||||||
MESSAGE(STATUS "QT COMPILE DEFS: ${Qt5Widgets_COMPILE_DEFINITIONS}")
|
|
||||||
MESSAGE(STATUS "QT DEFS: ${Qt5Widgets_DEFINITIONS}")
|
|
||||||
MESSAGE(STATUS "QT EXE FLAGS: ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
|
||||||
ENDIF()
|
|
||||||
|
29
3rdparty/QtPropertyBrowser/src/CMakeLists.txt
vendored
29
3rdparty/QtPropertyBrowser/src/CMakeLists.txt
vendored
@ -16,9 +16,6 @@ set(_SRCS
|
|||||||
qtvariantproperty.cpp
|
qtvariantproperty.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
file(GLOB _IMPL_HDRS *.h)
|
|
||||||
file(GLOB _PUBLIC_HDRS Qt*)
|
|
||||||
|
|
||||||
set(_UI_FORMS
|
set(_UI_FORMS
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -31,34 +28,10 @@ QT5_ADD_RESOURCES(_QRC_SRCS ${_RESOURCES})
|
|||||||
|
|
||||||
set(TARGET_NAME ${PROJECT_NAME})
|
set(TARGET_NAME ${PROJECT_NAME})
|
||||||
|
|
||||||
add_library(${TARGET_NAME}
|
add_library(${TARGET_NAME} STATIC
|
||||||
${_SRCS}
|
${_SRCS}
|
||||||
${_UI_SRCS}
|
${_UI_SRCS}
|
||||||
${_QRC_SRCS}
|
${_QRC_SRCS}
|
||||||
${_IMPL_HDRS}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${TARGET_NAME} Qt5::Widgets)
|
target_link_libraries(${TARGET_NAME} Qt5::Widgets)
|
||||||
|
|
||||||
######################### Installation Stuff ###########################
|
|
||||||
include(GenerateExportHeader)
|
|
||||||
generate_export_header(${TARGET_NAME})
|
|
||||||
|
|
||||||
install(TARGETS ${TARGET_NAME}
|
|
||||||
EXPORT ${TARGET_NAME}Targets
|
|
||||||
RUNTIME DESTINATION ${INSTALL_BIN_DIR}
|
|
||||||
LIBRARY DESTINATION ${INSTALL_LIB_DIR}
|
|
||||||
ARCHIVE DESTINATION ${INSTALL_LIB_DIR}
|
|
||||||
INCLUDES DESTINATION ${INSTALL_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES
|
|
||||||
${_PUBLIC_HDRS}
|
|
||||||
${_IMPL_HDRS}
|
|
||||||
DESTINATION
|
|
||||||
${INSTALL_INCLUDE_DIR}
|
|
||||||
COMPONENT
|
|
||||||
Devel
|
|
||||||
)
|
|
||||||
|
|
||||||
|
@ -626,4 +626,4 @@ bool QtButtonPropertyBrowser::isExpanded(QtBrowserItem *item) const
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "moc_qtbuttonpropertybrowser.hpp"
|
#include "moc_qtbuttonpropertybrowser.cpp"
|
||||||
|
@ -2575,5 +2575,5 @@ void QtFontEditorFactory::disconnectPropertyManager(QtFontPropertyManager *manag
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "moc_qteditorfactory.hpp"
|
#include "moc_qteditorfactory.cpp"
|
||||||
#include "qteditorfactory.moc"
|
#include "qteditorfactory.moc"
|
||||||
|
@ -533,4 +533,4 @@ void QtGroupBoxPropertyBrowser::itemChanged(QtBrowserItem *item)
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "moc_qtgroupboxpropertybrowser.hpp"
|
#include "moc_qtgroupboxpropertybrowser.cpp"
|
||||||
|
@ -2045,4 +2045,4 @@ void QtAbstractPropertyBrowser::setCurrentItem(QtBrowserItem *item)
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "moc_qtpropertybrowser.hpp"
|
#include "moc_qtpropertybrowser.cpp"
|
||||||
|
@ -6421,5 +6421,5 @@ void QtCursorPropertyManager::uninitializeProperty(QtProperty *property)
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "moc_qtpropertymanager.hpp"
|
#include "moc_qtpropertymanager.cpp"
|
||||||
#include "qtpropertymanager.moc"
|
#include "qtpropertymanager.moc"
|
||||||
|
@ -1072,5 +1072,5 @@ void QtTreePropertyBrowser::editItem(QtBrowserItem *item)
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "moc_qttreepropertybrowser.hpp"
|
#include "moc_qttreepropertybrowser.cpp"
|
||||||
#include "qttreepropertybrowser.moc"
|
#include "qttreepropertybrowser.moc"
|
||||||
|
@ -2355,4 +2355,4 @@ void QtVariantEditorFactory::disconnectPropertyManager(QtVariantPropertyManager
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "moc_qtvariantproperty.hpp"
|
#include "moc_qtvariantproperty.cpp"
|
||||||
|
@ -15,6 +15,10 @@ find_package(PythonLibs 3.5 REQUIRED)
|
|||||||
|
|
||||||
find_package(Boost REQUIRED COMPONENTS ${boost_libs})
|
find_package(Boost REQUIRED COMPONENTS ${boost_libs})
|
||||||
|
|
||||||
|
# Find the Qt5 libraries
|
||||||
|
find_package(Qt5 COMPONENTS Core Widgets OpenGL REQUIRED)
|
||||||
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
# Get the latest abbreviated commit hash of the working branch
|
# Get the latest abbreviated commit hash of the working branch
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND git log -1 --format=%h
|
COMMAND git log -1 --format=%h
|
||||||
@ -23,9 +27,11 @@ execute_process(
|
|||||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
add_subdirectory(3rdparty/googletest/googletest EXCLUDE_FROM_ALL)
|
add_subdirectory(3rdparty/googletest/googletest generated/3rdparty/googletest EXCLUDE_FROM_ALL)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|
||||||
|
add_subdirectory(3rdparty/QtPropertyBrowser generated/3rdparty/QtPropertyBrowser)
|
||||||
|
|
||||||
add_definitions("-DGIT_COMMIT_HASH=${GIT_COMMIT_HASH}")
|
add_definitions("-DGIT_COMMIT_HASH=${GIT_COMMIT_HASH}")
|
||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/common/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/generated/version.h
|
${CMAKE_CURRENT_SOURCE_DIR}/common/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/generated/version.h
|
||||||
@ -72,7 +78,6 @@ endif ()
|
|||||||
if (NOT Boost_PYTHON_FOUND )
|
if (NOT Boost_PYTHON_FOUND )
|
||||||
message( FATAL_ERROR "No version of Boost::Python 3.x could be found.")
|
message( FATAL_ERROR "No version of Boost::Python 3.x could be found.")
|
||||||
endif ()
|
endif ()
|
||||||
include(gui/gui.cmake)
|
|
||||||
|
|
||||||
include_directories(common/ gui/ frontend/json ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} 3rdparty/QtPropertyBrowser/src)
|
include_directories(common/ gui/ frontend/json ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} 3rdparty/QtPropertyBrowser/src)
|
||||||
aux_source_directory(common/ COMMON_SRC_FILES)
|
aux_source_directory(common/ COMMON_SRC_FILES)
|
||||||
@ -88,8 +93,11 @@ foreach (family ${FAMILIES})
|
|||||||
string(TOUPPER ${family} ufamily)
|
string(TOUPPER ${family} ufamily)
|
||||||
aux_source_directory(${family}/ ${ufamily}_FILES)
|
aux_source_directory(${family}/ ${ufamily}_FILES)
|
||||||
aux_source_directory(tests/${family}/ ${ufamily}_TEST_FILES)
|
aux_source_directory(tests/${family}/ ${ufamily}_TEST_FILES)
|
||||||
|
|
||||||
|
add_subdirectory(gui generated/gui/${family})
|
||||||
|
|
||||||
# Add the CLI binary target
|
# Add the CLI binary target
|
||||||
add_executable(nextpnr-${family} ${COMMON_FILES} ${${ufamily}_FILES} ${GUI_SOURCE_FILES})
|
add_executable(nextpnr-${family} ${COMMON_FILES} ${${ufamily}_FILES} )
|
||||||
install(TARGETS nextpnr-${family} RUNTIME DESTINATION bin)
|
install(TARGETS nextpnr-${family} RUNTIME DESTINATION bin)
|
||||||
target_compile_definitions(nextpnr-${family} PRIVATE MAIN_EXECUTABLE)
|
target_compile_definitions(nextpnr-${family} PRIVATE MAIN_EXECUTABLE)
|
||||||
|
|
||||||
@ -107,9 +115,9 @@ foreach (family ${FAMILIES})
|
|||||||
include(${family}/family.cmake)
|
include(${family}/family.cmake)
|
||||||
foreach (target ${family_targets})
|
foreach (target ${family_targets})
|
||||||
# Include family-specific source files to all family targets and set defines appropriately
|
# Include family-specific source files to all family targets and set defines appropriately
|
||||||
target_include_directories(${target} PRIVATE ${family}/)
|
target_include_directories(${target} PRIVATE ${family}/ generated/)
|
||||||
target_compile_definitions(${target} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family} QT_NO_KEYWORDS)
|
target_compile_definitions(${target} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family} QT_NO_KEYWORDS)
|
||||||
target_link_libraries(${target} LINK_PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${GUI_LIBRARY_FILES})
|
target_link_libraries(${target} LINK_PUBLIC gui_${family} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${GUI_LIBRARY_FILES_${ufamily}})
|
||||||
endforeach (target)
|
endforeach (target)
|
||||||
endforeach (family)
|
endforeach (family)
|
||||||
|
|
||||||
|
@ -314,7 +314,12 @@ class SAPlacer
|
|||||||
load_cell->bel, ctx->portPinFromId(load.port));
|
load_cell->bel, ctx->portPinFromId(load.port));
|
||||||
// wirelength += std::abs(load_x - driver_x) + std::abs(load_y -
|
// wirelength += std::abs(load_x - driver_x) + std::abs(load_y -
|
||||||
// driver_y);
|
// driver_y);
|
||||||
wirelength += ctx->estimateDelay(drv_wire, user_wire);
|
delay_t raw_wl = ctx->estimateDelay(drv_wire, user_wire);
|
||||||
|
wirelength += pow(1.3, (ctx->getDelayNS(raw_wl) -
|
||||||
|
ctx->getDelayNS(load.budget)) /
|
||||||
|
10) +
|
||||||
|
ctx->getDelayNS(raw_wl);
|
||||||
|
// wirelength += pow(ctx->estimateDelay(drv_wire, user_wire), 2.0);
|
||||||
}
|
}
|
||||||
return wirelength;
|
return wirelength;
|
||||||
}
|
}
|
||||||
@ -376,9 +381,8 @@ class SAPlacer
|
|||||||
delta = new_wirelength - curr_wirelength;
|
delta = new_wirelength - curr_wirelength;
|
||||||
n_move++;
|
n_move++;
|
||||||
// SA acceptance criterea
|
// SA acceptance criterea
|
||||||
if (delta < 0 ||
|
if (delta < 0 || (temp > 1e-6 && (ctx->rng() / float(0x3fffffff)) <=
|
||||||
(temp > 1e-6 &&
|
std::exp(-delta / temp))) {
|
||||||
(ctx->rng() / float(0x3fffffff)) <= std::exp(-delta / temp))) {
|
|
||||||
n_accept++;
|
n_accept++;
|
||||||
if (delta < 0)
|
if (delta < 0)
|
||||||
improved = true;
|
improved = true;
|
||||||
|
@ -79,6 +79,14 @@ static delay_t follow_net(Context *ctx, NetInfo *net, int path_length,
|
|||||||
void assign_budget(Context *ctx, float default_clock)
|
void assign_budget(Context *ctx, float default_clock)
|
||||||
{
|
{
|
||||||
log_info("Annotating ports with timing budgets\n");
|
log_info("Annotating ports with timing budgets\n");
|
||||||
|
// Clear delays to a very high value first
|
||||||
|
delay_t default_slack = delay_t(1.0e12 / default_clock);
|
||||||
|
for (auto net : ctx->nets) {
|
||||||
|
for (auto &usr : net.second->users) {
|
||||||
|
usr.budget = default_slack;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Go through all clocked drivers and set up paths
|
||||||
for (auto cell : ctx->cells) {
|
for (auto cell : ctx->cells) {
|
||||||
for (auto port : cell.second->ports) {
|
for (auto port : cell.second->ports) {
|
||||||
if (port.second.type == PORT_OUT) {
|
if (port.second.type == PORT_OUT) {
|
||||||
@ -93,6 +101,23 @@ void assign_budget(Context *ctx, float default_clock)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const bool debug = true;
|
||||||
|
|
||||||
|
// Post-allocation check
|
||||||
|
for (auto net : ctx->nets) {
|
||||||
|
for (auto user : net.second->users) {
|
||||||
|
if (user.budget < 0)
|
||||||
|
log_warning("port %s.%s, connected to net '%s', has negative "
|
||||||
|
"timing budget of %fns\n",
|
||||||
|
user.cell->name.c_str(ctx), user.port.c_str(ctx),
|
||||||
|
net.first.c_str(ctx), ctx->getDelayNS(user.budget));
|
||||||
|
if (debug)
|
||||||
|
log_warning("port %s.%s, connected to net '%s', has "
|
||||||
|
"timing budget of %fns\n",
|
||||||
|
user.cell->name.c_str(ctx), user.port.c_str(ctx),
|
||||||
|
net.first.c_str(ctx), ctx->getDelayNS(user.budget));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
15
gui/CMakeLists.txt
Normal file
15
gui/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
|
aux_source_directory(. GUI_SOURCE_FILES)
|
||||||
|
set(_RESOURCES nextpnr.qrc)
|
||||||
|
|
||||||
|
qt5_add_resources(GUI_RESOURCE_FILES ${_RESOURCES})
|
||||||
|
|
||||||
|
set(GUI_LIBRARY_FILES_${ufamily} Qt5::Widgets Qt5::OpenGL ${OPENGL_LIBRARIES} QtPropertyBrowser PARENT_SCOPE)
|
||||||
|
|
||||||
|
add_library(gui_${family} STATIC ${GUI_SOURCE_FILES} ${GUI_RESOURCE_FILES})
|
||||||
|
|
||||||
|
target_include_directories(gui_${family} PRIVATE ../${family}/)
|
||||||
|
target_compile_definitions(gui_${family} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family} QT_NO_KEYWORDS)
|
||||||
|
target_link_libraries(gui_${family} Qt5::Widgets)
|
@ -1,60 +0,0 @@
|
|||||||
include(CMakeParseArguments)
|
|
||||||
|
|
||||||
# qt5_wrap_ui_custom(outfiles inputfile ... )
|
|
||||||
|
|
||||||
function(QT5_WRAP_UI_CUSTOM outfiles )
|
|
||||||
set(options)
|
|
||||||
set(oneValueArgs)
|
|
||||||
set(multiValueArgs OPTIONS)
|
|
||||||
|
|
||||||
cmake_parse_arguments(_WRAP_UI "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
|
||||||
|
|
||||||
set(ui_files ${_WRAP_UI_UNPARSED_ARGUMENTS})
|
|
||||||
set(ui_options ${_WRAP_UI_OPTIONS})
|
|
||||||
|
|
||||||
foreach(it ${ui_files})
|
|
||||||
get_filename_component(outfile ${it} NAME_WE)
|
|
||||||
get_filename_component(infile ${it} ABSOLUTE)
|
|
||||||
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/generated/ui_${outfile}.h)
|
|
||||||
add_custom_command(OUTPUT ${outfile}
|
|
||||||
COMMAND ${Qt5Widgets_UIC_EXECUTABLE}
|
|
||||||
ARGS ${ui_options} -o ${outfile} ${infile}
|
|
||||||
MAIN_DEPENDENCY ${infile} VERBATIM)
|
|
||||||
list(APPEND ${outfiles} ${outfile})
|
|
||||||
endforeach()
|
|
||||||
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
# qt5_add_resources_custom(outfiles inputfile ... )
|
|
||||||
|
|
||||||
function(QT5_ADD_RESOURCES_CUSTOM outfiles )
|
|
||||||
|
|
||||||
set(options)
|
|
||||||
set(oneValueArgs)
|
|
||||||
set(multiValueArgs OPTIONS)
|
|
||||||
|
|
||||||
cmake_parse_arguments(_RCC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
|
||||||
|
|
||||||
set(rcc_files ${_RCC_UNPARSED_ARGUMENTS})
|
|
||||||
set(rcc_options ${_RCC_OPTIONS})
|
|
||||||
|
|
||||||
if("${rcc_options}" MATCHES "-binary")
|
|
||||||
message(WARNING "Use qt5_add_binary_resources for binary option")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
foreach(it ${rcc_files})
|
|
||||||
get_filename_component(outfilename ${it} NAME_WE)
|
|
||||||
get_filename_component(infile ${it} ABSOLUTE)
|
|
||||||
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/generated/qrc_${outfilename}.cc)
|
|
||||||
|
|
||||||
_QT5_PARSE_QRC_FILE(${infile} _out_depends _rc_depends)
|
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${outfile}
|
|
||||||
COMMAND ${Qt5Core_RCC_EXECUTABLE}
|
|
||||||
ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile}
|
|
||||||
MAIN_DEPENDENCY ${infile}
|
|
||||||
DEPENDS ${_rc_depends} "${out_depends}" VERBATIM)
|
|
||||||
list(APPEND ${outfiles} ${outfile})
|
|
||||||
endforeach()
|
|
||||||
set(${outfiles} ${${outfiles}} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
@ -1,66 +0,0 @@
|
|||||||
# Find the Qt5 libraries
|
|
||||||
find_package(Qt5 COMPONENTS Core Widgets OpenGL REQUIRED)
|
|
||||||
find_package(OpenGL REQUIRED)
|
|
||||||
|
|
||||||
include( gui/Qt5Customizations.cmake )
|
|
||||||
|
|
||||||
# Find includes in corresponding build directories
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/generated)
|
|
||||||
|
|
||||||
qt5_generate_moc(gui/mainwindow.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_mainwindow.cc)
|
|
||||||
qt5_generate_moc(gui/fpgaviewwidget.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_fpgaviewwidget.cc)
|
|
||||||
qt5_generate_moc(gui/pythontab.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_pythontab.cc)
|
|
||||||
qt5_generate_moc(gui/infotab.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_infotab.cc)
|
|
||||||
qt5_generate_moc(gui/designwidget.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_designwidget.cc)
|
|
||||||
qt5_generate_moc(gui/line_editor.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_line_editor.cc)
|
|
||||||
|
|
||||||
set(GENERATED_MOC_FILES
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_mainwindow.cc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_fpgaviewwidget.cc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_pythontab.cc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_infotab.cc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_designwidget.cc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_line_editor.cc
|
|
||||||
)
|
|
||||||
|
|
||||||
qt5_add_resources_custom(GUI_RESOURCE_FILES gui/nextpnr.qrc)
|
|
||||||
|
|
||||||
aux_source_directory(gui/ GUI_ALL_SOURCE_FILES)
|
|
||||||
set(GUI_SOURCE_FILES ${GUI_ALL_SOURCE_FILES} ${GENERATED_MOC_FILES} ${GENERATED_UI_HEADERS} ${GUI_RESOURCE_FILES})
|
|
||||||
set(GUI_LIBRARY_FILES Qt5::Widgets Qt5::OpenGL ${OPENGL_LIBRARIES} QtPropertyBrowser)
|
|
||||||
|
|
||||||
|
|
||||||
add_library(QtPropertyBrowser STATIC "")
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qtpropertybrowser.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtpropertybrowser.hpp)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qtgroupboxpropertybrowser.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtgroupboxpropertybrowser.hpp)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qtvariantproperty.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtvariantproperty.hpp)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qtpropertymanager.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtpropertymanager.hpp)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qtbuttonpropertybrowser.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtbuttonpropertybrowser.hpp)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qteditorfactory.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qteditorfactory.hpp)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qttreepropertybrowser.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qttreepropertybrowser.hpp)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qtpropertybrowserutils_p.h ${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtpropertybrowserutils_p.cpp)
|
|
||||||
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qtpropertymanager.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated/qtpropertymanager.moc)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qttreepropertybrowser.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated/qttreepropertybrowser.moc)
|
|
||||||
qt5_generate_moc(3rdparty/QtPropertyBrowser/src/qteditorfactory.cpp ${CMAKE_CURRENT_BINARY_DIR}/generated/qteditorfactory.moc)
|
|
||||||
|
|
||||||
set(QTPB_GENERATED_MOC_FILES
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtpropertybrowser.hpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtgroupboxpropertybrowser.hpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtvariantproperty.hpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtpropertymanager.hpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtbuttonpropertybrowser.hpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qteditorfactory.hpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qttreepropertybrowser.hpp
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/qtpropertymanager.moc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/qttreepropertybrowser.moc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/qteditorfactory.moc
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/generated/moc_qtpropertybrowserutils_p.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
qt5_add_resources_custom(QTPB_RESOURCE_FILES 3rdparty/QtPropertyBrowser/src/qtpropertybrowser.qrc)
|
|
||||||
aux_source_directory(3rdparty/QtPropertyBrowser/src/ QTPROPBROWSER_SRC_ALL)
|
|
||||||
target_sources(QtPropertyBrowser PRIVATE ${QTPROPBROWSER_SRC_ALL} ${QTPB_GENERATED_MOC_FILES} ${QTPB_RESOURCE_FILES})
|
|
||||||
target_include_directories(QtPropertyBrowser PRIVATE 3rdparty/QtPropertyBrowser/src generated)
|
|
||||||
target_link_libraries(QtPropertyBrowser PRIVATE Qt5::Core Qt5::Widgets)
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
|||||||
MainWindow::MainWindow(Context *_ctx, QWidget *parent)
|
MainWindow::MainWindow(Context *_ctx, QWidget *parent)
|
||||||
: QMainWindow(parent), ctx(_ctx)
|
: QMainWindow(parent), ctx(_ctx)
|
||||||
{
|
{
|
||||||
|
Q_INIT_RESOURCE(nextpnr);
|
||||||
|
|
||||||
log_files.clear();
|
log_files.clear();
|
||||||
log_streams.clear();
|
log_streams.clear();
|
||||||
log_write_function = [this](std::string text) { info->info(text); };
|
log_write_function = [this](std::string text) { info->info(text); };
|
||||||
|
@ -224,8 +224,16 @@ int main(int argc, char *argv[])
|
|||||||
if (vm.count("tmfuzz")) {
|
if (vm.count("tmfuzz")) {
|
||||||
std::vector<WireId> src_wires, dst_wires;
|
std::vector<WireId> src_wires, dst_wires;
|
||||||
|
|
||||||
for (auto w : ctx.getWires())
|
/*for (auto w : ctx.getWires())
|
||||||
src_wires.push_back(w);
|
src_wires.push_back(w);*/
|
||||||
|
for (auto b : ctx.getBels()) {
|
||||||
|
if (ctx.getBelType(b) == TYPE_ICESTORM_LC) {
|
||||||
|
src_wires.push_back(ctx.getWireBelPin(b, PIN_O));
|
||||||
|
}
|
||||||
|
if (ctx.getBelType(b) == TYPE_SB_IO) {
|
||||||
|
src_wires.push_back(ctx.getWireBelPin(b, PIN_D_IN_0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (auto b : ctx.getBels()) {
|
for (auto b : ctx.getBels()) {
|
||||||
if (ctx.getBelType(b) == TYPE_ICESTORM_LC) {
|
if (ctx.getBelType(b) == TYPE_ICESTORM_LC) {
|
||||||
@ -278,7 +286,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!pack_design(&ctx) && !ctx.force)
|
if (!pack_design(&ctx) && !ctx.force)
|
||||||
log_error("Packing design failed.\n");
|
log_error("Packing design failed.\n");
|
||||||
assign_budget(&ctx);
|
assign_budget(&ctx, 50e6);
|
||||||
print_utilisation(&ctx);
|
print_utilisation(&ctx);
|
||||||
|
|
||||||
if (!vm.count("pack-only")) {
|
if (!vm.count("pack-only")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user