FabM has quit [Quit: ChatZilla 0.9.91 [Iceweasel 31.2.0/20141102014832]]
sj_mackenzie has quit [Remote host closed the connection]
sj_mackenzie has joined #m-labs
sj_mackenzie has quit [Remote host closed the connection]
_florent_ has joined #m-labs
<sb0>
ysionneau, what is the POST-WRITE state for?
<ysionneau>
I introduced it to try to fix the "DDR" case on M1 but it didn't help in the end ... I should remove it and resend the patch I guess
<ysionneau>
I wanted to make sure I correctly resetted the cs_n and wrdata_en rddata_en
<sb0>
let me just remove it
<ysionneau>
and also the ack
<sb0>
also, cs_n can be tied to 0 iirc
<ysionneau>
but if it's done correctly in the IDLE state it should be ok
<sb0>
it's even likely that the toggling of cs_n messes up the write on the ddr
<ysionneau>
cs_n can stay low but then for NOPs I need to put RAS_N/CAS_N/WE_N to H
<sb0>
yes
<ysionneau>
by just touching cs_n I can do NOPs
<ysionneau>
instead of toggling the others signals
<ysionneau>
but yes I can give this a try to see if it's the origin of the issue
<sb0>
well you need to control ras/cas/we anyway
<sb0>
no need to touch cs
<sb0>
cs is only useful when you have several dram chips in parallel
<ysionneau>
I mean, when I want to go from a READ cmd to a NOP, I can just do cs_n.eq(1) and I have a NOP
<ysionneau>
if I leave cs_n to 0 then I need to switch the other wires to 1
<sb0>
by setting the reset value of ras_n/cas_n/we_n to 1, you have a nop whenever you don't touch them in the fsm
<ysionneau>
ah right
<ysionneau>
ok will try that this afternoon
<sb0>
also remember that fsm.act() statements are combinatorial
<ysionneau>
yes I discovered that, I thought at first that it was synchronous to the clock edge
<sb0>
so there's no "resetting" of some value you set in the previous state
<sb0>
"dfi.phases[rdphase].rddata_en.eq(1), dfi.phases[rdphase].wrdata_en.eq(1)," in the same state is obviously incorrect
<ysionneau>
I think I got this from simulating lasmicon but I can verify
<ysionneau>
at first indeed I was only doing the rddata_en (for the READ state)
<ysionneau>
I can recheck that
<sb0>
"Cat([phase.wrdata_mask for phase in dfi.phases]).eq(~bus.sel)" can probably go outside the fsm
<ysionneau>
I have to go, be back after lunch!
<sb0>
generally, use the reset value of signals and don't needlessly drive them in the fsm
<sb0>
stuff like "row_open.eq(0)," in IDLE is just clutter
<sb0>
<ysionneau> I wanted to make sure I correctly resetted the cs_n and wrdata_en rddata_en <ysionneau> and also the ack <<< as I said, fsm.act() is combinatorial so there's no need for thart
<GitHub60>
[migen] sbourdeauducq pushed 1 new commit to master: http://git.io/ZUcxAA
<GitHub60>
migen/master ee928a8 Yann Sionneau: Wishbone DownConverter: Fix sel signal
<sb0>
does the refresh work? I never intended a state to be both in act() and the entry state (first parameter) of delayed_enter()
<sb0>
the comment "# We let A10 be 0 to disable row Auto-Precharge" is misplaced
<sb0>
"If(~wb_access, NextState("IDLE")," in IDLE is also clutter
<sb0>
ah, well, no. it's just confusing. better have If(wb_access, ...) containing the above statements
<ysionneau>
12:34 < sb0> generally, use the reset value of signals and don't needlessly drive them in the fsm < ok I see
<ysionneau>
12:42 < sb0> does the refresh work? < works in simulation and I don't see problem on ARTIQ with the controller, maybe I should do lots of uncached reads from the BIOS to make sure
<sb0>
seems delayed_enter happen to work even if you use act on the same state if delay != 0
<sb0>
but you should still change it
<ysionneau>
humm by reading the generated code it seems the refresh should not work
<ysionneau>
it goes from prechargeall to idle, instead of going from prechargeall to refresh
<ysionneau>
oh, my prechargeall is wrong
<ysionneau>
god it's wrong
<ysionneau>
how did this happen to even work
<ysionneau>
ah no, the ras/cas/we was not in the same order so I misinterpreted the command, it was correct