From 92422a463dc1fd16d02129972fd82292f26954d5 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 11 Jun 2020 16:19:40 +0000 Subject: [PATCH] back.cxxrtl: new backend. --- nmigen/back/cxxrtl.py | 27 +++++++++++++++++++++++++++ nmigen/cli.py | 12 ++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 nmigen/back/cxxrtl.py diff --git a/nmigen/back/cxxrtl.py b/nmigen/back/cxxrtl.py new file mode 100644 index 0000000..8010539 --- /dev/null +++ b/nmigen/back/cxxrtl.py @@ -0,0 +1,27 @@ +from .._yosys import * +from . import rtlil + + +__all__ = ["YosysError", "convert", "convert_fragment"] + + +def _convert_rtlil_text(rtlil_text, *, src_loc_at=0): + # FIXME: update this requirement once Yosys updates its node version + yosys = find_yosys(lambda ver: ver >= (0, 9)) + return yosys.run(["-q", "-"], """ +read_ilang <