#milkymist IRC log for Wednesday, 2013-03-20

_florent_a small question about mibuild:13:11
_florent_when defining for example a led bus constraint, I can use:13:12
_florent_solution 1:13:12
_florent_("led", 0, Pins("X"), IOStandard("X")),13:12
_florent_("led", N, Pins("X"), IOStandard("X")),13:12
_florent_or solution 2:13:12
_florent_("led", 0, Pins("X0", ..., "Xn"), IOStandard("X")),13:13
_florent_Advantage of solution 1 is that I can connect individually each led13:13
_florent_but when I want to use led as a N bits bus, I was expecting mibuild to assign each led bus bit to the individual constraints.13:13
_florent_It seems it is not the case or I'm miss understanding something...13:13
_florent_Is this behaviour implemented in mibuild?13:13
lekernelunless there is a bug somewhere, #2 works13:26
lekernelI'm doing that on rhino and m1 (but xilinx fpgas)13:27
_florent_using solution 1 with a bus?13:27
lekernelsolution 213:28
_florent_ah ok13:28
lekerneleg https://github.com/milkymist/mibuild/blob/master/mibuild/platforms/m1.py#L1713:28
_florent_in fact I want advantage of both : declaring as solution 1 and using it with individual signal or bus ;)13:28
lekernelah sorry, I misunderstood your question13:29
_florent_no pb13:29
lekernelno, there is nothing implemented for obtaining part of a resource13:30
_florent_hmm ok, do you want that I try to implement it?13:31
lekernelI like the simplicity of the current solution, but if you feel there's a real need for that, you can try proposing something else...13:32
lekernelyou could also just have some "resource builder" functions... that return solution 113:33
_florent_I can try that13:34
_florent_that's just that I do want to change the platform file according design I'm implementing13:35
lekernelanyone has done tests on the hard IOB and routing switching limits?20:33
lekernelconnect output pin to input pin, and increase frequency until the fpga can't keep up20:33
lekernelconsidering that the PLLs have a VCO with 8 phases that goes over 1 GHz, if you can manage skew, jitter and IOB/routing switching you should be able to sample IO over the 950MHz offered by ISERDES20:36
_florent_the implementation of what I was asking in the afternoon:20:46
_florent_with that you can declare bus as individual constraints and use them as bus in the build.py20:47
_florent_and about the fsm we were talking yesterday:20:49
lekernelthis code is modifying the platform description20:50
lekernel_ressource_regroup(self.description, r) then description.remove(ressource)20:50
lekernelrequest() should only register requests, not do any actual matching20:50
lekerneland then, even _match doesn't modify the platform description20:51
_florent_yes that's maybe not very clean, you see a better place to do it?20:52
lekernelto be honest I don't see a need for that, you can simply call request() in a loop when you need to do this sort of thing (which probably isn't often, I think)20:54
_florent_iirc it was not working with a loop20:56
lekernelfor i in range(8): plat.request("led", i, leds[i]) - you may need to make it accept signal slices20:56
_florent_slice object was not working iirc20:57
lekernelfor i in range(8): self.comb += plat.request("led", i).eq(leds[i]) would definitely work20:58
_florent_ok thanks20:59
_florent_for the moment I will use my solution, but if I realize I don't really need it I will switch to yours21:01
lekernelwhy use last_state instead of next_state?21:02
lekernelhttps://github.com/Florent-Kermarrec/migen/commit/3d38b370f76e551d925c66a245740b0d35e3bf2d#L0R60 -> iteration order on dicts isn't deterministic, so this will generate a different (but equivalent) code each time it's run21:05
lekerneland you don't need a dict, you can iterate on self.when_entering_actions directly21:06
_florent_for last_state vs next_state, I'm executing the actions only when I am in the state and when I'm out of the state, but it's maybe better with next_state21:08
_florent_since when_entering is executed in my code when I'm already in21:08
lekernelyes, there is a one clock cycle difference21:09
lekerneland with last_state it results in shorter combinatorial paths which is always good eg when using slowtan 621:09
lekernelbut it takes one more register21:10
lekernelboth solutions are ok, I just want to make sure we understand the difference21:10
_florent_my need for when_entering is generally to trigger an action on the first clock cycle of a state21:11
lekernelso 1) remove the when_entering_cases/when_leaving_cases dicts and iterate on the lists directly 2) remove the old entering()/leaving() functions21:11
lekerneland it's ok21:11
lekernelalternatively, make everything dicts in the first place (you can use defaultdict(list))21:12
_florent_just that I'd like to keep the entering & leaving since It can be useful for others needs...21:13
lekernelbut you'll need to order by key when adding to the comb list, otherwise there will be non-determinism problems21:13
lekernelno, all code that doesn't have an actual use case should be removed21:14
_florent_I'm using it ;) ( I found it useful, just want to keep it in my fork, but I understand if you don't want it)21:18
lekernelhow about you just reference _state etc. directly?21:18
lekerneland why not replace with when_* functions?21:19
_florent_and use it like:21:21
_florent_when_entering(fsm, fsm.WRITE)?21:21
lekernelI'm also wondering how the synthesizers (which do FSM extraction and optimization) like the last_state register ...21:21
lekernelhave you done some testing on that?21:21
_florent_It's working on board for my test, but I haven't look at ressources21:22
lekernellook especially at timing, FPGAs are reasonably large, but painfully slow21:23
_florent_ok I'll try to have a look at this21:25
_florent_about using the functions, what were you describing exaclty?21:26
_florent_what I said:21:26
_florent_when_entering(fsm, fsm.WRITE)?21:26
_florent_or something else21:26
lekernelit's fsm.when_entering(fsm.STATE, ...) no?21:27
_florent_ah sorry I miss understand your question about that21:29
_florent_the thing is that if I want to make a synchronous assignement, I'm not able to use when_* functions and will need to use an intermediary signal21:30
_florent_but I don't want to bother you with that...21:31
lekernelyou can use a control signal instead21:31
lekernelbtw - if synthesizers fail to deal with the extra register correctly, then the solution is to make the FSM object insert extra "transition" states21:36
lekernelah, he left21:37
_florent_I have to go21:38
Fallenouslowtan 6 : lol22:10
Action: Fallenou backing up his SSD using Ubuntu ...22:10
FallenouUbuntu was able to repair HFS+ partition =)22:10
GitHub167[milkymist-ng] sbourdeauducq pushed 1 new commit to master: http://git.io/S09m4Q23:47
GitHub167milkymist-ng/master 0a14c37 Sebastien Bourdeauducq: dvisampler: software controlled phase detector23:47
--- Thu Mar 21 201300:00

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