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: 37152c733ead
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: e4ebe03115d5
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jun 2, 2019

  1. Copy the full SHA
    e4ebe03 View commit details
Showing with 6 additions and 3 deletions.
  1. +6 −3 nmigen/vendor/fpga/lattice_ice40.py
9 changes: 6 additions & 3 deletions nmigen/vendor/fpga/lattice_ice40.py
Original file line number Diff line number Diff line change
@@ -120,7 +120,8 @@ def toolchain_program(self, products, name, *, mode=None):
options = ["-S"]
if mode == "flash":
options = []
with tempfile.NamedTemporaryFile(prefix="nmigen_iceprog_") as bitstream_file:
with tempfile.NamedTemporaryFile(prefix="nmigen_iceprog_",
suffix=".bin") as bitstream_file:
bitstream_file.write(bitstream)
subprocess.run([iceprog, *options, bitstream_file.name], check=True)

@@ -129,7 +130,8 @@ class IceBurnProgrammerMixin:
def toolchain_program(self, products, name):
iceburn = os.environ.get("ICEBURN", "iCEburn")
bitstream = products.get("{}.bin".format(name))
with tempfile.NamedTemporaryFile(prefix="nmigen_iceburn_") as bitstream_file:
with tempfile.NamedTemporaryFile(prefix="nmigen_iceburn_",
suffix=".bin") as bitstream_file:
bitstream_file.write(bitstream)
subprocess.run([iceburn, "-evw", bitstream_file.name], check=True)

@@ -139,6 +141,7 @@ def toolchain_program(self, products, name):
tinyprog = os.environ.get("TINYPROG", "tinyprog")
options = ["-p"]
bitstream = products.get("{}.bin".format(name))
with tempfile.NamedTemporaryFile(prefix="nmigen_tinyprog_") as bitstream_file:
with tempfile.NamedTemporaryFile(prefix="nmigen_tinyprog_",
suffix=".bin") as bitstream_file:
bitstream_file.write(bitstream)
subprocess.run([tinyprog, *options, bitstream_file.name], check=True)