*** tpb has joined #timvideos | 00:00 | |
*** Elwell_ has quit IRC | 01:49 | |
*** Elwell has joined #timvideos | 01:54 | |
*** Elwell has quit IRC | 02:27 | |
*** Elwell has joined #timvideos | 02:55 | |
*** Kripton has quit IRC | 03:00 | |
*** Elwell has quit IRC | 03:03 | |
*** Elwell has joined #timvideos | 03:03 | |
*** Kripton has joined #timvideos | 03:04 | |
*** Elwell has quit IRC | 03:30 | |
*** rohitksingh_work has joined #timvideos | 03:33 | |
*** Elwell has joined #timvideos | 03:34 | |
*** Elwell has quit IRC | 03:49 | |
*** Elwell has joined #timvideos | 03:50 | |
*** futarisIRCcloud has joined #timvideos | 03:51 | |
*** rohitksingh_work has quit IRC | 04:33 | |
*** Elwell has quit IRC | 04:35 | |
*** rohitksingh_work has joined #timvideos | 04:38 | |
*** sb0 has quit IRC | 04:42 | |
*** sb0 has joined #timvideos | 05:03 | |
*** sb0 has quit IRC | 06:31 | |
*** futarisIRCcloud has quit IRC | 06:41 | |
*** sb0 has joined #timvideos | 07:23 | |
*** Elwell has joined #timvideos | 08:06 | |
xobs | Okay, I've actually got a usecase for the FPGA stuff now. I'd like to create a WS2812b signal integrity checker. How's Icestick support in Litex? | 08:26 |
---|---|---|
*** CarlFK has quit IRC | 08:31 | |
cr1901_modern | xobs: Works fine | 08:49 |
cr1901_modern | I keep the icestorm stuff up to date, and have used icestick w/ migen for plenty of stuff | 08:50 |
cr1901_modern | xobs: https://gist.github.com/cr1901/afc0442405fa4727802182ff9eac0e84 (just replace migen.build w/ litex.boards.platforms) | 08:59 |
tpb | Title: Migen IceStorm Code Sample · GitHub (at gist.github.com) | 09:00 |
xobs | cr1901_modern: Thanks! Is https://github.com/enjoy-digital/litex the original repo? I'm following the steps and am stuck on step 4 "...execute the target you want to build". I don't have an "icestick" target. | 09:05 |
tpb | Title: GitHub - enjoy-digital/litex: Build your hardware, easily! (at github.com) | 09:05 |
xobs | I see an icestick platform, however. What's the difference? | 09:05 |
cr1901_modern | platform is analogous to user-constraints file | 09:06 |
cr1901_modern | target is analogous to a system-on-a-chip design | 09:06 |
cr1901_modern | You probably won't use litex.boards.targets often except maybe for testing | 09:06 |
_florent_ | xobs: go to litex.boards.targets and execute: python3 simple.py litex.boards.platforms.icestick | 09:07 |
cr1901_modern | _florent_: That's not gonna git | 09:08 |
cr1901_modern | fit* | 09:08 |
xobs | Segfault trying to compile umodsi3.o | 09:08 |
* cr1901_modern has... never seen lm32-elf-gcc segfault before | 09:09 | |
_florent_ | cr1901_modern: ah ok, yes lm32 is probably too big for it... | 09:09 |
_florent_ | cr1901_modern: btw, i still have to look at the arty a7 comments | 09:09 |
_florent_ | xobs: you probably have some lm32 toolchain issue | 09:10 |
cr1901_modern | Just look at the arty s7 in migen | 09:10 |
_florent_ | xobs: what do you want to do, do you want a cpu? or just to be able to control the board from a computer? or just some simple logic? | 09:11 |
xobs | _florent_: A combination of things. I'd like to understand Litex more, and use this as an excuse. | 09:11 |
xobs | This particular project will be used to measure ws2812b LED timings. I'd like to drive some pulses out and print the result over a UART. | 09:12 |
xobs | That seems like a good usecase for a softcore with a well-timed ws2812b block. | 09:12 |
cr1901_modern | Unpopular opinion: I feel like litex.platform.targets and misoc.targets should be under their own "examples" directory rather than exposed as part of the package | 09:12 |
cr1901_modern | You almost never use them as-is without modification | 09:13 |
cr1901_modern | xobs: For right now, I'd say forget about the targets directory | 09:13 |
cr1901_modern | Clone my gist, s/migen.build.platforms/litex.board.platforms/, and then run "python3 rot.py" | 09:14 |
cr1901_modern | if everything works, you will get a blinky on ice40 | 09:15 |
xobs | cr1901_modern: it's trying to run yosys. So that's a good sign. | 09:17 |
cr1901_modern | Did it successfully run yosys? | 09:19 |
xobs | I think so. I'm still learning how to read the stack traces. | 09:20 |
_florent_ | xobs: in case you want to use another processor (if lm32 is too big), you can just add --cpu-type <processor> (processor can be: lm32, or1k, picorv32 or vexriscv) | 09:21 |
xobs | Yes, not it's trying to run arachne-pnr. | 09:21 |
cr1901_modern | xobs: _florent_'s advice is good in general, but none of the current CPUs will fit on icestick | 09:21 |
cr1901_modern | I've dabbled w/ creating a "femtorv32", but it's more trouble than it's worth | 09:22 |
xobs | Now it says "Can't find iCE FTDI USB device". Which I think means it's completed. | 09:22 |
xobs | Hooray! | 09:22 |
cr1901_modern | yes it completed. The programming step is optional | 09:22 |
xobs | Would the lm32 fit? | 09:22 |
cr1901_modern | no | 09:22 |
cr1901_modern | ZPU or navre would though | 09:23 |
_florent_ | cr1901_modern: is icestick smaller than the tinyfpga b2? | 09:23 |
cr1901_modern | _florent_: Yes, icestick is 1k, tinyfpga b2 is 8k | 09:23 |
cr1901_modern | xobs: Are you on windoze or lunix? | 09:23 |
xobs | cr1901_modern: I'm on bash-on-windows. | 09:24 |
xobs | I'm trying to find documentation on the issue we had back in January with regards to statically compiled gcc... | 09:24 |
cr1901_modern | xobs: to use iceprog, you need to install libusbk via Zadig | 09:24 |
xobs | cr1901_modern: easy enough! | 09:25 |
cr1901_modern | except I don't remember which channel :P | 09:25 |
_florent_ | cr1901_modern: ah ok, icestick is indeed really small... | 09:25 |
cr1901_modern | _florent_: But that's why I love it | 09:25 |
cr1901_modern | I'm a huge proponent of smolFPGA | 09:25 |
_florent_ | That's a choice... but then you are a bit limited by what you can do with it :) | 09:26 |
xobs | Is it possible to get the debug symbols from your lm32 gcc compiler? | 09:26 |
cr1901_modern | Idk if I've ever tried it, tbh. | 09:28 |
xobs | Ah yes, your lm32 compiler is still using vsyscall, which isn't implemented on Windows. | 09:31 |
xobs | Here's the thread on it: https://github.com/ContinuumIO/anaconda-issues/issues/8203 | 09:31 |
tpb | Title: Due to glibc 2.12 limitation, static executables that use time(), cpuinfo() and maybe a few others cannot be run on systems that do not support or use `vsyscall=emulate` · Issue #8203 · ContinuumIO/anaconda-issues · GitHub (at github.com) | 09:31 |
cr1901_modern | Oh I use mingw64 | 09:32 |
xobs | If I do the "Quick start guide (For advanced users)" would that remove the need for Conda? | 09:33 |
cr1901_modern | xobs: Yes. And well the advanced flow was at one time the only flow :P. | 09:35 |
cr1901_modern | Although gcc not working is def a bug | 09:36 |
xobs | cr1901_modern: Good. It seems easiest, because I'm not sure how to fix the lm32 issue, and the conda people don't seem interested in fixing it. | 09:36 |
cr1901_modern | xobs: Afaik, conda for litex on Windows expects you to be using a command prompt | 09:39 |
cr1901_modern | not bash on Windows | 09:39 |
xobs | Bash-on-Windows actually works pretty well -- you just need an X server to install Vivado, but the entire Artix-7 flow works great. At least it did when I tried in January: https://github.com/timvideos/litex-buildenv/wiki/Bash-On-Windows | 09:39 |
tpb | Title: Bash On Windows · timvideos/litex-buildenv Wiki · GitHub (at github.com) | 09:39 |
cr1901_modern | Well, then it's a bug then :( | 09:39 |
*** DocJosh_ has joined #timvideos | 10:19 | |
*** vys_ has joined #timvideos | 10:20 | |
*** froztbyt1 has joined #timvideos | 10:20 | |
*** medicalwei_ has joined #timvideos | 10:21 | |
*** paddatrapper has quit IRC | 10:24 | |
*** medicalwei has quit IRC | 10:24 | |
*** froztbyte has quit IRC | 10:24 | |
*** vys has quit IRC | 10:24 | |
*** DocJosh has quit IRC | 10:24 | |
*** paddatrapper has joined #timvideos | 10:32 | |
xobs | I couldn't build binutils, so I switched back to conda. Now it's saying "ModuleNotFoundError: No module named 'litex'". How can I troubleshoot that? | 10:53 |
cr1901_modern | xobs: can't build binutils? That doesn't sound right | 10:57 |
cr1901_modern | what error are you getting and what version? | 10:57 |
*** sb0 has quit IRC | 10:58 | |
xobs | cr1901_modern: Let me re-clone binutils. There were a few errors. One was that makeinfo couldn't be run, but that it shouldn't break the build, and if it did it means my make was broken and I should use gnu make. I'm using gnu make 4.1 on "Ubuntu 18.04", so I just installed texinfo and it continued. | 10:59 |
xobs | The actual error that I couldn't figure out was regarding m4, saying something along the lines of "executable not found". m4 exists, so I'm not sure what it was talking about. | 11:00 |
xobs | I'm building binutils from git, like the documentation says. | 11:00 |
cr1901_modern | I am unfortunately unable to debug bash on windows issues. | 11:00 |
cr1901_modern | I would need to see the error trace from configure and friends | 11:01 |
xobs | I've almost finished with the pull. I'll try building it again! | 11:02 |
cr1901_modern | (I personally have never tried building directly from binutils git, fwiw) | 11:02 |
xobs | How do I troubleshoot "ModuleNotFoundError"? Does Python have an equivalent of "-I" to add a directory to the include path? | 11:02 |
cr1901_modern | I've never seen this error either ._. Did you do conda activate? | 11:03 |
xobs | I did, my PS1 has "(litex)" at the start. | 11:03 |
xobs | and CONDA_PYTHON_EXE is pointing to /opt/miniconda3/bin/python | 11:04 |
cr1901_modern | The equivalent of "-I" in Python is PYTHONPATH | 11:04 |
cr1901_modern | try "which python" | 11:04 |
xobs | /opt/miniconda3/envs/litex/bin/python | 11:04 |
cr1901_modern | invoke python, and then from the REPL "import litex" | 11:05 |
xobs | Yes, if I set PYTHONPATH=${path-to-litex} then it works. That's good to know! | 11:06 |
cr1901_modern | But it shouldn't be like that at all ._. | 11:06 |
cr1901_modern | litex shouldn't been installed under the python that conda installed | 11:06 |
cr1901_modern | should've* | 11:06 |
xobs | How can I tell what program it's trying to run as part of the build? It says "Can't find iCE FTDI USB device". What program is it calling, and how can I change that program? | 11:13 |
cr1901_modern | xobs: https://gist.github.com/cr1901/afc0442405fa4727802182ff9eac0e84#file-rot-py-L42 | 11:14 |
tpb | Title: Migen IceStorm Code Sample · GitHub (at gist.github.com) | 11:14 |
cr1901_modern | https://github.com/enjoy-digital/litex/blob/master/litex/boards/platforms/icestick.py#L56-L57 | 11:14 |
tpb | Title: litex/icestick.py at master · enjoy-digital/litex · GitHub (at github.com) | 11:14 |
cr1901_modern | Part III: https://github.com/enjoy-digital/litex/blob/master/litex/build/lattice/programmer.py#L25-L32 | 11:15 |
tpb | Title: litex/programmer.py at master · enjoy-digital/litex · GitHub (at github.com) | 11:15 |
cr1901_modern | xobs: To answer your question directly, the program being called is iceprog, and you need to create your own Programmer class with the methods flash (write to flash) and load_bitstream (just load bitstream into FPGA) | 11:20 |
xobs | I see. iceprog. And the build sequence is defined as part of __main__ | 11:20 |
cr1901_modern | xobs: Well I just did that b/c it's a demo :P. | 11:21 |
cr1901_modern | xobs: https://www.wdj-consulting.com/blog/migen-port.html Shamless plug time | 11:21 |
tpb | Title: WDJ - migen-port (at www.wdj-consulting.com) | 11:21 |
cr1901_modern | >Lastly, the create_programmer function should return a vendor-specific programmer. Adding a programmer is beyond the scope of this article. If a board can support more than one programming tool, the convention is to return a programmer based on a programmer class variable for the given board. This function can be omitted if no programmer fits, or one can be created on-the-fly using GenericPlatform.create_programmer. | 11:21 |
xobs | Thanks. I'm still trying to understand Python, too, so there's an additional issue there. | 11:23 |
cr1901_modern | All platforms subclass GenericPlatform | 11:23 |
cr1901_modern | In any case, I'm pretty sure iceprog is the only programmer meaningfully supported by icestick | 11:24 |
*** sb0 has joined #timvideos | 11:25 | |
cr1901_modern | xobs: Unfortunately, it's been a bit too long since I've learned Python to help w/ that. All I remember is that it was simpler than C++ | 11:28 |
xobs | Woo. I got something. The five LEDs (four red + one green) are kind of dim. I'm guessing it's a cycle display, and it's just going really fast. | 11:29 |
cr1901_modern | No, it shouldn't be going that fast | 11:29 |
cr1901_modern | it's prob programming | 11:29 |
cr1901_modern | takes a few seconds | 11:29 |
cr1901_modern | (or programming stalled) | 11:29 |
xobs | Programming is almost instant. | 11:30 |
daveshah | yeah, the LEDs will light dimly without drivers on the IO because of the built-in pullups | 11:30 |
daveshah | sounds like either the bitstream is bad or the pin assignments are wrong | 11:30 |
cr1901_modern | >the LEDs will light dimly without drivers on the IO because of the built-in pullups | 11:31 |
cr1901_modern | Aside: I just realized how contradictory this sounds at first glance. So much for "pulling up" lol | 11:31 |
xobs | Probably very low-current pullups? | 11:31 |
cr1901_modern | yes that's prob true | 11:31 |
cr1901_modern | from what others have told me when I use the pullups wrong (tm) | 11:32 |
xobs | I'm running iceprog.exe -S rot/rot_migen.bin and it's saying it's programming, followed by "Bye." | 11:32 |
xobs | I'm running iceprog.exe -S rot/rot_migen.bin and it's saying it's programming, followed by "Bye." | 11:32 |
cr1901_modern | The green LED should be brightly lit w/ my bitstream. The red LEDs cycle one LED per second | 11:33 |
cr1901_modern | Don't run "-S" | 11:33 |
cr1901_modern | Unless you've modified your icestick to load directly from SPI bitbang, you don't want "-S" | 11:34 |
xobs | Oh, that works much better. I was looking at programmer.py, and thought the function load_bitstream() always added -S. | 11:34 |
xobs | Is that not the case? | 11:35 |
cr1901_modern | The "-S" option assumes you've soldered a jumper (I _think_) to tell the FPGA to wait for a bitstream from the FTDI chip, instead of trying to load a bitstream from flash | 11:36 |
cr1901_modern | load_bitstream is analogous to loading a bitstream via JTAG on Xilinx devices | 11:36 |
cr1901_modern | flash() is analogous to programming the SPI flash | 11:36 |
cr1901_modern | Since icestick requires a hardware mode to "load a bitstream via JTAG*", you probably want flash() | 11:37 |
cr1901_modern | (*ice40 doesn't have JTAG, so maybe this is a bad analogy to Xilinx devices) | 11:37 |
xobs | Ah, okay. load_bitstream() boots a bitstream onto the device, flash() reprograms nvram. I see where you're coming from. | 11:38 |
cr1901_modern | Yes, that was my intent anyway :). | 11:38 |
cr1901_modern | In any case, congrats! Seems like you got your first bitstream loaded | 11:39 |
xobs | Yay! This is an excellent start. Thank you for your help. | 11:39 |
cr1901_modern | Yw :). Probably the next thing to do is make a UART. Or maybe find a use for the PMOD or IRDA | 11:40 |
cr1901_modern | At some point I want to buy a second icestick b/c my first one is lonely | 11:40 |
xobs | Aww. | 11:40 |
cr1901_modern | so I can use the IRDA feature | 11:40 |
xobs | I'm going to head home -- it's late here. I'll work more on it tomorrow though. | 11:41 |
cr1901_modern | have fun! | 11:42 |
*** rohitksingh_work has quit IRC | 12:34 | |
*** Elwell has quit IRC | 12:44 | |
*** CarlFK has joined #timvideos | 12:59 | |
*** ChanServ sets mode: +v CarlFK | 12:59 | |
*** Sigyn has quit IRC | 13:11 | |
*** Sigyn has joined #timvideos | 13:12 | |
*** rohitksingh has joined #timvideos | 13:38 | |
*** rohitksingh has quit IRC | 15:13 | |
*** rohitksingh has joined #timvideos | 15:17 | |
*** CarlFK has quit IRC | 15:21 | |
*** rohitksingh has quit IRC | 15:28 | |
*** CarlFK has joined #timvideos | 15:29 | |
*** ChanServ sets mode: +v CarlFK | 15:29 | |
*** CarlFK has quit IRC | 15:30 | |
*** CarlFK has joined #timvideos | 15:30 | |
*** ChanServ sets mode: +v CarlFK | 15:30 | |
*** rohitksingh has joined #timvideos | 15:46 | |
*** CarlFK has quit IRC | 16:31 | |
*** CarlFK has joined #timvideos | 16:53 | |
*** ChanServ sets mode: +v CarlFK | 16:53 | |
*** CarlFK has quit IRC | 17:14 | |
*** rohitksingh has quit IRC | 17:21 | |
*** CarlFK has joined #timvideos | 17:35 | |
*** ChanServ sets mode: +v CarlFK | 17:35 | |
*** sb0 has quit IRC | 17:41 | |
*** froztbyt1 is now known as froztbyte | 18:01 | |
*** Kripton has quit IRC | 18:44 | |
*** Kripton has joined #timvideos | 18:56 | |
*** f15h has joined #timvideos | 18:57 | |
*** f15h has quit IRC | 20:17 | |
*** CarlFK has quit IRC | 22:21 | |
*** Elwell_ has joined #timvideos | 22:40 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!