Skip to content

Commit

Permalink
(broken) third round of review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravenslofty authored and gatecat committed Jan 3, 2024
1 parent 49d5058 commit 1bbcc5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 4 additions & 0 deletions common/kernel/pybindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "json_frontend.h"
#include "log.h"
#include "nextpnr.h"
#include "rust.h"

#include <fstream>
#include <memory>
Expand Down Expand Up @@ -248,6 +249,9 @@ PYBIND11_EMBEDDED_MODULE(MODULE_NAME, m)

m.def("parse_json", parse_json_shim);
m.def("load_design", load_design_shim, py::return_value_policy::take_ownership);
#ifdef USE_RUST
m.def("example_printnets", example_printnets);
#endif

auto region_cls = py::class_<ContextualWrapper<Region &>>(m, "Region");
readwrite_wrapper<Region &, decltype(&Region::name), &Region::name, conv_to_str<IdString>,
Expand Down
6 changes: 0 additions & 6 deletions ice40/arch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -643,12 +643,6 @@ std::vector<GroupId> Arch::getGroupGroups(GroupId group) const

bool Arch::place()
{
#ifdef USE_RUST
log_info("Calling Rust\n");
example_printnets(getCtx());
log_info("Returned from Rust\n");
#endif

std::string placer = str_or_default(settings, id_placer, defaultPlacer);
if (placer == "heap") {
PlacerHeapCfg cfg(getCtx());
Expand Down
2 changes: 1 addition & 1 deletion rust/rust.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ extern "C" {
*nets = new NetInfo*[size];
auto idx = 0;
for (auto& item : ctx->nets) {
*names[idx] = item.first.hash();
*names[idx] = item.first.index;
*nets[idx] = item.second.get();
idx++;
}
Expand Down

0 comments on commit 1bbcc5f

Please sign in to comment.