Skip to content

Instantly share code, notes, and snippets.

@cfelton
Last active December 21, 2015 16:09
Show Gist options
  • Save cfelton/6331499 to your computer and use it in GitHub Desktop.
Save cfelton/6331499 to your computer and use it in GitHub Desktop.
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