Hello Right - so even more conext will be helpful: tcpborphserver was written for the ROACH1 board - which is about a decade old. It memory maps the FPGA into the processor's address space - so accesses were actually rather quick. tcpboprhserver has since been ported to number of other platforms too ...
I think Jack's advice is good - fixing the wordread/wordwrite functions for your board would be a good first step, and might be sufficient for what you need to achieve. If I recall correctly, the functions implemented interesting byte (and perhaps even bit-level) shifts, which weren't supported in hardware, so maybe that complexity makes updating/porting them less of a priority. I suppose if these shifts aren't needed, they could be simplified/elided - and I suspect your hardware does byte level accesses natively anyway. regards marc On Tue, Jul 19, 2022 at 6:01 PM Kiran Shila <[email protected]> wrote: > > > ?wordread/?wordwrite was written with maximal human readability in > > mind. Somebody who has a misbehaving roach deployed somewhere can just > > telnet/netcat/socat/etc to port 7147 and issue a wordread > > to see if enough bits are toggling, or if some counter is ticking > > over, set a debug flag, etc. > > I would've just used `wordread/write` but as of the latest version of > the Raspberry Pi image, that functionality is broken. I tried updating > to the latest version of katcp_devel (75dde9d), but then nothing worked > at all. > > > ?read/?write are intended to retrieve larger chunks of data, > > and use a represenation which is reasonably efficient. The link > > to the powerpc isn't particularly fast, and while there are things > > that could be optimised further, the current backslash encoding isn't > > computationally expensive and adds a bit over 3% overhead, > > which I think is reasonably good. > > Why does it need to be efficient? Especially considering in other parts > of the codebase we're bit-banging SPI through katcp messages (which is a > single bit for a 28 byte message, a cool 0.45% efficiency) > > > When I was referring to escape (and cornered programmers) in the > > previous mail I didn't only mean literal escape characters, > > but also a means to escape some of the constaints or access > > extended functionality. In the above case, binary(ish) data to > > do more efficient bulk transfers. > > But again, was there an actual problem this was solving? Was there a > throughput issue somewhere that required spec-breaking changes? For bulk > transfer (like uploading the FPG file), this was solved with opening a > separate TCP connection and streaming bytes that way. > > > Of course, there is also nothing stopping you from only > > using ?wordread and ?wordwrite in your rust library if the ?read and ?write > > requests strike you as suffiently awkward. > > Besides the commands being broken, it's not just awkward to use `read` > and `write`, it's not valid katcp. It will not parse with the formal > grammar given. Having messages that break the contract defeats the whole > purpose of having a formal specification. > > -- > You received this message because you are subscribed to the Google Groups > "[email protected]" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/63df8a5b-c1d8-6fd7-eed0-7d56ee2af203%40kiranshila.com. -- https://katfs.kat.ac.za/~marc/ -- You received this message because you are subscribed to the Google Groups "[email protected]" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/lists.berkeley.edu/d/msgid/casper/CAGrhWaQKmx4-Efb_RVw5uEqMG5D-%2BqP%2BhaJrJmHW5zL1J6r6vg%40mail.gmail.com.

