We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mistyping the device value (in this example ICE40UP5K instead of iCE40UP5K) leads to unclear error messages on platform.build
device
ICE40UP5K
iCE40UP5K
platform.build
blinky.py
from nmigen import * import os import subprocess from nmigen.build import * from nmigen.vendor.lattice_ice40 import * from nmigen_boards.resources import * class board(LatticeICE40Platform): device = "ICE40UP5K" package = "SG48" resources = [ *LEDResources(pins="41", attrs=Attrs(IO_STANDARD="SB_LVCMOS")), ] connectors = [] def toolchain_program(self, products, name): iceprog = os.environ.get("ICEPROG", "iceprog") with products.extract("{}.bin".format(name)) as bitstream_filename: subprocess.check_call([iceprog, "-S", bitstream_filename]) class Blinky(Elaboratable): def elaborate(self, platform): led = platform.request("led", 0) timer = Signal(20) m = Module() m.domains.sync = sync = ClockDomain() m.submodules.osc = Instance( "SB_HFOSC", p_CLKHF_DIV="0b00", o_CLKHF=sync.clk, ) m.d.sync += timer.eq(timer + 1) m.d.comb += led.o.eq(timer[-1]) return m if __name__ == "__main__": platform = board() platform.build(Blinky(), do_program=False)
Error output:
ERROR: Unable to place cell 'osc_OSC' of type 'ICESTORM_HFOSC' ERROR: Packing design failed. 0 warnings, 2 errors Traceback (most recent call last): File "/home/jack/nmigen/examples/board/01_blinky.py", line 51, in <module> platform.build(Blinky(), do_program=False) File "/home/jack/.local/lib/python3.8/site-packages/nmigen/build/plat.py", line 82, in build products = plan.execute_local(build_dir) File "/home/jack/.local/lib/python3.8/site-packages/nmigen/build/run.py", line 98, in execute_local subprocess.check_call(["sh", "{}.sh".format(self.script)]) File "/usr/lib/python3.8/subprocess.py", line 364, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.
The text was updated successfully, but these errors were encountered:
3346f2c
No branches or pull requests
Mistyping the
device
value (in this exampleICE40UP5K
instead ofiCE40UP5K
) leads to unclear error messages onplatform.build
blinky.py
Error output:
The text was updated successfully, but these errors were encountered: