LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

More
02 Aug 2024 19:28 #306785 by meister
my professional test setup

 

why didn't I try this before

i am sooo stupid, well, at least i realized it at some point :)

now i can also increase the SPI speed and in python the looptime dropped from ~0.88ms to 0.42ms
tx (280): [116, 105, 114, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5, 0, 0, 0, 0, 0]
rx: [97, 116, 97, 100, 151, 2, 0, 0, 0, 0, 0, 0, 31, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
0.8819103240966797
tx (280): [116, 105, 114, 119, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5, 0, 0, 0, 0, 0]
rx: [97, 116, 97, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
0.4222393035888672

the problem was, when checking whether a new packet was received, the size was also read out, if this check happened exactly during the transmission and the packet was not yet 100% there, the size was not correct and the check failed

a second before i wanted to send this message, there was a timeout, but ok, this is running over my home network, so it can happen, but it has become extremely good now, i have to let it run isolated for a while.

thank you all, if i hadn't kept asking, i would probably have resigned myself to the esp32 solution
Attachments:
The following user(s) said Thank You: Mecanix, Bongo

Please Log in or Create an account to join the conversation.

More
02 Aug 2024 19:29 - 02 Aug 2024 21:53 #306786 by meister
 

EDIT: >140 minuted later , 5 lost packages of >8400000 that's ~0.00006% package lost
hmm, i think it's ok
Attachments:
Last edit: 02 Aug 2024 21:53 by meister.
The following user(s) said Thank You: samueldutradasilva, Mecanix, Bongo

Please Log in or Create an account to join the conversation.

More
02 Aug 2024 19:59 #306797 by tommylight
The following user(s) said Thank You: meister, Mecanix, Bongo

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 02:50 #306822 by cornholio

If you have a look at the figures on the wiz net wiki you’ll see as packet size drops so does the overall throughput.
 
All I could find is the implementation and proposed data integrity stuff. I know you're past your daylight but when you have a chance tomorrow, see if you can find that bit of info you ref'ed and we'll talk to their engineer about it. See if we can flip a Magic Register to disable that supposedly/suspected throttling thingy...

Impl. Ref: docs.wiznet.io/Product/iEthernet/W5500/Application/udp

 

docs.wiznet.io/Product/iEthernet/W5500/A...tion/spi-performance
The following user(s) said Thank You: Mecanix

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 09:09 - 03 Aug 2024 09:12 #306836 by Mecanix
@cornholio post=306822 userid=35653
Can we append a Kb of great zero-dummy nothingness to the rx and tx buffers to cancel this throttling misery thing? How silly.
This needs testing on a 20~30bytes load to confirm. I'll see if I can rig something up before cracking on something gigabit-like. 

@meister post=306785 userid=19472
That's awesome news, knew you'd sort it eventually (ha!). Let me test this out after dinner when my bunch here is quiet (saturday!).
Last edit: 03 Aug 2024 09:12 by Mecanix.

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 13:46 #306844 by Mecanix
Tests carried. Tested onto my production Lcnc-uspace computer which host a high performance r8169 ethernet adapter. Same I use for my gigabit based lathe (LiteXcnc). Yet I'm unable to have Rio working on this one :(

Strangely enough, I get zero pkt losses and a fast ping response from the wizzy part on that computer. As if it likes it very much! Therefore fair to assume I'm connected solid.

So upsetting to see Rio working for others, but not for myself. I smell badluck arrggh

HELP, calling the Godz!!



Please Log in or Create an account to join the conversation.

More
03 Aug 2024 14:14 - 03 Aug 2024 14:20 #306845 by meister
no panik !!!

do you have recompile your hal-component ?
halcompile --install Output/Mecanix/LinuxCNC/rio.c

if you changed the gateware, you have to recompile it


EDIT: and if you on an other host, don't forget to copy the new generated files,
gateware have to match the rio.c and the linuxcnc configs
Last edit: 03 Aug 2024 14:20 by meister.

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 14:34 - 03 Aug 2024 14:35 #306846 by Mecanix
Yes I did.

I've seen you made changes to your repo and so I've deleted everything locally and started fresh from scratch. Git re-cloned everything, recompiled the gateware, flashed to fpga, halcompile --install rio.c, then copied over the Linuxcnc config files. E v e r y t h i n g brand new!!

That way I ensured everything was fresh as you left it after your mods and tests yesterday. Even went and get the prod computer to test fresh onto.

Saturday's Evils I tell ya lol Trust it's a good day to panic!

Funniest thing is it works(ish) onto the PC I dev onto. That PC can't be used with Lcnc because of the crappy ethernet adapter... one of those affected realtek nic. At least I'm not getting this bad header error onto this PC. So weird... totally lost :(
Last edit: 03 Aug 2024 14:35 by Mecanix.

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 14:38 #306847 by meister
do you run halcompile on the linuxcnc host ?
or at least you have to copy the rio.so (from halcompile) file to /usr/lib/linuxcnc/modules/ on the lcnc host

Please Log in or Create an account to join the conversation.

More
03 Aug 2024 14:39 - 03 Aug 2024 14:42 #306848 by Mecanix
meister post=306847 userid=19472
do you run halcompile on the linuxcnc host ?
or at least you have to copy the rio.so (from halcompile) file to /usr/lib/linuxcnc/modules/ on the lcnc host

yes of course, or else it wouln'd have connected to the fpga. From the host computer: $ sudo halcompile --install rio.c 

Can I bother you more and ask to see how you configure your network interface on your lcnc linux? Below is what mine look like. 
$ sudo nmcli con mod "Wired connection 2" ipv4.method manual ipv4.addr "192.168.10.194/8" ipv4.never-default "yes"
$ sudo nmcli con up "Wired connection 2" 

[img]https://i.postimg.cc/cLk1jnst/RIO3.png[/img]
Last edit: 03 Aug 2024 14:42 by Mecanix.

Please Log in or Create an account to join the conversation.

Time to create page: 0.178 seconds
Powered by Kunena Forum