POETSII / tinsel

Manythread RISC-V overlay for FPGA clusters
Other
35 stars 1 forks source link

Dt10 hostlink patches #105

Closed m8pple closed 3 years ago

m8pple commented 3 years ago

Adds the ability to retry connections to boxes, as occasionally TCP connections will fail when rapidly opening and closing hostlink in multiple programs in sequence.

Explicit memsets are to avoid uninitialised memory (last few bytes of BootReq) getting sent. It is benign in this scenario, but valgrind doesn't know this.

Flushes on stdout are for cases where you are sending thread output to stdout and into another process (e.g. piping it through grep or something). Forcing the flush when there is no more data avoids the situation where the string you are looking for has been read, but not yet sent. In principle the fflush could lower performance, but it is followed by a 10ms wait, so seems fairly safe.

Tested on ayres and byron (2x2 boxes), though only by building and then running "hello".

mn416 commented 3 years ago

Ready to merge after sleep is sorted out.

m8pple commented 3 years ago

I think it is fixed as suggested now,