*** tpb <[email protected]> has joined #litex | 00:00 | |
sajattack[m] | <jevinskie[m]> "You could probably fit a "couple..." <- that's a nifty-looking board, maybe try emailing [email protected] | 01:05 |
---|---|---|
*** mc6808 <[email protected]> has joined #litex | 02:27 | |
*** Degi <[email protected]> has quit IRC (Ping timeout: 264 seconds) | 03:32 | |
*** Degi <[email protected]> has joined #litex | 03:34 | |
*** mc6808 <[email protected]> has quit IRC (Quit: Client closed) | 05:07 | |
*** C-Man <[email protected]> has quit IRC (Ping timeout: 252 seconds) | 05:53 | |
*** FabM <FabM!~FabM@armadeus/team/FabM> has joined #litex | 06:18 | |
*** cr1901 <cr1901!~William@2601:8d:8600:911:99af:ecfe:75f6:9ed5> has quit IRC (Ping timeout: 260 seconds) | 08:57 | |
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) | 10:10 | |
*** TMM_ <[email protected]> has joined #litex | 10:10 | |
*** C-Man <[email protected]> has joined #litex | 10:25 | |
*** ilia__s <[email protected]> has joined #litex | 10:46 | |
*** ilia__s <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 11:04 | |
*** cr1901 <cr1901!~William@2601:8d:8600:911:ac7b:1555:3d5f:1f9f> has joined #litex | 11:33 | |
*** benh <[email protected]> has joined #litex | 12:31 | |
benh | _florent_: Hi Florent ! Long time no see :-) | 12:31 |
benh | Any idea why the tests are failing on this PR ? https://github.com/enjoy-digital/litedram/pull/278 | 12:31 |
_florent_ | Hi benh | 12:33 |
_florent_ | I'll look at this, thanks. I probably broke the no CPU case when adding the FIFO mode for the UART | 12:34 |
benh | _florent_: yup, my PR fixes the generation but the test cases are somewhat failing :-) | 12:59 |
benh | I also did a small PR for liteeth to support GMIIMII | 12:59 |
_florent_ | ok thanks | 13:00 |
leons | benh: you mean 10/100Mbit/s speeds over GMII? | 13:00 |
leons | benh: ah nevermind :) | 13:01 |
benh | Hrm ... so it looks like there are a number of issues with the definition for the wukong board in LiteX ... | 13:11 |
benh | for example the clock pin doesn't match the doc and examples :-) | 13:11 |
benh | also the FPGA is unfortunately a -1 speed grade | 13:11 |
benh | which is problematic since GMIIMII requires a sysclk of 125Mhz, which might be difficult to attain with Microwatt at that speed | 13:12 |
benh | is that a hard limit of the PHY ? | 13:12 |
leons | benh: what do you mean by GMIIMII? I still don't understand :D | 13:13 |
benh | gen.py didn't have an option to instanciate LiteEthPHYGMIIMII | 13:17 |
benh | btw, is that expected ? | 13:17 |
benh | build/microwatt_0/wukong-a100t-vivado/microwatt_0.runs/impl_1/runme.log:WARNING: [DRC RPBF-3] IO port buffering is incomplete: Device port eth_mdio expects both input and output buffering but the buffers are incomplete. | 13:17 |
benh | build/microwatt_0/wukong-a100t-vivado/microwatt_0.runs/impl_1/runme.log:WARNING: [DRC RPBF-3] IO port buffering is incomplete: Device port eth_mdio expects both input and output buffering but the buffers are incomplete. | 13:17 |
benh | there's also a pile of warnings about litedram IOBUF having no load on IBUF | 13:18 |
_florent_ | benh: I don't have the Wukong board but Melkhior here has been playing with it quite a bit IIRC | 13:28 |
_florent_ | benh: you can also probably restrict operation to MII mode on this board | 13:28 |
benh | Ok. Well there are definitely mismatches in the pin assignment between LiteX and the doc I got | 13:34 |
benh | or example clock on M21 vs M22 | 13:34 |
benh | ahhhh... QMTECH replied to me, it's a board "v2" | 13:35 |
benh | clock has moved and CLOCK_DEDICATED_ROUTE FALSE is not needed | 13:35 |
leons | benh: regarding the CPU clock speed, why don't you just let the PHY run in a different clock domain? GMII requires 125MHz given it's 8bit per cycle and you need 1Gbit/s | 13:36 |
leons | Your CPU can presumably run at much lower speeds, e.g. 50MHz if the clock domain crossing has a large enough buffer or you increase the data width | 13:36 |
leons | I'd advise you to look at the 32bit MAC data path PR by david-sawatzke | 13:36 |
benh | because crossing clock domains with wishbone sucks :_) | 13:37 |
benh | and afaik the clock passed to the PHY has to be the sys_clk no ? Unless there's a clock domain gap already inside liteeth ? I haven't looked in details | 13:38 |
benh | it would be good indeed if the PHY had an async fifo to the MAC | 13:38 |
benh | or MAC to buffers | 13:38 |
benh | so that the wishbone interface can be in a different clock domain from the rest of the eth | 13:39 |
zyp | that's already supported | 13:39 |
leons | There is such a FIFO | 13:39 |
zyp | etherbone got a 32b datapath, so it can run down to 125/4 | 13:39 |
somlo | _florent_: btw, PR 1040 is good to go as far as my ability to clean it up :) Please have a look and merge if you agree, whenever you get a chance | 13:40 |
leons | And if even running the MAC path at 125MHz has too tight timing for you, david-sawatzke and I have been working on 32 and 64-bit data path through the MAC (which then also allows running it with 10Gbit/s at 156.25Mhz) | 13:41 |
benh | zyp: I'll have to look at the details, the stuff spat out by gen.py doesn't seem to support that | 13:41 |
benh | leons: thanks, I think the MAC at 125 should be fine | 13:41 |
benh | its the rest of the system that will probably struggle past 100 :-) we'll see... | 13:41 |
leons | benh: look at mac/core.py | 13:42 |
benh | I'll send another PR to add Wukong v2 support as well, but now bed time | 13:42 |
benh | thanks I will | 13:42 |
*** ilia__s <[email protected]> has joined #litex | 14:05 | |
mm001 | _florent_ I have finally managed to switch on and off the LED of the RV901T board using the linsn_rv901t.py with etherbone by putting the LED to a GPIOOut like in the colorlite example and using litex_server and the scripts. Now I would like to switch on and off the LED only by UDP data. Like you suggested on 2021-09-15, I used a LiteEthUDP2StreamRX, but it does not work yet. In the class BaseSoc, I defined udp_streamer = LiteEthUDP2StreamRX( | 14:26 |
mm001 | ip_address=convert_ip("192.168.1.50"),udp_port=1122) then I add it with self.submodules.udp_streamer = ClockDomainsRenamer("eth_rx")(udp_streamer) and in the self.sync i do If(udp_streamer.source.valid, my_led.eq(udp_streamer.source.data[0]) | 14:26 |
*** ilia__s <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 14:26 | |
_florent_ | mm001: nice, I'm currently working on an example for this! I'll push it in a couple of minutes :) | 14:27 |
mm001 | however, I think I miss something. Is the LiteEthUDP2StreamRX connected? I guess not. I tried self.comb += self.ethphy.source.connect(udp_streamer.sink) but without success. | 14:27 |
mm001 | _florent_ GREAT!! Thanks a lot! | 14:28 |
mm001 | by the way, building linsn_rv901t.py with ethernet enabled gives a region overlap... | 14:29 |
mm001 | and if I remove self.add_ethernet, the ping response works, but only if I change the sys_clk to 133e6 like in rgmii_test.py. | 14:30 |
_florent_ | But now that I started looking again at the code after a > 5 years, I see things to improve, so I'm also improving some parts... | 14:30 |
_florent_ | mm001: I'll look at the region overlap, I fixed something similar a few days ago IIRC | 14:31 |
mm001 | _florent_ no problem. it's just difficult to start using LiteX without working examples, but I don't give up... :-) | 14:31 |
_florent_ | mm001: sure, we are trying to improve this | 14:32 |
mm001 | I don't understand yet what has to be connected to what and how. And every change needs a new build, just to see that it still does not work... | 14:33 |
mm001 | But anyway, it's great we have LiteX in the first place and thank you very much for all the work and putting it open source! | 14:33 |
mm001 | just another question: where are you going to push your example to? | 14:34 |
_florent_ | mm001: if you want to speed up iterations, you can also use litex_sim that has etherbone support | 14:44 |
mm001 | _florent_ ah, great, I'll have to have a look at litex_sim! | 14:47 |
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 264 seconds) | 15:01 | |
_florent_ | mm001: https://github.com/enjoy-digital/liteeth/commit/fd9e30f10bdc3d7eee01f3afe4a4fcfb58f4e590 | 15:03 |
_florent_ | make sure to update LiteX/LiteEth | 15:03 |
_florent_ | The interesting parts are: | 15:04 |
_florent_ | https://github.com/enjoy-digital/liteeth/blob/master/bench/arty.py#L50-L56 | 15:04 |
_florent_ | the UDPStreamer instance, providing you stream Endpoints from/to a UDP port | 15:05 |
_florent_ | and here you can see the latch of the incoming UDP RX data to use it to drive the leds: https://github.com/enjoy-digital/liteeth/blob/master/bench/arty.py#L68-L73 | 15:05 |
*** TMM_ <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) | 15:24 | |
*** TMM_ <[email protected]> has joined #litex | 15:24 | |
mm001 | _florent_ Thanks a lot! I think I understand what you did in those lines and I adapted it to take it into linsn_rv901t.py. It does build without errors but I can't get the udp data onto the LED yet. I'll continue to try. Just to check that I'm doing everything right: In the file linsn_rv901t.py, I deleted the lines 87-91 (the LED Chaser) and in this place I added: | 15:53 |
mm001 | self.submodules.udp_streamer = udp_streamer = LiteEthUDPStreamer(udp=self.ethcore.udp, ip_address="192.168.1.50", udp_port=1122) | 15:55 |
mm001 | self.comb += udp_streamer.source.ready.eq(1) | 15:55 |
mm001 | my_led = platform.request_all("user_led") | 15:55 |
mm001 | self.sync += If(udp_streamer.rx.source.valid, my_led.eq(udp_streamer.source.data[0])) | 15:56 |
*** C-Man <[email protected]> has quit IRC (Ping timeout: 265 seconds) | 15:56 | |
mm001 | _florent_ This should work, shouldn't it? | 15:57 |
_florent_ | mm001: If you are also adapting the udp port in the script, it should be fine yes | 15:58 |
mm001 | well, I just go to command line and test with: | 16:00 |
mm001 | echo -n '0' $pipe$ socat - -udp-datagram:192.168.1.50:1122 | 16:01 |
mm001 | and change with echo -n '1' to toggle the LSB | 16:01 |
mm001 | i can see the packet in wireshark... | 16:02 |
mm001 | the ip_address in the LiteEthUDPStreamer is the computer, right? | 16:06 |
mm001 | the board is at 192.168.1.50 and the computer at 192.168.1.100 | 16:07 |
_florent_ | mm001: ok, i'll do a test on the RV901T | 16:17 |
_florent_ | mm001: regarding the compilation issue with ethernet, were you just testing: ./linsn_rv901t.py --with-ethernet ? | 16:17 |
mm001 | _florent_: it was ./linsn_rv901t.py --cpu-type=None --integrated-main-ram-size=0x100 --with-ethernet --build | 16:22 |
_florent_ | ok thanks I will look at it, we can probably allow the build, but this will not be something functional since --with-ethernet needs a CPU | 16:28 |
mm001 | _florent_ got it! i had to send 64 bytes in order to flush the fifo | 16:28 |
mm001 | my mistake. thanks! Yeah!! It works! | 16:28 |
_florent_ | great | 16:31 |
mm001 | _florent_ am I right assuming the ip_address in LiteEthUDPStreamer is only for TX? | 16:32 |
_florent_ | mm001: in fact RX is also checking it: https://github.com/enjoy-digital/liteeth/blob/master/liteeth/frontend/stream.py#L74 | 16:33 |
_florent_ | mm001: but while looking at the code earlier I was wondering if we should really keep this check | 16:34 |
mm001 | _florent_: That means 'valid' is only 1 when the sender has the right address... | 16:37 |
_florent_ | yes because with LiteEthUDPStreamer we want to create a link between the FPGA and Host | 16:38 |
_florent_ | for both TX and RX | 16:38 |
mm001 | Ok, got it. but that's easy enough to change... | 16:39 |
mm001 | thanks a lot! | 16:39 |
_florent_ | but if you just want to received UDP data, you can also just use the UDP port directly | 16:39 |
_florent_ | with udp.crossbar.get_port(udp_port, dw=8) | 16:39 |
_florent_ | and then use the udp_port.source | 16:40 |
mm001 | Ok, will try that | 16:42 |
mm001 | Would also be nice to find out why rgmii_test.py crashes on udp packet :-) | 16:43 |
*** michalsieron <[email protected]> has joined #litex | 17:17 | |
*** michalsieron <[email protected]> has quit IRC (Client Quit) | 17:18 | |
*** Martoni42 <Martoni42!~Martoni@2a03:d604:103:600:2ad2:44ff:fe23:2f72> has joined #litex | 18:12 | |
Melkhior | benh: yes the current support is for the V1 Wukong (w/o the on-board micro-sd) | 18:14 |
Melkhior | Ethernet works for me as-is, but 1 GBiT is too fast for the soft-cores - so I plugged it into a 100 MBit switch, where it works perfectly | 18:15 |
Melkhior | I only ever tried with VexRiscv, not microwatt, usually running them at 100 MHz | 18:17 |
*** ilia__s <[email protected]> has joined #litex | 18:27 | |
*** C-Man <[email protected]> has joined #litex | 19:18 | |
*** ilia__s <[email protected]> has quit IRC (Remote host closed the connection) | 19:20 | |
*** ilia__s <[email protected]> has joined #litex | 19:21 | |
*** geertu <[email protected]> has quit IRC (Ping timeout: 264 seconds) | 20:26 | |
*** ilia__s <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 20:34 | |
jevinskie[m] | I took a risk and got two of those arria 10 accelerator boards. I can remove the onboard ddr to get the pinout while the rest (e.g. pcie and dimm should be able to be probed externally, boundary scan to find the clocks, etc). Let’s hope I don’t get discouraged and give up :) | 20:49 |
*** Martoni42 <Martoni42!~Martoni@2a03:d604:103:600:2ad2:44ff:fe23:2f72> has quit IRC (Ping timeout: 260 seconds) | 20:52 | |
gatecat | jevinskie[m]: ooh which ones, Microsoft ones? | 21:30 |
jevinskie[m] | https://gidel.com/acceleration-platforms/hawkeye-2040-gbps-arria-10-fpga-computation-accelerators/ available here https://www.ebay.com/itm/174944904362 | 21:30 |
tpb | Title: | Gidel (at gidel.com) | 21:30 |
benh | Melkhior: so what PHY do you instanciate for the ethernet ? | 21:49 |
benh | because GMII_MII which is the "theorical" fit, asserts if you try to use a speed lower than 125Mhz... ah wait the assert is in gen.py | 21:49 |
benh | so if you use directly in LiteX it won't assert, only when generating standalone cores | 21:50 |
benh | Melkhior: how do you want me to add support for v2 ? a different target/platform or a --version argument to the existing one ? | 21:50 |
*** ilia__s <[email protected]> has joined #litex | 22:03 | |
*** ilia__s <[email protected]> has quit IRC (Ping timeout: 256 seconds) | 22:09 | |
benh | zyp: as usual LiteX confuses me :-) How do you create a standalone liteeth wishbone slave at 125Mhz with a wishbone at a different freq (100Mhz) ? | 22:13 |
benh | I can't quite see how that's put together | 22:13 |
benh | zyp: I see how to pass a freq to LiteEthPHYGMIIMII constructor but it's just used to calculate timings for the detection, it doesn't do anything else, I assume the actual clock is coming from elsewhere ? | 22:15 |
benh | zyp: I never understood how clocks work in LiteX... | 22:17 |
benh | zyp: LiteEthPHYGMIIMII uses PulseSynchronizer and looks explicitely for "sys" ... | 22:21 |
benh | zyp: ok I think I get it .. the PHY is clocked externally, the MAC uses sys_clk, so I could have the MAC at 100Mhz and the PHY at 125Mhz, rigjt ? | 22:35 |
benh | however in the middle I have LiteEthGMIIMIIModeDetection() which is the state machine that flips between GMII and MII, and this works by "measuring" the rx_clk from the PHY compared to the sys_clk | 22:35 |
benh | now, I can't quite get my head around the LiteX constructs in there, so I don't know how that FSM is itself clocked, that said, there's a 5% margin, we could in theory use a much bigger margin no ? Since there a 5x difference between MII and GMII clocks | 22:37 |
benh | I'll try hacking that formula, I think I understand what it does, and use a much bigger margin, see how that works here | 22:42 |
benh | bah.. .that might just work (and also work better for non integer sys_clk/125e6 ratios too) | 22:47 |
benh | @@ -162,8 +162,8 @@ class LiteEthGMIIMIIModeDetection(Module, AutoCSR): | 22:47 |
benh | ) | 22:47 |
benh | fsm.act("DETECTION", | 22:47 |
benh | update_mode.eq(1), | 22:47 |
benh | - # if freq < 125MHz-5% use MII mode | 22:47 |
benh | - If(sys_counter > int((clk_freq/125000000)*1024*1.05), | 22:47 |
benh | + # if freq < 125MHz-50% use MII mode | 22:47 |
benh | + If(sys_counter > int((clk_freq*1024*1.05)/125000000), | 22:47 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!