lekernel changed the topic of #m-labs to: Mixxeo, Migen, MiSoC & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
xiangfu has joined #m-labs
fengling has joined #m-labs
xiangfu has quit [Ping timeout: 244 seconds]
xiangfu has joined #m-labs
xiangfu has quit [Remote host closed the connection]
xiangfu has joined #m-labs
<zyp> is the Memory-class supposed to work with xilinx ise?
<zyp> «INFO:Xst:738 - HDL ADVISOR - 2048 flip-flops were inferred for signal <mem>. You may be trying to describe a RAM in a way that is incompatible with block and distributed RAM resources available on Xilinx devices, or with a specific template that is not supported. Please review the Xilinx resources documentation and the XST user manual for coding guidelines. Taking advantage of RAM resources will lead to improved device usage and reduced synthesis time.»
<rjo> zyp: i have seen it spit out that warning if the memory was just small but still implementable with bram. but if yours is large you are likely using asynchronous reads. just add a register.
<zyp> I'm trying to use the wishbone.SRAM wrapper
<rjo> IME that works fine
<rjo> is it small?
<zyp> I've tried multiple sizes
<zyp> and none seems to work
<rjo> what's your wishbone interconnect?
<zyp> currently connecting it directly to a master that I've written myself
<sb0> zyp, what ise version are you using, and for what fpga?
<sb0> I've used Memory/wishbone.sram on many different versions and with s6 and k7, and used the same memory coding style on v4 before with no problem...
<zyp> latest, s3a
<rjo> zyp: how does the sythesis describe the inferred ram?
<rjo> synthesis even.
<sb0> zyp, try on a simple case - just create a Memory, export to verilog, run through ISE
<sb0> oh wait... could be a problem with the byte-wide write enables
<sb0> iirc s3a doesn't have those
<zyp> it does
<zyp> I've already tried making an instance of the RAMB16BWE primitive and hooking that up, which works
<zyp> but I don't like losing flexibility/portability in that way
<sb0> well, it should work really... the migen output for Memory is almost straight from the xst coding guide...
<sb0> there's also a transform that removes the byte-write enables and breaks the 32-bit memory into four 8-bit memories
<sb0> because synthesizers have problems with BWE sometimes
<zyp> okay, it's great to hear that it should work, now if it only would work too, I'd be happy :)
<sb0> try on simple cases
<sb0> start with a basic memory, check that ise compiles it correctly, and add features until it breaks
<zyp> how would I go about compiling only a basic memory?
<sb0> this generates verilog that you can run through xst: https://github.com/m-labs/migen/blob/master/examples/basic/memory.py
<sb0> remove most memory features and check that it compiles it correctly
<sb0> you only need xst - no need to bother with par and pin constraints
<zyp> same result
<sb0> well edit the verilog and get it to work
<zyp> working on that
<sb0> is that will all the options, or did you make a simple memory?
<sb0> the example uses a lot of options
<zyp> I simplified the example and got it to work
<zyp> adding byte lane enables broke it again
<sb0> you can apply that globally in misoc with a make.py command line arg
<sb0> or find some BWE coding style that xst groks for all fpga families ...
<sb0> or hook the code generator for s3a if you can't find something that also works for k7/s6
<sb0> rjo, nice!
<sb0> thanks!
<sb0> rjo, btw quick question about those DDS - each DDS chip has a different SYNC_CLK phase, right?
<sb0> so we can't just sync the whole experiment to a SYNC_CLK pulse as Daniel suggests
<zyp> «XST currently supports this method only.»
<rjo> sb0: we have no indication that the sync_clks are actually synced. they nominally do synchronize (somewhat, see later) at reset. but we don't have a synchronous reset across all boards (and there is wire-length-skew). the more interesting problem is the 1ghz phase. there is some indication that even if the divide-by-2 is disabled at all times, the 1ghz clock phase is undefined inside the dds.
<rjo> there was a thesis that i quoted some time ago that explores that.
<sb0> yes, I read it. so you confirm that we need one SYNC_CLK per DDS chip, and proper FUD timing can't be done by simply syncing the whole experiment to one SYNC_CLK?
<sb0> this new board uses the AD9914 ...
<rjo> sb0: yes. there would need to be a few changes to the hardware to sync the synclks. parallel and matched resets.
<sb0> yes, and this sync would not even be guaranteed by the DDS chip specs, right?
<rjo> people will want to use their old ad9858 cards as well
<rjo> is the pcb is changed as in that thesis, it should work afaict.
<sb0> but those old cards don't send SYNC_CLK through the backplane anyway, right?
<rjo> yes.
<sb0> I think Daniel is talking about new DDS cards, so those can have SYNC_CLK synchronization
<sb0> so what we can do is
<sb0> 1) when using the old cards, do like it's done now (with jitter and FUD setup violations)
<rjo> sb0: you could mux the synclks onto one and then have dds-dependend fud-shifts.
<rjo> mux the synclks and a feedback for fud.
<sb0> 2) when using the new cards, sync all SYNC_CLKs into one, and time the experiment to a SYNC_CLK edge
<sb0> rjo, mux the synclks of the old cards (with an additional cable and multiplexer board), or the new ones?
<rjo> whether we can sync the synclks into one remains to be shown. till's measurements from a while ago indicated that for the ad9858 (1ghz clock), the synclk jittered 3.5ns relative to the reset (which i believe was synchronized/derived from the 1ghz clock).
<sb0> <rjo> is the pcb is changed as in that thesis, it should work afaict. <<< so no?
<rjo> sb0: old ones. for the new ones on the new backplane there are enough pins.
<rjo> sb0: never for the old ones. maybe for the new ones if their behavior is different.
<rjo> (the first answer was re mux, the second re syncing synclks)
<sb0> ok. so we should implement something that assumes different synclk phase for each dds chip, right?
<sb0> and not bother with trying to synchronize the synclks
<rjo> well. there seems to be a way to synchronize multiple ad9914, (vaguely) described in the datasheet.
<rjo> for the ad9858 i don't think that there is any way to synchronize them without pcb changes.
<rjo> https://ez.analog.com/message/76546 analog is also starting to write datasheets in the form of moderated forum replies.
<sb0> so what should we do? assume non-synchronized synclk in the software/gateware for now, but keep the synchronization option open in the hardware?
<sb0> zyp, I wonder how they managed to mess up their code in a way that the other coding style works for k7/s6 and breaks for s3a
<sb0> I'm glad I'm not on the xst development team
<rjo> sb0: gimme a minute. need to think about this.
<rjo> looks like some of the secrets of the ad9914 are explained in the ad9915 (sic) datasheet...
<rjo> oh lord: "If you need to run faster than 2.5 GHz, then the AD9914 cannot be synchronized reliably/repeatably. We excluded the synchronization section from the data sheet to avoid the issue where users try to synchronize at higher speeds and find that it isn't working."
<rjo> i guess that answers it.
<rjo> can i have the satisfaction to post that?
<stekern> sb0: RAM instantiation is a big mess. byte enable and different sized data ports are especially painful.
<stekern> and remember that you should always use write-before-read
<rjo> sb0: ok?
<sb0> ok
<rjo> sb0: but measuring them individually beafore each experiment has a penalty afaict. the timings will not be known at compile time. otoh, doing it once after each reset could work.
<sb0> we can have the runtime compute the exact timing of the FUD pulse dynamically (in the dds_program function) based on the measured synclk phase at initialization
<rjo> sb0: that reminds me. did we discuss making the data path for the dds RT as well?
<sb0> this will still cause a FUD jitter of 1 synclk, but will fix the FUD setup violation problem
<rjo> won't that break e.g. inlining?
<rjo> sorry interleacing
<rjo> interleaving.
<sb0> we didn't discuss it, but I'm not sure if it's needed
<sb0> the main advantage over the current software solution is you can queue several updates in advance
<sb0> if you need short bursts with many frequency updates, then yes, that would help
<rjo> sb0: on the output side we tend to do about as many dds register updates as ttl pulses.
<sb0> RTIO data bus would only help with the burst performance, not really with the sustained performance
<rjo> sb0: i would estimate that we want peak FTW+POW rate close to the max rate across that bus.
<rjo> sb0: the worst case are back-to-back microwave pulses with different phases.
fengling has quit [Ping timeout: 272 seconds]
<rjo> sb0: re fud shifting, do you mean ignoring the shifts at compile time and then tweaking pulses at runtime?
<rjo> the other question is the FUD layout of the new boards. i believe the "addressable fuds" as they are now are not the future. we either need individual fuds or a single parallel one.
xiangfu has quit [Remote host closed the connection]
xiangfu has joined #m-labs
xiangfu has quit [Ping timeout: 245 seconds]
sj_mackenzie has joined #m-labs
<ysionneau> morning
<sj_mackenzie> morning
sb0_ has joined #m-labs
<sb0_> rjo, yes, the compiled kernel just sends the current time counter value into the runtime's dds_program, and the latter adjusts it to the closest value for which the setup time is met
<sb0_> runtime-level knowledge of FUD timing enables it to initialize the DDS (which requires FUD) independently from the compiler infrastructure
<sb0_> stekern, recognizing a RAM pattern from HDL and extracting it should be an independent pattern than mapping a parameterized RAM to a FPGA architectures. synthesizers like xst with which it is apparently not the case look cheesy to me.
<sb0_> *an independent problem
xiangfu has joined #m-labs
xiangfu has quit [Ping timeout: 260 seconds]
MY123 has joined #m-labs
<stekern> sb0_: I agree, it's just that it's not the way things are.
_florent_ has joined #m-labs
<stekern> I see that my note on write-before-read was confusing too, I got rushed by the busschedule. What it was supposed to say was that you have to *explicitly* describe write-before-read with bypass registers, XST might otherwise silently implement them as read-before-write
<sb0_> one day we should support synthesis directly from migen ;) if you want to help with that, zyp, you can also solve your problem by writing python code that takes a migen fragment and replaces Memory with instances of S3A block RAM primitives
<stekern> which is 'oh so fun' since it doesn't match the simulations
<sb0_> also, rewrite the simulator so it does not depend on icarus verilog and the fucked up event model of Verilog/VHDL
<sb0_> though another way to solve the current simulation bugs is to turn the representation into semi-SSA form, which can also help writing a synthesizer...
sj_mackenzie has quit [Remote host closed the connection]
xiangfu has joined #m-labs
nicksydney has quit [Ping timeout: 244 seconds]
<GitHub21> [artiq] sbourdeauducq pushed 1 new commit to master: http://git.io/F8fmKA
<GitHub21> artiq/master 97329b7 Sebastien Bourdeauducq: transforms/inline: offload some work to remove_inter_assigns/remove_dead_code
sb0_ has quit [Quit: Leaving]
nicksydney has joined #m-labs
xiangfu has quit [Ping timeout: 244 seconds]
xiangfu has joined #m-labs
nicksydney_ has joined #m-labs
nicksydney has quit [Ping timeout: 258 seconds]
<sb0> rjo, there's also the "attentuators" on lab_hardware.jpg, but it's harder to fix... do you have the editable file?
<GitHub19> [artiq] sbourdeauducq pushed 3 new commits to master: http://git.io/9OcYRA
<GitHub19> artiq/master 397f373 Sebastien Bourdeauducq: Merge branch 'master' of github.com:m-labs/artiq
<GitHub19> artiq/master 2a00229 Sebastien Bourdeauducq: slices/taaccs: fix typo and permissions
<GitHub19> artiq/master b78e0b3 Robert Jordens: add TAACCS seminar talk
xiangfu has quit [Ping timeout: 258 seconds]
zumbi_ has quit [Ping timeout: 265 seconds]
zumbi has joined #m-labs
xiangfu has joined #m-labs
xiangfu has quit [Ping timeout: 250 seconds]
xiangfu has joined #m-labs
_florent_ has quit [Quit: Leaving]
xiangfu has quit [Remote host closed the connection]
<larsc> yeay, labview
<sb0> high viscosity language :-)
<ysionneau> crazy picture with all the hw stuff =)
<sb0> larsc, do you know what happens if the 2ns setup time of the IO_UPDATE pin of the AD9914 is not respected? only jitter (if the pulse spans several cycles), or can more nasty things happen?
<larsc> no... I have no idea
mumptai has joined #m-labs
_florent_ has joined #m-labs
xiangfu has joined #m-labs
xiangfu has quit [Remote host closed the connection]
MY123 has quit [Quit: Connection closed for inactivity]
<rjo> sb0: re fud shifting. i'
<rjo> ... ll have to think about what that means for the experiments. the impact is a bit hard to gauge.
<rjo> sb0: re slide. yes that was a 3am hack and i didn't have time to do a nice tikz picture for it... thanks for pointing it out. i'll do the tikz picture. that'll also shave of a few 100kB.
mumptai has quit [Quit: Verlassend]