sb0 changed the topic of #m-labs to: ARTIQ, Migen, MiSoC, Mixxeo & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
sandeepkr has quit [Read error: No route to host]
_rht has joined #m-labs
fengling has joined #m-labs
kuldeep has quit [Ping timeout: 252 seconds]
kuldeep has joined #m-labs
rjo has quit [Read error: Connection reset by peer]
sb0 has joined #m-labs
kuldeep has quit [Ping timeout: 260 seconds]
fengling has quit [Ping timeout: 240 seconds]
FabM has joined #m-labs
sb0 has quit [Quit: Leaving]
<_florent_>
rjo, sb0: about non power of two memories, it can be optimal for small memories not implemented in block ram, but implemented in block ram there is no magic and we will loose the unused part of the blockram
<_florent_>
rjo, sb0: but sb0 is right, there is no reason to try to do that in the code, that's better to let the synthesis tool do it
_rht has quit [Quit: Connection closed for inactivity]
sb0 has joined #m-labs
fengling has joined #m-labs
kuldeep has joined #m-labs
kuldeep has quit [Ping timeout: 246 seconds]
kuldeep has joined #m-labs
sandeepkr has joined #m-labs
cr1901_modern1 is now known as cr1901_modern
sb0 has quit [Quit: Leaving]
fengling has quit [Ping timeout: 240 seconds]
sb0 has joined #m-labs
<cr1901_modern>
sb0: ping when you get the chance (warning: this question's involved)
<sb0>
cr1901_modern, ask away...
<cr1901_modern>
I'm porting the SPI peripheral from ARTIQ to MiSoC; it's more feature complete than the current core. But it depends on the wishbone ACK signal to stall the bus in case there's a pending transfer from the data register to the shift register >>
<cr1901_modern>
As per rjo's instructions, I want to put a CSR wrapper around the artiq core, but the CSR bus has no provisions for stalling the bus. Is there a way from within MiSoC to intercept Wishbone2CSR during finalization to add custom stalling code?
<cr1901_modern>
I really think silently dropping bytes to be written is a bad idea, and querying a "pending transfer" register each time I write data seems wasteful.
<sb0>
CSRs don't support stalling, for simplicity reason. querying a status register isn't much worse than stalling.
<cr1901_modern>
Alright, very good then. I'll take your word for it. I'm under the impression the wishbone SPI core is designed as fast as possible b/c of ARTIQ's constraints? It only stalls when a very specific condition is met.
<cr1901_modern>
I.e. the extra complexity is worth not stalling when we don't have to :P.
<larsc>
stalling peripherals are terrible
<cr1901_modern>
larsc: Why do you say that?
<larsc>
gives you unpredictable behavior
<larsc>
and if you stall to long you get a sigbus and everything crashes
<larsc>
(if your interconnect has a timeout)
<larsc>
too long
<cr1901_modern>
I'm not sure how signals are implemented in any *nix, tbh :(
<larsc>
what's ok if you pipeline your reply and it e.g. always takes 2 clock cycles
<cr1901_modern>
I suppose branch prediction would offset the penalty for having to query a status register before sending data off
<cr1901_modern>
I'll probably add a "write was eaten" status bit to this core
<larsc>
it depends, do you expect it to be busy or ready most of the time when a write happens?
<cr1901_modern>
I'm guessing the average OS would buffer writes to an SPI peripheral, there's no point in trying to to send more than one byte per time slice, so prob on average it'll be ready.
* cr1901_modern
should consider looking at how Net does it
<larsc>
in the context of the speed of the spi clk the extra read should probably be negligible anyway
<cr1901_modern>
As usual, I'm overthinking this/bikeshedding :
<cr1901_modern>
:/*
* sb0
notices that slice of slice also breaks in myhdl
<sb0>
i.e. generate non-standard verilog
rjo has joined #m-labs
<rjo>
_florent_: limited BRAM and the synthesis tool being unable to infer non-power-of-two BRAM as such is definitely a reason.
rohitksingh has joined #m-labs
sandeepkr has quit [Ping timeout: 250 seconds]
<sb0>
apple used to have interesting content on their website