aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/lib/rfnoc/rfnoc_python.hpp118
1 files changed, 64 insertions, 54 deletions
diff --git a/host/lib/rfnoc/rfnoc_python.hpp b/host/lib/rfnoc/rfnoc_python.hpp
index 2b0b2df4b..6eb669b1c 100644
--- a/host/lib/rfnoc/rfnoc_python.hpp
+++ b/host/lib/rfnoc/rfnoc_python.hpp
@@ -280,133 +280,143 @@ void export_rfnoc(py::module& m)
uhd::property_tree::sptr tree = self->get_tree();
return tree;
})
- .def("poke32",
- [](noc_block_base::sptr& self, uint32_t addr, uint32_t data) {
- self->regs().poke32(addr, data);
+ .def(
+ "poke32",
+ [](noc_block_base& self, uint32_t addr, uint32_t data) {
+ self.regs().poke32(addr, data);
},
py::arg("addr"),
py::arg("data"))
- .def("poke32",
- [](noc_block_base::sptr& self,
+ .def(
+ "poke32",
+ [](noc_block_base& self,
uint32_t addr,
uint32_t data,
uhd::time_spec_t time,
- bool ack = false) { self->regs().poke32(addr, data, time, ack); },
+ bool ack = false) { self.regs().poke32(addr, data, time, ack); },
py::arg("addr"),
py::arg("data"),
py::arg("time"),
py::arg("ack") = false)
- .def("poke64",
- [](noc_block_base::sptr& self, uint32_t addr, uint64_t data) {
- self->regs().poke64(addr, data);
+ .def(
+ "poke64",
+ [](noc_block_base& self, uint32_t addr, uint64_t data) {
+ self.regs().poke64(addr, data);
},
py::arg("addr"),
py::arg("data"))
- .def("poke64",
- [](noc_block_base::sptr& self,
+ .def(
+ "poke64",
+ [](noc_block_base& self,
uint32_t addr,
uint32_t data,
uhd::time_spec_t time,
- bool ack = false) { self->regs().poke64(addr, data, time, ack); },
+ bool ack = false) { self.regs().poke64(addr, data, time, ack); },
py::arg("addr"),
py::arg("data"),
py::arg("time"),
py::arg("ack") = false)
- .def("multi_poke32",
- [](noc_block_base::sptr& self,
+ .def(
+ "multi_poke32",
+ [](noc_block_base& self,
std::vector<uint32_t> addr,
- std::vector<uint32_t> data) { self->regs().multi_poke32(addr, data); },
+ std::vector<uint32_t> data) { self.regs().multi_poke32(addr, data); },
py::arg("addr"),
py::arg("data"))
- .def("multi_poke32",
- [](noc_block_base::sptr& self,
+ .def(
+ "multi_poke32",
+ [](noc_block_base& self,
std::vector<uint32_t> addr,
std::vector<uint32_t> data,
uhd::time_spec_t time,
- bool ack = false) { self->regs().multi_poke32(addr, data, time, ack); },
+ bool ack = false) { self.regs().multi_poke32(addr, data, time, ack); },
py::arg("addr"),
py::arg("data"),
py::arg("time"),
py::arg("ack") = false)
- .def("block_poke32",
- [](noc_block_base::sptr& self,
- uint32_t first_addr,
- std::vector<uint32_t> data) {
- self->regs().block_poke32(first_addr, data);
+ .def(
+ "block_poke32",
+ [](noc_block_base& self, uint32_t first_addr, std::vector<uint32_t> data) {
+ self.regs().block_poke32(first_addr, data);
},
py::arg("first_addr"),
py::arg("data"))
- .def("block_poke32",
- [](noc_block_base::sptr& self,
+ .def(
+ "block_poke32",
+ [](noc_block_base& self,
uint32_t first_addr,
std::vector<uint32_t> data,
uhd::time_spec_t time,
bool ack = false) {
- self->regs().block_poke32(first_addr, data, time, ack);
+ self.regs().block_poke32(first_addr, data, time, ack);
},
py::arg("first_addr"),
py::arg("data"),
py::arg("time"),
py::arg("ack") = false)
- .def("peek32",
- [](noc_block_base::sptr& self, uint32_t addr) {
- return self->regs().peek32(addr);
- },
+ .def(
+ "peek32",
+ [](noc_block_base& self, uint32_t addr) { return self.regs().peek32(addr); },
py::arg("addr"))
- .def("peek32",
- [](noc_block_base::sptr& self, uint32_t addr, uhd::time_spec_t time) {
- return self->regs().peek32(addr, time);
+ .def(
+ "peek32",
+ [](noc_block_base& self, uint32_t addr, uhd::time_spec_t time) {
+ return self.regs().peek32(addr, time);
},
py::arg("addr"),
py::arg("time"))
- .def("peek64",
- [](noc_block_base::sptr& self, uint32_t addr) {
- return self->regs().peek64(addr);
- },
+ .def(
+ "peek64",
+ [](noc_block_base& self, uint32_t addr) { return self.regs().peek64(addr); },
py::arg("addr"))
- .def("peek64",
- [](noc_block_base::sptr& self, uint32_t addr, uhd::time_spec_t time) {
- return self->regs().peek64(addr, time);
+ .def(
+ "peek64",
+ [](noc_block_base& self, uint32_t addr, uhd::time_spec_t time) {
+ return self.regs().peek64(addr, time);
},
py::arg("addr"),
py::arg("time"))
- .def("block_peek32",
- [](noc_block_base::sptr& self, uint32_t first_addr, size_t length) {
- return self->regs().block_peek32(first_addr, length);
+ .def(
+ "block_peek32",
+ [](noc_block_base& self, uint32_t first_addr, size_t length) {
+ return self.regs().block_peek32(first_addr, length);
},
py::arg("first_addr"),
py::arg("length"))
- .def("block_peek32",
- [](noc_block_base::sptr& self,
+ .def(
+ "block_peek32",
+ [](noc_block_base& self,
uint32_t first_addr,
size_t length,
uhd::time_spec_t time) {
- return self->regs().block_peek32(first_addr, length, time);
+ return self.regs().block_peek32(first_addr, length, time);
},
py::arg("first_addr"),
py::arg("length"),
py::arg("time"))
- .def("poll32",
- [](noc_block_base::sptr& self,
+ .def(
+ "poll32",
+ [](noc_block_base& self,
uint32_t addr,
uint32_t data,
uint32_t mask,
uhd::time_spec_t timeout) {
- return self->regs().poll32(addr, data, mask, timeout);
+ return self.regs().poll32(addr, data, mask, timeout);
},
py::arg("addr"),
py::arg("data"),
py::arg("mask"),
py::arg("timeout"))
- .def("poll32",
- [](noc_block_base::sptr& self,
+ .def(
+ "poll32",
+ [](noc_block_base& self,
uint32_t addr,
uint32_t data,
uint32_t mask,
uhd::time_spec_t timeout,
uhd::time_spec_t time,
bool ack = false) {
- return self->regs().poll32(addr, data, mask, timeout, time, ack);
+ return self.regs().poll32(addr, data, mask, timeout, time, ack);
},
py::arg("addr"),
py::arg("data"),
@@ -415,8 +425,8 @@ void export_rfnoc(py::module& m)
py::arg("time"),
py::arg("ack") = false)
.def("__repr__",
- [](noc_block_base::sptr& self) {
- return "<NocBlock for block ID '" + self->get_unique_id() + "'>";
+ [](noc_block_base& self) {
+ return "<NocBlock for block ID '" + self.get_unique_id() + "'>";
})
// node_t superclass methods--not worth having a separate Py class
// for them