Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/nmigen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 72cf4ca9914b
Choose a base ref
...
head repository: m-labs/nmigen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8de00a07a89b
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Aug 25, 2019

  1. vendor.lattice_ecp5: revert default toolchain to Trellis.

    This was unintentionally changed in 7fc1058.
    whitequark committed Aug 25, 2019
    Copy the full SHA
    b4b5d9e View commit details

Commits on Aug 26, 2019

  1. back.verilog: bump Yosys version requirement to 0.9.

    whitequark committed Aug 26, 2019
    Copy the full SHA
    8de00a0 View commit details
Showing with 7 additions and 6 deletions.
  1. +6 −5 nmigen/back/verilog.py
  2. +1 −1 nmigen/vendor/lattice_ecp5.py
11 changes: 6 additions & 5 deletions nmigen/back/verilog.py
Original file line number Diff line number Diff line change
@@ -23,14 +23,14 @@ def _yosys_version():
raise YosysError("Could not find Yosys in PATH. Place `yosys` in PATH or specify "
"path explicitly via the YOSYS environment variable") from e

m = re.match(r"^Yosys ([\d.]+)\+(\d+)", version)
tag, offset = m[1], m[2]
m = re.match(r"^Yosys ([\d.]+)(?:\+(\d+))?", version)
tag, offset = m[1], m[2] or 0
return tuple(map(int, tag.split("."))), offset


def _convert_il_text(il_text, strip_src):
version, offset = _yosys_version()
if version < (0, 8):
if version < (0, 9):
raise YosysError("Yosys %d.%d is not suppored", *version)

attr_map = []
@@ -42,15 +42,16 @@ def _convert_il_text(il_text, strip_src):
read_ilang <<rtlil
{}
rtlil
proc_prune
{prune}proc_prune
proc_init
proc_arst
proc_dff
proc_clean
memory_collect
attrmap {}
write_verilog -norename
""".format(il_text, " ".join(attr_map))
""".format(il_text, " ".join(attr_map),
prune="# " if version == (0, 9) and offset == 0 else "")

popen = subprocess.Popen([os.getenv("YOSYS", "yosys"), "-q", "-"],
stdin=subprocess.PIPE,
2 changes: 1 addition & 1 deletion nmigen/vendor/lattice_ecp5.py
Original file line number Diff line number Diff line change
@@ -233,7 +233,7 @@ class LatticeECP5Platform(TemplatedPlatform):

# Common logic

def __init__(self, *, toolchain="Diamond"):
def __init__(self, *, toolchain="Trellis"):
super().__init__()

assert toolchain in ("Trellis", "Diamond")