Skip to content

Instantly share code, notes, and snippets.

@folknology
Created July 28, 2022 20:02
Show Gist options
  • Save folknology/5fdd0a5915a8c2f60b7d74da75bf8abc to your computer and use it in GitHub Desktop.
Save folknology/5fdd0a5915a8c2f60b7d74da75bf8abc to your computer and use it in GitHub Desktop.
from amaranth import *
from mystorm.boards.icelogicbus import *
class Blink(Elaboratable):
def elaborate(self, platform):
led = platform.request("led")
# led = platform.request("tx")
timer = Signal(24)
m = Module()
m.d.sync += timer.eq(timer + 1)
m.d.comb += led.eq(timer[-1])
return m
def synth():
platform = IceLogicBusPlatform()
platform.build(Blink(), do_program=True)
if __name__ == "__main__":
synth()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment