#milkymist IRC log for Tuesday, 2013-03-19

GitHub31[migen] sbourdeauducq pushed 1 new commit to master: http://git.io/tfBYMw10:47
GitHub31migen/master b38818e Sebastien Bourdeauducq: examples/sim/fir: convert to new API10:47
larscmeh, no wifi in the hospital13:47
lekernelare you alright?13:50
larscI'm going to have surgery tomorrow. They are going to cut a bit of tissue out of me. But I'm not in pain and the mind in is fit as well.14:28
larscIt's just like a vacation, only the food isn't that great14:29
larscand the view isn't either14:29
_florent_I've just added some methods to migen fsm:15:42
_florent_I'm using this to drive logic around the fsm according to the state.15:42
_florent_lekernel: are you interested by this?15:43
larsc_florent_: btw. if you have issue with the adv7511, I wrote the Linux driver for it and worked on the HDL reference design15:44
_florent_Hi larsc15:44
_florent_for the moment I have to do more simulation15:45
larscI'd call 'exiting' 'leaving'15:45
_florent_yes maybe better15:45
lekernel_florent_, your core would support more boards (including any M1r4 variants) if it did TMDS directly15:45
_florent_yes but for that I have to use a mezzanine15:46
larscWell ideally the core wouldn't care what's used to transmit the data and you can plug different frontends ontop of it15:47
lekernelwell, you can get a $15 LPC connector from Samtec plus a 2E hdmi cable, cut the latter in half, and solder it to the LPC15:47
lekernelit actually works - even Xilinx did that to prototype TMDS on the S6 boards15:48
_florent_ hmmm ok15:48
_florent_but I don't think I will loose so much time on the ADV751115:48
lekerneljust don't hook up the 5V DDC directly... but for a HDMI *source* you can get away without DDC15:48
_florent_and must of what will be developped can probably be reused15:49
_florent_it's just the configuration of the ADV7511 that is painful...15:49
_florent_but larsc will probably be able to help me on that15:50
_florent_and I've found some work on it on the net15:50
_florent_and video on spartan 6 using tdms15:51
lekernelnice hack15:53
lekernelI wonder why they have serializers at all15:53
lekernelyou could solve this sort of problems without any messy stuff with the right software15:54
_florent_for the serialized at the end of the chain?15:55
lekerneleg something like http://raintown.org/lava/15:55
lekernelthat builds serializer boxes15:55
lekernelbut software doesn't seem to be something that any FPGA company does right...15:55
_florent_hardware serializer are probably faster no?15:56
lekernelnope. http://hamsterworks.co.nz/mediawiki/index.php/Spartan_6_1080p describes a soft serializer which is almost 50% faster than the hard one15:57
_florent_Ah ok, I haven't read this one yet15:59
lekernelsimilarly, if you want to receive DDR3 data, sending DQS to local interconnect (as opposed to BUFG) and then to the clock pins of flip-flops seems to work almost as fast as the IN_FIFO and OUT_FIFO of the 7-series16:01
lekerneland maybe as fast if you try to optimize16:02
lekerneland you don't have to deal with any coregen mess or *_FIFO strange behaviour16:02
_florent_but with that solution you have to constraint flip-flop placement16:03
lekernelthe BUFGs are slow - they max out at 625MHz16:04
lekernelso if you want to clock anything faster you should actually not use them16:04
_florent_I was looking at it the other day16:04
lekerneland deal with the skew in routing16:04
lekernelshould work fine for small circuits16:04
_florent_trying to undestand what you wanted to do for the ddr3 controller16:04
_florent_and found like you that bufg was too slow16:05
lekernelyes, such circuits need to have manual placement and possibly manual routing of course16:06
_florent_but for such interface it not often plug and play and you often have to adapt constraints...16:07
lekernelyou could try python -> xdl -> NMC hard macro16:07
_florent_so it's maybe not more work that for classic solution16:07
lekernelthen you can make it flexible16:08
lekernelassuming xdl actually works, which it doesn't always and xilinx refuses to fix bugs16:08
_florent_seems interesting16:09
_florent_but I haven't time for the moment to play with that!16:09
_florent_and loose time on xilinx bugs ;)16:10
lekernelwhat are the use cases for the new fsm functions?16:18
lekernelhmm, I begin to wonder if it would make sense to add an external clock generator chip that replaces the PLL16:24
lekernelthen you can solve the mentioned 175 ps!!!!! jitter and have a compliant 1080p signal out of (and perhaps into) a s616:25
lekernel(!!!! added because typical clock generator chips have like, 10ps jitter. S6 is always annoying when you want more than subpar performance)16:26
_florent_for the fsm:16:28
_florent_I want to be able to know in which state the fsm is16:28
_florent_or to trigger actions when I'm entering a state or leaving a state16:29
lekernelfor RX phase detection will be a mess though. the IODELAYS are also massive jitter generators.16:29
lekernelwhy not use regular control signals in fsm.act()?16:30
_florent_that is what I was doing before16:32
_florent_but with the methods it's easier to code and to read16:32
_florent_an example of code where I use it16:33
_florent_but I'm not sure I will be able to convince you ;)16:34
lekernelthat doesn't look like much of a FSM anymore :)16:34
lekernelyou could do the same with just a state register16:35
lekerneland replace the .act() which only do the state transitions with a sync += ... state.eq(some_other_state) ...16:35
lekernelthe entering() can be useful though - but I'd like it better integrated into the FSM object16:37
_florent_and on what kind of code are you using fsm?16:37
lekernelhave it more like act()16:38
lekernelsame for exiting()/leaving()16:38
_florent_because my code is purely something to code with a fsm + some logic aroud16:39
lekernelongoing() does the same thing as act(), but in a messier way imo16:39
lekernelyou can get control signals out of the FSM16:39
lekernelhave you noticed that when you do some_signal.eq(1) in act(), then some_signal has always the value 0 except when the FSM is in that state16:40
lekernelie there are no latches etc.16:41
lekernelcombinatorial signals in migen go back to their reset value when nothing drives them16:41
_florent_but I will have to declare those signas16:41
_florent_anyway, it was just an idea16:43
_florent_but I think it can be useful to have such methods16:43
lekernelmoment, writing an example transformation of some of your code16:44
lekernelmuch clearer imo16:46
_florent_thanks, maybe yes16:49
_florent_that's just that I wanted to have all logic out of the fsm16:50
lekernelwhy? FSMs are a convenient way to represent sequential logic16:51
_florent_but fsm coding is always a different between designers and between compagnies16:51
lekernelwith the #2 coding style, you see immediately what happens in each state16:52
_florent_for example in some compagnies, you are not allowed to drive logic in the fsm16:52
lekernelyou don't have to go back and forth in lots of different places of the code16:53
_florent_you have to create an output process that will drive signals according to fsm state...16:53
_florent_yes I agree with you16:53
lekernelyeah well, some coding styles also mandate that you must use #some_delay before the right hand side of all assignments16:53
lekernelsome people will never get get the delta-cycle algorithm apparently16:54
_florent_So ok for the ongoing, but for the entering/leaving it can still be useful16:56
lekernelthere's nothing wrong with driving control signals from the same FSM decoder that computes the next state16:57
lekernelyeh, sometimes you need to do something at all times before entering/when leaving some state, and ensuring that manually is tedious and sometimes you forget - that's how bugs appear16:58
_florent_I know that there is nothing wrong with driving control signals in the fsm, that just some DO254 codings rules that are beginning to pollutes me.... :(17:00
lekernelbut the entering()/leaving() should have a similar API as act()17:00
lekernelmaybe when_entering and when_leaving are better names too17:01
lekernelfsm.when_entering(fsm.SOME_STATE, some_statement)17:02
lekerneland it does something like fsm.comb += If((_state != fsm.SOME_STATE) & (_next_state == fsm.SOME_STATE), some_statement)17:03
lekernelsame for when_leaving()17:03
_florent_ok I see17:04
lekernelalso think about what happens with delayed_enters - or prevent altogether those functions to be used when the state is in delayed_enters17:04
_florent_do you want I try to implement it?17:04
lekernel(don't implement things until you need them - and right now, no one uses delayed_enter with when_*)17:05
lekernelsure, I can see it as helping your and possibly other designs17:05
lekernelplease send the patch after :)17:06
lekernelah, the spartan 6 IODELAYs, on top of generating massive jitter and having a PVT factor of 300%, can only delay signals by one bit period maximum17:21
lekernelthat explains why my HDMI phase detector doesn't work17:22
lekernelis there any S6 feature that isn't crippled and a pain to use...17:22
lekernel(it's actually even worse than 300%: they are specd for a 'maximum' delay, and then a footnote in the datasheet says 'minimum delay is *typically* 30% of maximum delay')17:29
_florent_seems Spartan 6 is not your best friend these days...17:41
lekerneloh, and won't the circuit fig 2-22 of ug381 go metastable?17:42
_florent_On another topic: I've bought the french magazine "Open Silicium"17:52
_florent_and have done a comparaison of the ressources used on the De0 Nano with the OrpSoc and Milkymist-ng:17:52
_florent_with almost the same peripherals:17:52
_florent_Milkymist-ng @ 100MHz / OrpSoC @ 50Mhz:17:52
_florent_Milkimist-ng use 20% of the chip.17:52
_florent_OrpSoc is almost 45%!17:53
lekernelhttp://www.ti.com/product/cdcm61004 <= could be a nice replacement for the lousy S6 PLLs18:00
_florent_on video design xilinx is generally using si532418:04
lekernelcdcm61004 is actually what they use for the LHC timing system :)18:06
larscand how does OrpSoc compare feature wise to mm-ng?18:07
_florent_on the feature, both have cpu + sdram controller + small peripherals18:09
_florent_the only thing that is not implemented in my de0-nano port is the flash controller18:09
_florent_but it should not use 25% of the chip18:10
lekernelwere you using hpdmc, or the fancy asmi-based controller?18:11
_florent_the asmi18:12
--- Wed Mar 20 201300:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!