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

More
2 years 2 months ago #306764 by meister
puhh, realy gigabit ? hmm, if it's work

i can run LAN8720 & RTL8201F on the tangprimer, so there is allready code for it as a base


at the moment, i try to debug a little bit the old w5500 driver and found out that it do not receive the last package
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 #306766 by Mecanix
@meister 

A 1000 meg base ethernet/phy onto "rgmii_txc & rgmii_rxc" buffers. Have a look and let us know if RIO can deal these two buffers. 
Let's get this lag over with and league up a notch! 

Synthesized, Placed and Routed Code in hands. If interested, DM an address I can send bitstream source too [16mb]. 
RTL8211FD Schematic attached (pdf). Same real-estate as the wizzy part, 10x performance increase though.


 

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

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

at the moment, i try to debug a little bit the old w5500 driver and found out that it do not receive the last package
 
I'll standby. That's awesome news to hear, I know you'll figure it out with time. Oh man!!

ps. yes gigabit phy. Correct. If you need the bitstream, shoot an addy I can email -or- a drag & drop box. 
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 #306774 by meister
we have 2 buffers like this:

reg [31:0] tx_data;
reg [31:0] rx_data;

when a packet is received on port 2390 (UDP),
it should be written to rx_data and the data from tx_data
directly send back to the sender.

thats all in the first step.

later we need a check if the received package have the correct ID


I am one step further with the w5500,
the problem is here:
Code:
end else if (state == STATE_RX_START) begin rx_buffer_read_pointer <= rx_buffer_read_pointer + data_read[7:0]; if (rx_size == (BUFFER_SIZE_RX+HEADER_SIZE)) begin stat <= 3; rx_buffer_valid <= 1; current_instruction <= {8'd0, rx_buffer_read_pointer, BSB_S0_RX_RWB_READ}; spi_clk <= 1'b0; state <= STATE_PULLING_DATA; spi_chip_select_n <= 1'b0; spi_clock_count <= 10'd0; is_busy <= 1'b1; end else begin stat <= rx_size; rx_buffer_valid <= 0; state <= STATE_RX_WRITE_PTR1; is_busy <= 1'b1; end

rx_size is only 8bit, so it will not send back a package and then we get the timeout
....

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

More
2 years 2 months ago #306785 by meister
my professional test setup image missing /media/kunena/emoticons/w00t.png

 

why didn't I try this before image missing /media/kunena/emoticons/blush.png

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 image missing /media/kunena/emoticons/shocked.png
Code:
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
Code:
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
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 #306786 by meister
 

EDIT: >140 minuted later , 5 lost packages of >8400000 that's ~0.00006% package lost
hmm, i think it's ok image missing /media/kunena/emoticons/w00t.png
Last edit: 2 years 2 months ago by meister.
The following user(s) said Thank You: samueldutradasilva, Mecanix

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

Time to create page: 1.105 seconds
Powered by Kunena Forum