diff --git a/himbaechel/arch.cc b/himbaechel/arch.cc index 0262548b..3cbe2b1e 100644 --- a/himbaechel/arch.cc +++ b/himbaechel/arch.cc @@ -22,6 +22,7 @@ #include "chipdb.h" #include "log.h" #include "nextpnr.h" +#include #include "command.h" #include "placer1.h" @@ -61,16 +62,11 @@ void Arch::load_chipdb(const std::string &path) if (!args.chipdb_override.empty()) { db_path = args.chipdb_override; } else { - std::string separator; -#if defined(_WIN32) - separator = "\\"; -#else - separator = "/"; -#endif db_path = proc_share_dirname(); - db_path += "himbaechel"; - db_path += separator; + db_path += "himbaechel/"; db_path += path; + boost::filesystem::path p(db_path); + db_path = p.make_preferred().string(); } try { blob_file.open(db_path); diff --git a/himbaechel/uarch/gowin/gowin.cc b/himbaechel/uarch/gowin/gowin.cc index fdac5ed1..751f1865 100644 --- a/himbaechel/uarch/gowin/gowin.cc +++ b/himbaechel/uarch/gowin/gowin.cc @@ -128,17 +128,7 @@ void GowinImpl::init_database(Arch *arch) } } - char separator; -#if defined(_WIN32) - separator = '\\'; -#else - separator = '/'; -#endif - arch->load_chipdb(stringf( - "gowin%cchipdb-%s.bin", - separator, - family.c_str() - )); + arch->load_chipdb(stringf("gowin/chipdb-%s.bin", family.c_str())); // These fields go in the header of the output JSON file and can help // gowin_pack support different architectures