lekernel changed the topic of #m-labs to: Mixxeo, Migen, MiSoC & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
fengling has joined #m-labs
<stekern> ysionneau: (call ra) that is a bit surprising. I would have expected that the old value for ra would have been used the call and the new value to be written back at a later stage
<stekern> s/used the/used for the
<stekern> to me it would sound like you'd need special logic to behave like that
fengling has quit [Ping timeout: 276 seconds]
<mithro> so, anyone got a suggestions on how to figure out why half my ram is failing the memory initialisation test?
<sb0> does it work fine with sdrrd/sdrwr?
<sb0> that's not sdrrd/sdrwr
<sb0> you are not getting correct values
<sb0> it should be 0001101120213031
<mithro> sb0: I'm trying to figure out what the correct values are, but I don't understand the code in sdrwr
<sb0> also, if you do sdrwr 0, you will write to the first 8 locations
<sb0> (in a burst)
<sb0> and then sdrrd 0-7 will give you the different SDRAM burst orderings, which will help you determine if your reads or your writes are failing
<sb0> sdrwr/sdrrd just copy the passed value to the SDRAM address lines when asserting CAS
<sb0> also, if you consistently read the same (possibly incorrect) data, it's probably the write that failed
<sb0> wait, how many bits do you have?
<sb0> 16?
<sb0> (DQ lines on the SDRAM)
<sb0> sorry the expected value should be 0001020310111213
<mithro> according to the data sheet, density == 1G bits, the schematic has 16 DQ lines
<sb0> did you configure burst length 8?
<sb0> can you read an uninitialized address?
<sb0> eg sddrd 32
<mithro> sb0: probably not, where does that get configured?
<mithro> BIOS> sdrsw
<mithro> SDRAM now under software control
<mithro> BIOS> sdrrow
<mithro> Precharged
<mithro> BIOS> sdrrow 0
mithro has quit [Excess Flood]
mithro has joined #m-labs
<mithro> sorry about that :/
<mithro> pasted into IRC channel rather then paste bin :(
<sb0> ok
<sb0> sounds like you have a write problem, and the reads are probably fine
<sb0> and you're probably at the correct burst length too
<sb0> try changing the write latency
<mithro> this is where my knowledge of DDR starts to fail me - write latency is tWR? - tWR is set to what the datasheet and MIG seem to agree on... Should I increase that?
<sb0> either change the write latency in the DDR chip or in the PHY... and don't expect it to be straightforward
<sb0> DDR chips don't support all combinations of CAS/write latencies
<sb0> and the PHY might need some tweaking to get the S6 SERDES to output the data at a different time
<sb0> you may want to read the micron ddr2 datasheets, which are the best explained of all sdram manufacturers afaik
<GitHub33> [misoc] sbourdeauducq pushed 2 new commits to master: http://git.io/BXGj7w
<GitHub33> misoc/master 2388bfa Sebastien Bourdeauducq: bios: support DDR3 write leveling and read calibration. This makes the full DDR3 SODIMM work on the KC705.
<GitHub33> misoc/master a7b4550 Sebastien Bourdeauducq: sdramphy/initsequence: cleanup and expose DDR3 MR1 value
<sb0> in initsequence.py, there's a line "wr = 2" that you could perhaps use to change the write latency on the ddr chip - but check the datasheet before
<mithro> datasheet for my part is http://www.deutron.com.tw/pdf/D2_64x16.pdf -- annoyingly they use to use the MT47H64M16HR which has a much better datasheet
<sb0> yeah, but ddr2 chips from different manufacturers are very similar - you can read the micron datasheet to understand the concept, and check the one for your chip to get the specs
<mithro> sb0: is there an easy way to get the output of init_sequence, or should I just use the q module?
<sb0> software/include/generated/sdram_phy.h
<sb0> what's the q module?
<mithro> sb0: it's a really useful python module, you do "import q; q(blah)" and it dumps it into a file in /tmp/q with loads of information. q can also be used as a decorator on functions / classes to trace them, etc
<mithro> it's a very horrible hack but still very useful :)
<mithro> it's a very horrible hack but still very useful :)
<mithro> sb0: gah, my IRC client is unhappy today
<mithro> sb0: so it looks like my chip only supports a burst length of 4 and 8
<sb0> yes, that's what ddr2 chips usually support
<sb0> hmm, it should be burst length 4
<sb0> sorry, still immersed in ddr3
<mithro> sb0: which it seems to be using - didn't you mention something about BL of 16 in somewhere? Or I'm just confused...
<mithro> sb0: no worries! DDR3 support would be awesome :)
<mithro> sb0: I'm very interested in your Series 7 device support - it's what finally got me to try out your stuff
<mithro> sb0: on a related note, you do misoc + hardware hacking as part of m-labs stuff full time?
<mithro> sb0: does your system support cl levels other than 3? It seems like cl=3 is hardcoded in your S6DDRPHY module...
<sb0> yes. right now I'm working on ARTIQ, a control system for trapped-ion physics experiments, which uses misoc, and the kc705 ddr3 support was for that.
<sb0> we don't support variable CAS latency; if you change the CL, you have to make the SERDES sample the data at a different point in time, and then realign all the data in a burst to a system clock cycle. that's a tad messy and platform-dependent, and it's not worth doing it as you want to operate at the smallest possible CL for performance reasons anyway.
<sb0> only intel has time for this
<sb0> and much worse horrors like usb, acpi, etc.
<mithro> sb0: I was hoping on going in the opposite direction, increasing the CL to give a bigger margin
<mithro> sb0: if writes to the RAM are failing, then is it possible that the init_sequence is also failing?
<sb0> increasing the CL only shifts the data by an integer number of cycles, it won't improve IO timing margins
<sb0> also, CL only matters for reads
<sb0> no, since you are registering the read/write commands properly, and the init sequence goes the same route
<sb0> I think you should spend a couple hours studying some ddr2 datasheets
<mithro> sb0: true - just trying to reduce differences between our known working MIG configuration - we use a CL=5 on this chip (the data sheet says a CL=3 should work)
<sb0> it sounds like you are just sending the write data a cycle too late or too early
<sb0> or half a cycle
<mithro> sb0: thanks for your help, I really do need to get a better understanding of DDR2 - I have such a hodge podge of some specific bits of knowledge which make me dangerous and then huge holes in between
<mithro> sb0: misoc specific question, you seem to do all your set up of the DDR2 chip in C - is that the normal approach in your system because you have a full processor available? Seems like a pretty intelligent approach in a system like this
<sb0> yeah, it saves some FPGA resources, simplifies some developments (particularly the rather complex ddr3 leveling), and helps a lot with troubleshooting the SDRAM when it acts up
<sb0> there is no support for sdram without a cpu
<GitHub118> [misoc] sbourdeauducq pushed 1 new commit to master: http://git.io/hCBpkA
<GitHub118> misoc/master 36434b6 Sebastien Bourdeauducq: sdram: merge DFII_PIX_RDDATA_SIZE and DFII_PIX_WRDATA_SIZE
<mithro> sb0: is there a good discussion thread about how you ended up on the lm32 processor? http://opencores.org/usercontent,doc,1393289758 seems to list the huge amount of system
<sb0> yeah and most of them are crap
<sb0> lm32 works and has the best performance/LUT ratio, simple as that
xiangfu has joined #m-labs
fengling has joined #m-labs
xiangfu has quit [Remote host closed the connection]
fengling has quit [Ping timeout: 240 seconds]
fengling_ has joined #m-labs
<GitHub79> [migen] sbourdeauducq pushed 1 new commit to master: http://git.io/rpYCbQ
<GitHub79> migen/master f21e050 Sebastien Bourdeauducq: platforms/kc705: use jtaghs1_fast cable
<sb0> rjo, just tested ddr3 with vivado - it works here too
<mithro> in migen is there a quick way to create a second clock from the primary clock in a simulation?
fengling_ has quit [Quit: WeeChat 1.0]
<sb0> multi clock simulations are not implemented
Alain has joined #m-labs
FeltonChris has joined #m-labs
FeltonChris has quit [Quit: Page closed]
kyak has quit [Ping timeout: 246 seconds]
bhamilton has joined #m-labs
bhamilton has quit [Client Quit]
mumptai has joined #m-labs
_florent_ has joined #m-labs
Alain has quit [Remote host closed the connection]
<_florent_> hi
<_florent_> sb0: DDR3 init on my board: http://pastebin.com/w3qzNqJz, it's also working :)
<sb0> 2:00-06 is rather close... that one could perhaps be bit-slipped too
<sb0> but good :)
Hawk777 has quit [Ping timeout: 260 seconds]
Hawk777 has joined #m-labs
kyak has joined #m-labs
_whitelogger__ has joined #m-labs
qi-bot9 has joined #m-labs
qi-bot9 has left #m-labs [#m-labs]
qi-bot9 has joined #m-labs
qi-bot9 has left #m-labs [#m-labs]
juliusb_ has joined #m-labs
rjo_ has joined #m-labs
qi-bot9 has left #m-labs [#m-labs]
qi-bot9 has joined #m-labs
qi-bot9 has joined #m-labs
qi-bot9 has left #m-labs [#m-labs]
clever_ has joined #m-labs
qi-bot9 has joined #m-labs
qi-bot9 has left #m-labs [#m-labs]
qi-bot9 is now known as qi-bot
Hawk777 has quit [Ping timeout: 264 seconds]
jaeckel has joined #m-labs
mumptai has quit [Ping timeout: 276 seconds]
Hawk777 has joined #m-labs
Hawk777 has quit [Ping timeout: 260 seconds]
Hawk777 has joined #m-labs
xiangfu has joined #m-labs
playthatbeat has quit [Ping timeout: 245 seconds]
Hawk777 has quit [Ping timeout: 240 seconds]
xiangfu has quit [Remote host closed the connection]
cfelton has joined #m-labs
clever_ is now known as clever
Hawk777 has joined #m-labs
_florent_ has quit [Quit: Leaving]
xiangfu has joined #m-labs
xiangfu has quit [Quit: leaving]
mumptai has joined #m-labs
mrueg is now known as KurtCHose
sh[4]rm4 has joined #m-labs
sh4rm4 has quit [Ping timeout: 260 seconds]
mumptai has quit [Ping timeout: 264 seconds]
<rjo_> sb0: nice tour de force! i'll see who i can get to actually do some code reading and testing here. i don't want to be the only one who ever read and ran the code...
<rjo_> sb0: just out of curiosity: can a single lasmi dma master saturate that? what is the bus rate and width in that case?