Friday, 2021-05-07

*** tpb has joined #litex00:00
*** pftbest has quit IRC00:04
*** Degi_ has joined #litex00:07
*** Degi has quit IRC00:08
*** Degi_ is now known as Degi00:08
*** peepsalot has quit IRC01:09
*** peeps[zen] has joined #litex01:09
*** TMM has quit IRC02:09
*** TMM has joined #litex02:09
*** Bertl_oO is now known as Bertl_zZ03:13
*** HoloIRCUser has joined #litex04:06
*** HoloIRCUser1 has quit IRC04:10
*** kgugala_ has joined #litex04:49
*** kgugala has quit IRC04:51
*** kgugala has joined #litex06:14
*** kgugala_ has quit IRC06:18
*** pftbest has joined #litex07:00
*** pftbest has joined #litex07:01
_florent_nickoe: you use-case should be very similar to what is done in the VideoFramebuffer: LiteDRAMDMAReader  (with native Data Width) --> 1) Clock Domain Crossing --> 2) Data Width Conversion to 32-bit. (1) and 2) order can be swapped depending on the Data Width and clock frequencies): https://github.com/enjoy-digital/litex/blob/master/litex/soc/cores/video.py#L605-L63607:24
*** nickoe has quit IRC10:37
*** Bertl_zZ is now known as Bertl11:30
*** peeps[zen] has quit IRC12:15
*** RaivisR has joined #litex12:50
RaivisRfinally got one of the ddr3 chips cooperating on ecp5 vip, the trick was to force bank 7 vref to be used12:51
RaivisRalso, using diamond to build and found that all pin constraints should be placed in single Misc(), otherwise Diamond takes the last one and resets all the other values to defaults for that last constraint12:52
_florent_RaivisR: ah good13:13
RaivisRlearning as I go, next step, both chips13:14
*** HoloIRCUser1 has joined #litex13:20
*** HoloIRCUser has quit IRC13:20
*** FFY00_ has quit IRC13:35
*** TMM has quit IRC13:43
*** TMM has joined #litex13:43
RaivisRok, now both chips work and with both toolchains, trellis and diamond14:16
RaivisRat sys_clk 50MHz14:18
*** HoloIRCUser1 has quit IRC14:23
*** HoloIRCUser has joined #litex14:23
*** RaivisR has quit IRC14:45
*** peepsalot has joined #litex15:05
*** FFY00_ has joined #litex15:47
*** HoloIRCUser has quit IRC15:56
*** HoloIRCUser1 has joined #litex15:56
*** FFY00_ has quit IRC17:47
zyp_florent_, figured out the qspi problems I were having yesterday -- the flash chip on ecpix-5 (IS25LP256D) requires a «quad enable» bit to be set in the status register, otherwise it simply won't respond to the quad read command18:20
zypI just tried the ulx3s as a sanity check, and that just worked18:22
*** tannewt has quit IRC18:32
*** esden has quit IRC18:32
*** tannewt has joined #litex18:35
*** esden has joined #litex18:36
zypreading a bit further up on it, it's non-volatile and most qspi flash chips appears to have the same, so it's just a matter of how it's been initialized18:48
zyps/the same/the equivalent/18:49
*** HoloIRCUser1 has quit IRC19:05
*** FFY00_ has joined #litex19:21
_florent_zyp: ah ok, I also remember spending some time on this on other boards, we should maybe add some comments in the core to check this19:34
*** nickoe_ has joined #litex19:57
*** nickoe_ is now known as nickoe20:01
nickoe_florent_: hmm, cool. Using, self.comb += self.dma.source.connect(self.cdc.sink)   does that also connect other signals like ready and valid up?20:04
*** cr1901_modern has left #litex20:08
*** cr1901_modern has joined #litex20:09
zypnickoe, yes20:49
nickoehmm20:50
zypyou can picture x.connect(y) as shorthand for y.data.eq(x.data), y.valid.eq(x.valid), x.ready.eq(y.ready) and so on20:50
zypplus last/first20:51
nickoeI better try that, it should make it a lot simpler.20:51
nickoeBut how do I control incrementing my address signal correctly then?20:51
zypuse connect when you're connecting endpoints to each other, use eq when you're manipulating the individual signals of an endpoint20:53
zypyou should probably have an address generator module with a source endpoint that outputs adresses20:54
zypthen you'll use eq inside the module to set the signals of the endpoint, and connect on the outside to connect this module to other modules20:54
nickoeI am not sure I understand the Endpoint()'s yet20:56
zypan endpoint is essentially just a record for a stream20:57
zypand a record is just a collection of signals20:57
nickoeDoes the AsyncFIFO have an endpoint defined alread?20:58
zypso a source endpoint is a collection of signals for a stream output from a module20:58
zypyeah, AsyncFIFO has a sink and a source20:58
leonsI'm currently working on some custom VexRiscv CPU configurations. I've noticed when starting from the "Secure" Vex variant and disabling caches (instruction and data) the bootloader will hang at "Booting from boot.json..." indefinitely21:00
leonsIs this a known issue? Will try to reproduce on a clean LiteX head and standard board tomorrow21:01
nickoezyp: ok, so I just added a proper clock domain https://github.com/nickoe/litex-boards/commit/407fcc426a1a9d00f760aef74bb23d235705c5c8  and then I should do the connect in here and maybe just have the address counter thing in the fsm of https://github.com/nickoe/litex-boards/blob/407fcc426a1a9d00f760aef74bb23d235705c5c8/litex_boards/targets/mars_ax3_custom.py#L66 ?21:03
zypmaybe, I like splitting stuff up into small self contained modules21:04
nickoeyeah, well, that is what I am -- mmm -- trying to21:10
nickoezyp: What is the point of the ClockDomainCrossing object?21:15
zypto cross clock domains? :)21:17
nickoeor does that use its own asyncfifo?21:17
zypyes21:17
nickoe https://github.com/enjoy-digital/litex/blob/9bec0ce7a28afb498c7b7eb79943c270225c061a/litex/soc/interconnect/stream.py#L25321:17
zypIIRC a ClockDomainCrossing is a convenience wrapper around an AsyncFIFO21:18
nickoeok, so I should just use the data from the self.cdc thing?21:18
zypnot sure what you mean21:18
nickoeI want to take my low rate data and push it to another downstram module21:19
nickoethe dac.v instance21:19
zypso you've got a dac module in verilog?21:19
nickoeyes21:19
zyphave you already made a migen wrapper around it?21:19
zypI'd put it into a migen wrapper with a sink endpoint21:20
zypthat way all you'll have to do from the outside is connect a suitable stream to the sink21:20
nickoehttps://github.com/nickoe/litex-boards/blob/mars_ax3_sim/litex_boards/targets/mars_ax3_sim_litex.py#L329-L34521:20
zypyeah, not like that :)21:21
nickoeSo I guess that is a "no" to the answer about a migen wrapper?21:21
zypcorrect21:21
zypyou've instanced it directly in the SoC21:21
zypsee https://github.com/orbcode/orbtrace/blob/main/orbtrace/trace/__init__.py#L7 for an example of a wrapper around a verilog module21:22
nickoemm, yeah, I think I just started from .. trying to get a verlog file included and it evolved from there.21:22
zypthis one got a source, not a sink, but is otherwise similar to what you want to do21:22
nickoeOk, I will try21:23
nickoeI guess it should make it way easier to reuse in sim and implementation21:23
zypyes21:23
nickoeDo I need to do "self.comb += ClockSignal().eq(traceclk)"  for the DAC clock?21:27
nickoeor is that not needed, as all I need to do is wire up signals?21:27
zypprobably not21:27
zypin my case the traceclk is an input that's driving the entire trace domain21:27
nickoebut it is clocked slower thann sys clk, but as I do no custom comb in the migen module I guess it does not matter+21:30
zypif you're gonna use the AsyncFIFO for cdc then migen needs to know about both domains21:31
zypit can't do CDC without having both clocks available :)21:32
nickoethe add_source call to add the verilog file is a call on "platform", but how do I access that form within the module?21:35
zypyou'd need to pass it in21:36
nickoeok21:36
zypbut you don't have to add it from the module itself21:36
zypas long as it's added somewhere, it's fine21:36
nickoemm, UnboundLocalError: local variable 'dac_vmodule' referenced before assignment, with https://dpaste.com/99WXY8G9P21:40
tpbTitle: dpaste: 99WXY8G9P (at dpaste.com)21:40
nickoeand if I remove the +21:40
nickoeAttributeError: Attempted to assign special Module property - use += instead21:40
nickoe...21:40
zypthe problem is line 1321:40
zypneeds to be =, not +=21:40
nickoeyes, and that is when I get above attribute error21:41
zypnope21:41
nickoehttps://dpaste.com/3GCQPPECT21:41
tpbTitle: dpaste: 3GCQPPECT (at dpaste.com)21:41
nickoe:S21:41
zypline 23 should still be +=21:42
zypah21:42
zypuse self.submodules.dac = dac = …21:42
nickoehttps://dpaste.com/CMYAYYXB721:42
tpbTitle: dpaste: CMYAYYXB7 (at dpaste.com)21:42
nickoeoh21:43
nickoeI had         self.submodules = dac = AlexandersDAC(platform, dac_plat, cd_dac)21:43
zypyes21:43
nickoesorry, my mistake, --- entirely.. of course.21:43
nickoe:)21:43
nickoeSo now I have:21:47
nickoehttps://github.com/nickoe/litex-boards/blob/mars_ax3_sim/litex_boards/targets/mars_ax3_sim_litex.py#L314-L31721:47
nickoeand21:47
nickoehttps://github.com/nickoe/litex-boards/blob/mars_ax3_sim/litex_boards/targets/mars_ax3_custom.py#L69-L12521:47
nickoezyp: ugh, so now it is connected correctly I think, https://i.snipboard.io/lTbhyc.jpg21:57
nickoethe dac_data_a should have been a nice sinusoid though..but that is probably the addressing going haywire21:57
nickoeI should somehow align the address increments with whatever is buffered22:01
nickoeWhat signal should I look for to attach it as an enable?22:01
nickoezyp: mmm, getting closer, https://i.snipboard.io/1N32lK.jpg22:06
nickoeI added an If(cdc.sink.ready,     NextValue(self.data_iq_addr, self.data_iq_addr + 1),),22:06
nickoe^There are still some transients22:06
*** lf_ has quit IRC23:10
*** lf has joined #litex23:10

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!