Last active
December 21, 2015 16:09
-
-
Save cfelton/6331499 to your computer and use it in GitHub Desktop.
Extremely un-pythonic migen code snip. From example https://github.com/milkymist/milkymist-ng/blob/6d71e09281bfba4fabd55dc2b1fdd59d32bf5254/milkymist/asmicon/bankmachine.py
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
fsm.act(fsm.REGULAR,If(self.refresh_req,fsm.next_state(fsm.REFRESH)).Elif(cmdsource.stb, | |
If(has_openrow, If(hit, | |
# NB: write-to-read specification is enforced by multiplexer | |
self.cmd.stb.eq(1),cmdsource.ack.eq(self.cmd.ack),self.cmd.is_read.eq(~cmdsource.we), | |
self.cmd.is_write.eq(cmdsource.we),self.cmd.cas_n.eq(0), | |
self.cmd.we_n.eq(~cmdsource.we)).Else(fsm.next_state(fsm.PRECHARGE)) | |
).Else(fsm.next_state(fsm.ACTIVATE)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment