Skip to content

Commit 520913f

Browse files
committed
(broken) third round of review fixes
1 parent 90aeb67 commit 520913f

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

common/kernel/pybindings.cc

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "json_frontend.h"
2626
#include "log.h"
2727
#include "nextpnr.h"
28+
#include "rust.h"
2829

2930
#include <fstream>
3031
#include <memory>
@@ -248,6 +249,9 @@ PYBIND11_EMBEDDED_MODULE(MODULE_NAME, m)
248249

249250
m.def("parse_json", parse_json_shim);
250251
m.def("load_design", load_design_shim, py::return_value_policy::take_ownership);
252+
#ifdef USE_RUST
253+
m.def("example_printnets", example_printnets);
254+
#endif
251255

252256
auto region_cls = py::class_<ContextualWrapper<Region &>>(m, "Region");
253257
readwrite_wrapper<Region &, decltype(&Region::name), &Region::name, conv_to_str<IdString>,

ice40/arch.cc

-6
Original file line numberDiff line numberDiff line change
@@ -643,12 +643,6 @@ std::vector<GroupId> Arch::getGroupGroups(GroupId group) const
643643

644644
bool Arch::place()
645645
{
646-
#ifdef USE_RUST
647-
log_info("Calling Rust\n");
648-
example_printnets(getCtx());
649-
log_info("Returned from Rust\n");
650-
#endif
651-
652646
std::string placer = str_or_default(settings, id_placer, defaultPlacer);
653647
if (placer == "heap") {
654648
PlacerHeapCfg cfg(getCtx());

rust/rust.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ extern "C" {
142142
*nets = new NetInfo*[size];
143143
auto idx = 0;
144144
for (auto& item : ctx->nets) {
145-
*names[idx] = item.first.hash();
145+
*names[idx] = item.first.index;
146146
*nets[idx] = item.second.get();
147147
idx++;
148148
}

0 commit comments

Comments
 (0)