Created
July 28, 2022 20:02
-
-
Save folknology/5fdd0a5915a8c2f60b7d74da75bf8abc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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