lekernel changed the topic of #milkymist to: Milkymist One, Migen, Milkymist SoC & Flickernoise :: Logs: http://en.qi-hardware.com/mmlogs
jimmythehorn has quit [Quit: jimmythehorn]
jimmythehorn has joined #milkymist
Zou has joined #milkymist
Gurty has quit [Ping timeout: 256 seconds]
<wpwrak> interesting ... my registers do actually seem to be present, but at weird places
<wpwrak> okay, csr.h is just nonsense. nice trap :)
kyak has quit [Ping timeout: 240 seconds]
kyak has joined #milkymist
kyak has quit [Changing host]
kyak has joined #milkymist
qi-bot has quit [Ping timeout: 246 seconds]
<wpwrak> hmm .... If(busy[i] and sense[i] != polarity becomes if ((mmc_mmc_dat[2] != counteradc_polarity)) begin ...
qi-bot has joined #milkymist
<wpwrak> why oh why did it steal the "and" ?
proppy has quit [Read error: Operation timed out]
sh4rm4 has quit [Remote host closed the connection]
proppy has joined #milkymist
sh4rm4 has joined #milkymist
<larsc> you can't use 'and'
<larsc> use &
<wpwrak> GAAH ! use some pins of mmc.dat[] as output and migen makes ALL of them outputs, even if others are used only as input.
<wpwrak> (and) migen is full of traps ...
<wpwrak> i now used a double If. that works :)
<larsc> also & has higher precedence than !=
<wpwrak> hence "and" :)
<larsc> we can't overload and
<wpwrak> rm -f *.py; vi syntax.y
Martoni has joined #milkymist
sb0 has joined #milkymist
mumptai has joined #milkymist
mumptai has quit [Ping timeout: 252 seconds]
<sb0> wpwrak, (all outputs) what should it do instead? display an error?
<sb0> or split the vector between inputs and outputs? my days are only 24h and already eaten by stupid bugs like in the hdmi stuff...
sb0 has quit [Quit: Leaving]
bhamilton has joined #milkymist
bhamilton has left #milkymist [#milkymist]
bhamilton has joined #milkymist
bhamilton has quit [Client Quit]
bhamilton has joined #milkymist
bhamilton1 has joined #milkymist
bhamilton has quit [Read error: Connection reset by peer]
bhamilton1 has quit [Quit: Leaving.]
bhamilton has joined #milkymist
bhamilton has quit [Client Quit]
bhamilton has joined #milkymist
bhamilton has left #milkymist [#milkymist]
<wpwrak> sb0: yes, splitting everything into single bits would probably the best idea. it seems that, as soon as you use an aggregate - especially an array - bad things happen
<wpwrak> sb0: and bugs are just a part of life ;-)
sb0 has joined #milkymist
<sb0> wpwrak, how do you implement arithmetic if you only have single bits in verilog?
<sb0> also splitting everything into single bits will produce ugly code
<sb0> the verilog should still be human readable to some extent
<sb0> so you really only want to split when 1) the signal is an IO and 2) has bits with different directions
<wpwrak> in the most general case, you'd combine the single bits into a longer vector for access/operation
<wpwrak> it should then be relatively straightforward to add a peephole "optimizer" that combines things where possible
<wpwrak> in this case, the problem comes from migen's heuristics (generation of verilog declarations) going wrong. a contributing issue is that i think you don't really try to have a full semantical representation in migen, so migen doesn't even "know" something is wrong
<sb0> no, it's really just a verilog IO problem
<sb0> multi bit Signal == hardware integer == multi-bit verilog reg/wire
<sb0> actually, instead of splitting, I think using "inout" as IO port declaration could also work
<wpwrak> btw, in my ADC, the check for termination isn't so nice. structurally, the test for termination should be in the busy.re Else branch. but i'm not sure how that would be done in migen (without making too much of a mess)
<sb0> if the synthesizer does the right thing and doesn't try to mess with tri-state IO buffers
<wpwrak> heh ;-)
<wpwrak> the thing is that in verilog, you explicitly declare what an aggregate is. so it's clear that it all is input or output
<sb0> in migen too
<sb0> Signal() is an aggregate
<wpwrak> in migen, the declaration is implicit. so it's natural to assume the usual rules apply
<sb0> no it's not
<sb0> it's only "implicit" in the sense that mibuild returns you a multi bit signal when you have vectored pins
<wpwrak> in Pyton, array elements are just like individual variables. the element doesn't "feel" it's part of an aggregate
<sb0> it's not an array element
<sb0> another solution is to make mibuild return a python list of 1-bit signals when there are vectored pins
<wpwrak> look, feel, and smell are the same :) just the failure patterns differ
<wpwrak> yes, i think the basic unit in migen should be the single bit, not the aggregate
<sb0> then you get ugly generated verilog and messy arithmetic
<sb0> just to solve an IO problem, come on
<sb0> multi bit signals are great
<wpwrak> you can have the aggregate as a "hint" (e.g., bus[2] having attributes .parent_array = bus and .array_index = 2, or whatever). then the peephole optimizer could make an educated guess and produce more readable expressions. the semantics would be identical, though
<sb0> try inout
<wpwrak> so that's when you rewire the parameter passing logic ? (Instances, etc.) i thought migen was about making things simpler :)
<sb0> ?
<wpwrak> anyway, the ADC works as it is. luckily, i eventually found a combination where the default end up right
<sb0> no, I'm just saying that verilog may not whine anymore when you have a vectored port with differing directions declared as inout
<wpwrak> and the way to declare that would be via Instance.Inout ? that's the only mention of "inout" i found in the manual
<sb0> no, the verilog "inout" keyword
<wpwrak> so i should patch top.v ?
<sb0> instead of input/output. nothing to do with instances
<sb0> yes try that first and then inout should be selected automatically when there is this problematic use of vectored signals
<sb0> bbl
sb0 has quit [Quit: Leaving]
<wpwrak> hackish :)
mumptai has joined #milkymist
antgreen has quit [Ping timeout: 272 seconds]
bhamilton has joined #milkymist
bhamilton1 has joined #milkymist
bhamilton has quit [Ping timeout: 245 seconds]
bhamilton1 has quit [Ping timeout: 256 seconds]
bhamilton has joined #milkymist
bhamilton has left #milkymist [#milkymist]
jimmythehorn has quit [Quit: jimmythehorn]
antgreen has joined #milkymist
jimmythehorn has joined #milkymist
kilae has joined #milkymist
antgreen has quit [Ping timeout: 258 seconds]
antgreen has joined #milkymist
Scopeuk-AFK is now known as Scopeuk
antgreen has quit [Ping timeout: 272 seconds]
kilae has quit [Quit: ChatZilla 0.9.90 [Firefox 20.0.1/20130409194949]]
Logxen has joined #milkymist
Scopeuk is now known as Scopeuk-AFK