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

More
2 years 2 months ago #306718 by meister
my knowledge of verilog is extremely limited and i would be happy to have someone with me who is more familiar with it.

I'm the last person who would complain about someone getting things to work in RIO that I'm too stupid for :)

i will test the new driver later at home, the integration into RIO is not so hard.

all what rio 'know' about the w5500 plugin is here:
riocore/plugins/w5500/

so, more or less, copy the new files into this folder and editing plugin.py:
changing list of verilog files:
Code:
self.VERILOGS = ["w5500.v", "SPI.v"]
and add the new pin:
Code:
self.PINDEFAULTS = { .... "w5500_rst": { "direction": "output", "invert": False, "pull": None, }, }

The only thing missing is this in the w5500.v:
Code:
input [BUFFER_SIZE-1:0] tx_data, output [BUFFER_SIZE-1:0] rx_data, output reg sync = 0, output reg pkg_timeout = 0

sync: goes to 1 if a new package is received
pkg_timeout: goes to 1 if no package received for a while (parameter TIMEOUT)
tx_data: the data to send
rx_data: the received package

pkg_timeout is needed to trigger the error state of the CNC
sync is needed for multiplexed data
BUFFER_SIZE depends on the configuration and will be set while generating the rio.v
The following user(s) said Thank You: Mecanix

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

More
2 years 2 months ago #306719 by meister
if we get rid of the errors in the w5500, i would of course always prefer this interface to the esp, as it is faster, reduces the parts and you don't have to program the esp as well.
Of course, the (r)mii interface would be even better, but the w5500 will do for now :)

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

More
2 years 2 months ago - 2 years 2 months ago #306720 by Mecanix
Your consideration is much appreciated!! You're way too cool bud, thank you for what you've done for this community so far, no joke, it's EPIC <-- repost, take it.

Have a look and see if that's feasible. Problem on my side is not about keyboarding stuff but the Linuxcnc RTAI rather. I honestly wouldn't know where and how to test all that up, prolly would shave a month+ off my short life just to learn (min).

Side note; anyone telling you he/she's an expert in verilog and/or parallel-thinking is utterly lying to you. Bet there is only 5 persons on earth who master that brilliant e.e. mess of a codebase... (/rant_over lol)
Last edit: 2 years 2 months ago by Mecanix.

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

More
2 years 2 months ago #306721 by Cant do this anymore bye all
ARP & Ping are handled internally via the W5500, the only control is whether to respond to a ping or not.
After looking at info on the W5500 I read, whilst theoretically it can run an 80Mhz clock for real life 33Mhz is the max recommended.
As I said the packet issue seems to be random, you can have a period of 20000 packets be fine then you can 3 periods when the packets go south every 5000 packets and then be good for another 30k.
According to wireshark when the packets are delayed the data is good, no issues there.
Just wondering if rather than a combined r\w function in the driver whether it could be split. I have a feeling the Hostmot2 driver has seperate r\w functions. Maybe with a few functions added in between the read & write functions it may help.

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

More
2 years 2 months ago #306723 by Cant do this anymore bye all
Should RTAI be used with Ethernet ?
I thought RT_PREEMPT was the go, at least with the hostmot2 Ethernet driver.
The following user(s) said Thank You: Mecanix

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

More
2 years 2 months ago - 2 years 2 months ago #306724 by Mecanix

Should RTAI be used with Ethernet ?
I thought RT_PREEMPT was the go, at least with the hostmot2 Ethernet driver.
 
Don't think for a split second that was a typo, I hardly make any difference between both rtai and rt_preempt. No kidd... so much to catch up, not even to the ankle level of guys like meister or yourself when it comes to lcnc devs. My bad btw... I should have been specific /RT/RTAI/PREEMPT/USPACE/WHO/WHAT... ... ...
Last edit: 2 years 2 months ago by Mecanix.

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

Time to create page: 0.132 seconds
Powered by Kunena Forum