<whitequark>
your question prompted me to look a bit closer at the generated LLVM IR
<whitequark>
I've realized that it's incredibly inefficient for no meaningful reason
<whitequark>
it's emitted as if ARTIQ supported virtual calls, but ARTIQ does not, in fact, support virtual calls
<whitequark>
because it has no subtyping
<whitequark>
with two straightforward changes (eliminating this useless indirection and also some scoping adjustments) I think I can obtain code size and performance similar to C with overflow checking
<sb0>
rjo, your comments on SPI make me think we may want relative timestamps in DMA
<sb0>
i.e. a compact form for a DMA event that adds a small offset to the previous timestamp
<whitequark>
sb0: do you ever want to see subtyping in ARTIQ Python?
<sb0>
what is subtyping?
<sb0>
class inheritance?
<whitequark>
being able to use an inherited class where a base class is expected
<whitequark>
note: inheritance itself is orthogonal to this.
<whitequark>
you can still use it for code reuse (you can do it right now in fact)
evilspirit has joined #m-labs
<sb0>
probably not
<sb0>
at least a good use for that piece of proprietary broadcom crap that passes as bluetooth/gps device in my laptop: testing pyserial without any cables around
<sb0>
(this thing is connected with the laptop's SoC with some weird ACPI UART, which surprisingly works with linux, and playing back dumps from the windows driver makes the thing answer)
<sb0>
there is of course no way those fuckers at broadcom would release any doc, like it's 1999 again
<rjo>
whitequark: i don't think i know enough compiler theory to appreciate that.
<rjo>
sb0: yes. i just had the same idae. but we would still want 64 bits delta_mu.
<rjo>
sb0: 32 bits is just 4s. even ions want more. neutrals definitely. and inserting dummy delta_mu does not sound nice.
<sb0>
when delta is large, use the long form
<rjo>
sb0: i have seen that influxdb has discovered Simple8 for compressing timestamp deltas....
<sb0>
you have a lot of time for transerring the long form anyway
<rjo>
sb0: in dma?
<sb0>
yes
<rjo>
you would interrupt the dma stream to insert that delay?
<rjo>
or split it.
<rjo>
hmm. yeah. maybe 32 bit delta_mu is enough for dma'ed segments.
<sb0>
I haven't put that much thought into DMA encoding yet, but we can have the full form (64bit timestamp + channel no + register no + data) in addition to a shorter form that has smaller timestamps
<sb0>
(maybe)
<rjo>
ack.
<sb0>
or two types of DMA commands: 1) RTIO transaction (with a small e.g. 16-bit timestamp delta) 2) set absolute 64-bit timestamp for next transaction
* rjo
will test the spi master on the xadc appendix for the kc705
<sb0>
I remember you throwing this appendix into the garbage in the first days of ARTIQ... now we're actively supporting it? :)
<rjo>
16 bit would be just 65 µs...
<rjo>
oh. maybe i don't even have it.
<rjo>
i just want some spi gadget that i can test on. the spi flash would be the other target...
<sb0>
65us is plenty of time for inserting a type-2 command. but one would have to look at the data size overhead too...
<sb0>
if you often have 65us, maybe the CPU can do it and you don't need DMA
<rjo>
if you have 100 channels 65us for a set of voltages is not enough on the cpu.
<sb0>
okay, but then the overhead of the type-2 command is <1%
<sb0>
(if there is any overhead. it may actually work and you will gain space)
<rjo>
yes.
<sb0>
reading from stdin using asyncio is a terrible mess
<sb0>
blergh
<sb0>
why are operating systems and programming languages always so awful
<sb0>
_florent_, can you get a file handle on stdin on windows?
<sb0>
On Windows with SelectorEventLoop, only socket handles are supported (ex: pipe file descriptors are not supported).
<sb0>
On Windows with ProactorEventLoop, these methods are not supported.
<sb0>
seriously, asyncio is a library for writing a web server that returns pages from the memory. everything else is bound to run into problems and hacks.
<sb0>
I wonder why they didn't support add_reader() for overlapped file handles on windows, there shouldn't be any problem with that
evilspirit has quit [Ping timeout: 248 seconds]
<whitequark>
sb0: you can
<whitequark>
GetStdHandle(STD_INPUT_HANDLE)
<GitHub156>
[misoc] sbourdeauducq created asyncserial (+1 new commit): https://git.io/v22oT
<GitHub156>
misoc/asyncserial 75b3ac9 Sebastien Bourdeauducq: flterm: use asyncio (Linux only for now)
<sb0>
whitequark, and can this handle be put in overlapped mode?
<sb0>
if no, you cannot read from stdin with asyncio unless you use threads, which is ridiculous
<whitequark>
sb0: you can call ReOpenFile(FILE_FLAG_OVERLAPPED) if the stdin handle corresponds to a proper file object
<whitequark>
however, you cannot perform overlapped reads from console
<whitequark>
(or writes to console.)
key2 has quit [Ping timeout: 240 seconds]
_florent_ has quit [Ping timeout: 240 seconds]
_florent_ has joined #m-labs
[florian] has quit [Ping timeout: 240 seconds]
bentley` has quit [Ping timeout: 240 seconds]
rjo_ has joined #m-labs
stekern_ has quit [*.net *.split]
cr1901_modern1 has quit [*.net *.split]
balrog has quit [*.net *.split]
bb-m-labs_ has quit [*.net *.split]
mindrunner has quit [*.net *.split]
siruf has quit [*.net *.split]
stekern has joined #m-labs
mumptai has quit [*.net *.split]
zoobab_ has quit [*.net *.split]
attie has quit [*.net *.split]
rjo has quit [*.net *.split]
[florian1 has joined #m-labs
siruf has joined #m-labs
mindrunner has joined #m-labs
balrog has joined #m-labs
zoobab has joined #m-labs
cr1901_modern1 has joined #m-labs
bb-m-labs_ has joined #m-labs
kaalia has joined #m-labs
mumptai has joined #m-labs
attie has joined #m-labs
kyak has quit [Ping timeout: 276 seconds]
kyak has joined #m-labs
acathla has quit [Ping timeout: 276 seconds]
kristianpaul has quit [Ping timeout: 276 seconds]
acathla has joined #m-labs
kristianpaul has joined #m-labs
kristianpaul has joined #m-labs
kristianpaul has quit [Changing host]
cr1901_modern has joined #m-labs
mindrunner has quit [Ping timeout: 252 seconds]
zoobab has quit [Ping timeout: 252 seconds]
cr1901_modern1 has quit [Ping timeout: 252 seconds]
balrog has quit [Ping timeout: 252 seconds]
bb-m-labs_ has quit [Ping timeout: 252 seconds]
acathla has quit [Changing host]
acathla has joined #m-labs
zoobab has joined #m-labs
bb-m-labs has joined #m-labs
mindrunner has joined #m-labs
jaeckel has quit [*.net *.split]
[florian1 has quit [Ping timeout: 240 seconds]
siruf has quit [Ping timeout: 240 seconds]
siruf has joined #m-labs
balrog has joined #m-labs
jaeckel has joined #m-labs
kristianpaul has quit [Ping timeout: 276 seconds]
kristianpaul has joined #m-labs
kristianpaul has joined #m-labs
[florian] has joined #m-labs
[florian] has joined #m-labs
hozer has joined #m-labs
acathla` has joined #m-labs
acathla has quit [Remote host closed the connection]