_florent_ changed the topic of #litex to: LiteX FPGA SoC builder and Cores / Github : https://github.com/enjoy-digital, https://github.com/litex-hub / Logs: https://freenode.irclog.whitequark.org/litex
tpb has quit [Remote host closed the connection]
tpb has joined #litex
pftbest has quit [Ping timeout: 260 seconds]
Degi_ has joined #litex
Degi has quit [Ping timeout: 240 seconds]
Degi_ is now known as Degi
peepsalot has quit [Ping timeout: 240 seconds]
peeps[zen] has joined #litex
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #litex
Bertl_oO is now known as Bertl_zZ
HoloIRCUser has joined #litex
HoloIRCUser1 has quit [Ping timeout: 260 seconds]
kgugala_ has joined #litex
kgugala has quit [Ping timeout: 240 seconds]
kgugala has joined #litex
kgugala_ has quit [Ping timeout: 240 seconds]
pftbest has joined #litex
pftbest has quit [Read error: Connection reset by peer]
pftbest has joined #litex
<_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-L636
nickoe has quit [Ping timeout: 268 seconds]
Bertl_zZ is now known as Bertl
peeps[zen] has quit [Ping timeout: 240 seconds]
RaivisR has joined #litex
<RaivisR> finally got one of the ddr3 chips cooperating on ecp5 vip, the trick was to force bank 7 vref to be used
<RaivisR> also, 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 constraint
<_florent_> RaivisR: ah good
<RaivisR> learning as I go, next step, both chips
HoloIRCUser1 has joined #litex
HoloIRCUser has quit [Read error: Connection reset by peer]
FFY00_ has quit [Remote host closed the connection]
TMM has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM has joined #litex
<RaivisR> ok, now both chips work and with both toolchains, trellis and diamond
<RaivisR> at sys_clk 50MHz
HoloIRCUser1 has quit [Read error: Connection reset by peer]
HoloIRCUser has joined #litex
RaivisR has quit [Quit: Leaving]
peepsalot has joined #litex
FFY00_ has joined #litex
HoloIRCUser has quit [Read error: Connection reset by peer]
HoloIRCUser1 has joined #litex
FFY00_ has quit [Remote host closed the connection]
<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 command
<zyp> I just tried the ulx3s as a sanity check, and that just worked
tannewt has quit [Ping timeout: 260 seconds]
esden has quit [Ping timeout: 260 seconds]
tannewt has joined #litex
esden has joined #litex
<zyp> reading 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 initialized
<zyp> s/the same/the equivalent/
HoloIRCUser1 has quit [Remote host closed the connection]
FFY00_ has joined #litex
<_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 this
nickoe_ has joined #litex
nickoe_ is now known as nickoe
<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?
cr1901_modern has left #litex [#litex]
cr1901_modern has joined #litex
<zyp> nickoe, yes
<nickoe> hmm
<zyp> you 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 on
<zyp> plus last/first
<nickoe> I better try that, it should make it a lot simpler.
<nickoe> But how do I control incrementing my address signal correctly then?
<zyp> use connect when you're connecting endpoints to each other, use eq when you're manipulating the individual signals of an endpoint
<zyp> you should probably have an address generator module with a source endpoint that outputs adresses
<zyp> then 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 modules
<nickoe> I am not sure I understand the Endpoint()'s yet
<zyp> an endpoint is essentially just a record for a stream
<zyp> and a record is just a collection of signals
<nickoe> Does the AsyncFIFO have an endpoint defined alread?
<zyp> so a source endpoint is a collection of signals for a stream output from a module
<zyp> yeah, AsyncFIFO has a sink and a source
<leons> I'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..." indefinitely
<leons> Is this a known issue? Will try to reproduce on a clean LiteX head and standard board tomorrow
<nickoe> zyp: 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 ?
<zyp> maybe, I like splitting stuff up into small self contained modules
<nickoe> yeah, well, that is what I am -- mmm -- trying to
<nickoe> zyp: What is the point of the ClockDomainCrossing object?
<zyp> to cross clock domains? :)
<nickoe> or does that use its own asyncfifo?
<zyp> yes
<zyp> IIRC a ClockDomainCrossing is a convenience wrapper around an AsyncFIFO
<nickoe> ok, so I should just use the data from the self.cdc thing?
<zyp> not sure what you mean
<nickoe> I want to take my low rate data and push it to another downstram module
<nickoe> the dac.v instance
<zyp> so you've got a dac module in verilog?
<nickoe> yes
<zyp> have you already made a migen wrapper around it?
<zyp> I'd put it into a migen wrapper with a sink endpoint
<zyp> that way all you'll have to do from the outside is connect a suitable stream to the sink
<zyp> yeah, not like that :)
<nickoe> So I guess that is a "no" to the answer about a migen wrapper?
<zyp> correct
<zyp> you've instanced it directly in the SoC
<zyp> see https://github.com/orbcode/orbtrace/blob/main/orbtrace/trace/__init__.py#L7 for an example of a wrapper around a verilog module
<nickoe> mm, yeah, I think I just started from .. trying to get a verlog file included and it evolved from there.
<zyp> this one got a source, not a sink, but is otherwise similar to what you want to do
<nickoe> Ok, I will try
<nickoe> I guess it should make it way easier to reuse in sim and implementation
<zyp> yes
<nickoe> Do I need to do "self.comb += ClockSignal().eq(traceclk)" for the DAC clock?
<nickoe> or is that not needed, as all I need to do is wire up signals?
<zyp> probably not
<zyp> in my case the traceclk is an input that's driving the entire trace domain
<nickoe> but it is clocked slower thann sys clk, but as I do no custom comb in the migen module I guess it does not matter+
<zyp> if you're gonna use the AsyncFIFO for cdc then migen needs to know about both domains
<zyp> it can't do CDC without having both clocks available :)
<nickoe> the add_source call to add the verilog file is a call on "platform", but how do I access that form within the module?
<zyp> you'd need to pass it in
<nickoe> ok
<zyp> but you don't have to add it from the module itself
<zyp> as long as it's added somewhere, it's fine
<nickoe> mm, UnboundLocalError: local variable 'dac_vmodule' referenced before assignment, with https://dpaste.com/99WXY8G9P
<tpb> Title: dpaste: 99WXY8G9P (at dpaste.com)
<nickoe> and if I remove the +
<nickoe> AttributeError: Attempted to assign special Module property - use += instead
<nickoe> ...
<zyp> the problem is line 13
<zyp> needs to be =, not +=
<nickoe> yes, and that is when I get above attribute error
<zyp> nope
<tpb> Title: dpaste: 3GCQPPECT (at dpaste.com)
<nickoe> :S
<zyp> line 23 should still be +=
<zyp> ah
<zyp> use self.submodules.dac = dac = …
<tpb> Title: dpaste: CMYAYYXB7 (at dpaste.com)
<nickoe> oh
<nickoe> I had self.submodules = dac = AlexandersDAC(platform, dac_plat, cd_dac)
<zyp> yes
<nickoe> sorry, my mistake, --- entirely.. of course.
<nickoe> :)
<nickoe> So now I have:
<nickoe> and
<nickoe> zyp: ugh, so now it is connected correctly I think, https://i.snipboard.io/lTbhyc.jpg
<nickoe> the dac_data_a should have been a nice sinusoid though..but that is probably the addressing going haywire
<nickoe> I should somehow align the address increments with whatever is buffered
<nickoe> What signal should I look for to attach it as an enable?
<nickoe> zyp: mmm, getting closer, https://i.snipboard.io/1N32lK.jpg
<nickoe> I added an If(cdc.sink.ready, NextValue(self.data_iq_addr, self.data_iq_addr + 1),),
<nickoe> ^There are still some transients
lf_ has quit [Ping timeout: 276 seconds]
lf has joined #litex