Merge pull request #721 from YosysHQ/gatecat/mistral-cmake
Updates for latest libmistral
This commit is contained in:
commit
4e85203a13
2
.github/ci/build_mistral.sh
vendored
2
.github/ci/build_mistral.sh
vendored
@ -19,6 +19,6 @@ function build_nextpnr {
|
||||
|
||||
function run_archcheck {
|
||||
pushd build
|
||||
./nextpnr-mistral --mistral ${MISTRAL_PATH} --device 5CEBA2F17A7 --test
|
||||
./nextpnr-mistral --device 5CEBA2F17A7 --test
|
||||
popd
|
||||
}
|
||||
|
6
.github/workflows/mistral_ci.yml
vendored
6
.github/workflows/mistral_ci.yml
vendored
@ -18,15 +18,11 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install git make cmake libboost-all-dev python3-dev libeigen3-dev tcl-dev lzma-dev clang bison flex swig
|
||||
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1
|
||||
|
||||
- name: Execute build nextpnr
|
||||
env:
|
||||
MISTRAL_PATH: ${{ github.workspace }}/deps/mistral
|
||||
MISTRAL_REVISION: 7d4e6d2cca1ec05de3be0c9fef6acaed8089d329
|
||||
MISTRAL_REVISION: f22b32366d5fed997130712002c8f8de40eb42fc
|
||||
run: |
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
source ./.github/ci/build_mistral.sh
|
||||
get_dependencies
|
||||
build_nextpnr
|
||||
|
@ -346,6 +346,7 @@ string(REGEX REPLACE "[^;]*nexus/chipdb/chipdb-[^;]*.cc" "" CLANGFORMAT_FILES "$
|
||||
string(REGEX REPLACE "[^;]*/machxo2/chipdb/chipdb-[^;]*.cc" "" CLANGFORMAT_FILES "${CLANGFORMAT_FILES}")
|
||||
string(REGEX REPLACE "[^;]*/3rdparty[^;]*" "" CLANGFORMAT_FILES "${CLANGFORMAT_FILES}")
|
||||
string(REGEX REPLACE "[^;]*/generated[^;]*" "" CLANGFORMAT_FILES "${CLANGFORMAT_FILES}")
|
||||
string(REGEX REPLACE "[^;]*/libmistral/[^;]*" "" CLANGFORMAT_FILES "${CLANGFORMAT_FILES}")
|
||||
|
||||
add_custom_target(
|
||||
clangformat
|
||||
|
@ -46,7 +46,7 @@ void IdString::initialize_arch(const BaseCtx *ctx)
|
||||
Arch::Arch(ArchArgs args)
|
||||
{
|
||||
this->args = args;
|
||||
this->cyclonev = mistral::CycloneV::get_model(args.device, args.mistral_root);
|
||||
this->cyclonev = mistral::CycloneV::get_model(args.device);
|
||||
NPNR_ASSERT(this->cyclonev != nullptr);
|
||||
|
||||
// Setup fast identifier maps
|
||||
|
@ -34,7 +34,6 @@ NEXTPNR_NAMESPACE_BEGIN
|
||||
struct ArchArgs
|
||||
{
|
||||
std::string device;
|
||||
std::string mistral_root;
|
||||
};
|
||||
|
||||
// These structures are used for fast ALM validity checking
|
||||
|
@ -1,13 +1,12 @@
|
||||
set(MISTRAL_ROOT "" CACHE STRING "Mistral install path")
|
||||
set(MISTRAL_DONT_INSTALL ON)
|
||||
|
||||
aux_source_directory(${MISTRAL_ROOT}/lib MISTRAL_LIB_FILES)
|
||||
add_library(mistral STATIC ${MISTRAL_LIB_FILES})
|
||||
target_compile_options(mistral PRIVATE -Wno-maybe-uninitialized -Wno-uninitialized -Wno-unknown-warning-option)
|
||||
add_subdirectory(${MISTRAL_ROOT}/libmistral ${CMAKE_CURRENT_BINARY_DIR}/libmistral)
|
||||
|
||||
find_package(LibLZMA REQUIRED)
|
||||
|
||||
foreach(family_target ${family_targets})
|
||||
target_include_directories(${family_target} PRIVATE ${MISTRAL_ROOT}/lib ${LIBLZMA_INCLUDE_DIRS})
|
||||
target_include_directories(${family_target} PRIVATE ${MISTRAL_ROOT}/libmistral ${LIBLZMA_INCLUDE_DIRS})
|
||||
target_link_libraries(${family_target} PRIVATE mistral ${LIBLZMA_LIBRARIES})
|
||||
# Currently required to avoid issues with mistral (LTO means the warnings can end up in nextpnr)
|
||||
target_link_options(${family_target} PRIVATE -Wno-maybe-uninitialized -Wno-uninitialized -Wno-unknown-warning-option)
|
||||
|
@ -47,7 +47,6 @@ MistralCommandHandler::MistralCommandHandler(int argc, char **argv) : CommandHan
|
||||
po::options_description MistralCommandHandler::getArchOptions()
|
||||
{
|
||||
po::options_description specific("Architecture specific options");
|
||||
specific.add_options()("mistral", po::value<std::string>(), "path to mistral root");
|
||||
specific.add_options()("device", po::value<std::string>(), "device name (e.g. 5CSEBA6U23I7)");
|
||||
specific.add_options()("qsf", po::value<std::string>(), "path to QSF constraints file");
|
||||
specific.add_options()("rbf", po::value<std::string>(), "RBF bitstream to write");
|
||||
@ -74,13 +73,9 @@ void MistralCommandHandler::customBitstream(Context *ctx)
|
||||
std::unique_ptr<Context> MistralCommandHandler::createContext(dict<std::string, Property> &values)
|
||||
{
|
||||
ArchArgs chipArgs;
|
||||
if (!vm.count("mistral")) {
|
||||
log_error("mistral must be specified on the command line\n");
|
||||
}
|
||||
if (!vm.count("device")) {
|
||||
log_error("device must be specified on the command line (e.g. --device 5CSEBA6U23I7)\n");
|
||||
}
|
||||
chipArgs.mistral_root = vm["mistral"].as<std::string>();
|
||||
chipArgs.device = vm["device"].as<std::string>();
|
||||
auto ctx = std::unique_ptr<Context>(new Context(chipArgs));
|
||||
if (vm.count("compress-rbf"))
|
||||
|
Loading…
Reference in New Issue
Block a user