mirror of
https://github.com/YosysHQ/yosys
synced 2026-02-11 11:24:33 +00:00
modify generator for pyosys/wrappers.cc instead of headers
This commit is contained in:
parent
fb864e91ee
commit
cf511628b0
5 changed files with 22 additions and 68 deletions
|
|
@ -701,6 +701,16 @@ class PyosysWrapperGenerator(object):
|
|||
|
||||
self.process_class_members(metadata, metadata, cls, basename)
|
||||
|
||||
if basename == "Design":
|
||||
print(
|
||||
'\t\t\t.def("run_pass", [](Design &s, std::vector<std::string> cmd) { Pass::call(cmd, &s); })',
|
||||
file=self.f,
|
||||
)
|
||||
print(
|
||||
'\t\t\t.def("run_pass", [](Design &s, std::string cmd) { Pass::call(cmd, &s); })',
|
||||
file=self.f,
|
||||
)
|
||||
|
||||
if expr := metadata.string_expr:
|
||||
print(
|
||||
f'\t\t.def("__str__", [](const {basename} &s) {{ return {expr}; }})',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue