*** tpb has joined #timvideos | 00:00 | |
*** samsagaz has quit IRC | 00:12 | |
*** samsagaz has joined #timvideos | 03:24 | |
*** rohitksingh_work has joined #timvideos | 03:35 | |
*** rohitksingh_work has quit IRC | 03:38 | |
*** CarlFK has joined #timvideos | 03:42 | |
*** ChanServ sets mode: +v CarlFK | 03:42 | |
*** CarlFK has quit IRC | 03:43 | |
*** rohitksingh has joined #timvideos | 13:14 | |
*** sb0 has joined #timvideos | 13:36 | |
shorne | shenki: I had a go at running buildroot with musl | 14:07 |
---|---|---|
shorne | and no issues running ping | 14:07 |
*** springermac has quit IRC | 14:53 | |
*** springermac has joined #timvideos | 14:53 | |
*** CarlFK has joined #timvideos | 16:34 | |
*** ChanServ sets mode: +v CarlFK | 16:34 | |
*** sb0 has quit IRC | 16:49 | |
*** FelixVi has joined #timvideos | 17:33 | |
FelixVi | hi, has anybody here setup the environment in cygwin before? | 17:34 |
rohitksingh | FelixVi: cr1901_modern would be the best bet for Cygwin. He has used it quite much. | 17:37 |
FelixVi | rohitksingh: Thanks! I'll see if he wants to chime in a little bit later | 17:39 |
rohitksingh | FelixVi: Anytime! :) | 17:39 |
CarlFK | you cant use native windows? (I have no clue) | 17:40 |
*** rohitksingh has quit IRC | 17:41 | |
FelixVi | CarlFK: I am not sure actually - but since the default dev instructions are for ubuntu, cygwin could be closer | 17:45 |
FelixVi | Don't judge me for the cygwin thing - but work forces me to do most things in Windows | 17:45 |
CarlFK | do you do other fpga stuff in any os? | 17:46 |
FelixVi | Yeah, I do most work with ISE and some with Vivado - all Windows, even though often based on scripts | 17:47 |
FelixVi | So on that end I should be OK | 17:47 |
CarlFK | I would think it is easier to "do that" than "use cygwin" | 17:47 |
CarlFK | but I don't find any of it easy... so ... | 17:48 |
CarlFK | have you tried Win 10 Linux subsystem? | 17:48 |
FelixVi | No, I am currently on Win7 | 17:49 |
CarlFK | I have seen people try it and it works. so maybe that's better than cygwin | 17:49 |
FelixVi | if it's worth upgrading, I might be able to do that | 17:49 |
FelixVi | yeah, thanks! Thus far, Win7 has been a known evil | 17:50 |
CarlFK | I've seen people apt install gimp firefox and they work. | 17:58 |
FelixVi | This seems doable, too | 18:00 |
FelixVi | just a couple issues with path - the env script doesn't run, but I'm trying to do it manually | 18:00 |
FelixVi | is there a way to just make a basesoc image (default make tries to use hdmi2usb) | 18:15 |
mithro | FelixVi: why do you continue to try and do things in Windows? | 18:16 |
FelixVi | because I am on Windows for work | 18:16 |
FelixVi | I have to so I can use other software I have to have accesss to | 18:17 |
FelixVi | mithro: my goal is to have a LM32 toolchain that people can use from Windows machines | 18:25 |
mithro | FelixVi: So, that is something I would like to support | 18:25 |
mithro | FelixVi: So, the best way to do that is to start with conda for Windows | 18:26 |
mithro | FelixVi: I tried to get our conda packages here to compile under windows here -> https://github.com/timvideos/conda-hdmi2usb-packages/tree/windows | 18:26 |
tpb | Title: GitHub - timvideos/conda-hdmi2usb-packages at windows (at github.com) | 18:26 |
FelixVi | Is that because of how they have packages arranged? | 18:26 |
FelixVi | I am currently using vanilla python with virtualenvwrapper | 18:27 |
mithro | FelixVi: Yeah, we use conda for binary delivery | 18:27 |
FelixVi | Cool, I think I should be able to use conda without breaking anything else I got going | 18:27 |
mithro | FelixVi: If your in the Scientific realm, then you probably already using conda for other things? | 18:27 |
mithro | FelixVi: yeah conda gives you a nice self contained environment | 18:28 |
FelixVi | as of now I don't - virtualenvwrapper is all I'm using | 18:28 |
FelixVi | so I just create virtual environments manually | 18:28 |
FelixVi | but the concept is the same - seperate environments for different projects | 18:29 |
mithro | Conda includes all the things like numpy, scipy, pandas that scientists tend to use | 18:29 |
FelixVi | Let me install conda and check it out | 18:31 |
FelixVi | In my environments, I install all packages myself as I need specific versions for different things | 18:31 |
mithro | FelixVi: Take a look at this -> https://github.com/timvideos/conda-hdmi2usb-packages/blob/windows/.appveyor.yml | 18:31 |
tpb | Title: conda-hdmi2usb-packages/.appveyor.yml at windows · timvideos/conda-hdmi2usb-packages · GitHub (at github.com) | 18:31 |
FelixVi | I assume you can install packages via setuptools in conda even without a conda package available, right? | 18:31 |
mithro | FelixVi: yes | 18:32 |
FelixVi | alright, give me a sec here | 18:34 |
FelixVi | appveyor is something I'm not familiar with | 18:35 |
FelixVi | so, you are already registered and that's how you want to deliver the environment? | 18:36 |
FelixVi | mithro: Could you give me a few pointers about how I should install the toolchain in Windows? | 18:42 |
FelixVi | I'll go through and take notes so it can be turned into setup instructions easily | 18:43 |
mithro | appveyor is basically a windows CI environment - if we can get that working then we will have windows conda packages | 18:47 |
FelixVi | is there already a registration? | 18:47 |
FelixVi | sorry, I am a bit lost about how to get started | 18:48 |
mithro | FelixVi: Install conda, checkout that branch of our github repo and see if you can "conda build XXXX" the packages on Windows | 18:49 |
FelixVi | alright - any conda version? | 18:49 |
FelixVi | there's miniconda and anaconda | 18:50 |
mithro | FelixVi: Either will work but miniconda is smaller :-P | 18:50 |
FelixVi | cool, I'm on it | 18:50 |
mithro | FelixVi: I actually have finally gotten access to Windows machine (as of last week) which I can also do testing like this on | 19:10 |
FelixVi | well, I hope I can do most of the legwork for you | 19:11 |
FelixVi | But if you can help figure out some of the issues, that'd be great | 19:11 |
mithro | Sure! | 19:14 |
mithro | cr1901_modern: poke! see -^ | 19:14 |
FelixVi | mithro: This is the error I get from flterm: https://github.com/FelixVi/HDMI2USB-litex-firmware/blob/master/win_conda.md | 19:16 |
tpb | Title: HDMI2USB-litex-firmware/win_conda.md at master · FelixVi/HDMI2USB-litex-firmware · GitHub (at github.com) | 19:16 |
mithro | FelixVi: I'd start with binutils-lm32-elf | 19:17 |
FelixVi | mithro: does conda come with make or do I need msys or cygwin for that? | 19:21 |
mithro | FelixVi: You'll need MSVC++ I think? | 19:21 |
mithro | FelixVi: I'm actually unsure what I was using on AppVeyor -- they seem to have multiple compilers installed -> https://www.appveyor.com/docs/build-environment/#pre-installed-software | 19:22 |
tpb | Title: Build Environment | AppVeyorAppVeyor Logo (at www.appveyor.com) | 19:22 |
FelixVi | that makes sense | 19:23 |
FelixVi | I'm missing isl >= 0.15 | 19:23 |
mithro | "conda install isl" doesn't work? | 19:23 |
FelixVi | it says it's missing in current channels | 19:24 |
mithro | FelixVi: Oh - it looks like I only was working on openocd https://github.com/timvideos/conda-hdmi2usb-packages/tree/windows/openocd | 19:26 |
tpb | Title: conda-hdmi2usb-packages/openocd at windows · timvideos/conda-hdmi2usb-packages · GitHub (at github.com) | 19:26 |
mithro | https://github.com/mithro/conda-hdmi2usb-packages/blob/windows/openocd/bld.bat looks like I was using mingw ? | 19:27 |
tpb | Title: conda-hdmi2usb-packages/bld.bat at windows · mithro/conda-hdmi2usb-packages · GitHub (at github.com) | 19:27 |
FelixVi | yes, I currently don't have mingw | 19:27 |
mithro | As you can see it was a was quite a long time ago since I last worked on it... | 19:27 |
CarlFK | conda complies things? | 19:28 |
FelixVi | I am trying to build those packages out of the anaconda prompt though | 19:28 |
FelixVi | using "conda build xyz" | 19:28 |
mithro | CarlFK[m]: Yes | 19:29 |
mithro | CarlFK[m]: You can think of conda like dpkg | 19:29 |
CarlFK | dpkg installs pre-compiled stuff | 19:29 |
mithro | CarlFK[m]: But dpkg --build builds those packages | 19:29 |
CarlFK | so that later someone else doen't have to | 19:30 |
FelixVi | in general, most packages have sh files but no bat files | 19:30 |
mithro | CarlFK[m]: Yes, that is how conda works | 19:30 |
FelixVi | so I assume those were compiled under mingw then? | 19:30 |
mithro | CarlFK[m]: We use travis to build conda packages so people don't have to compile stuff themselves | 19:30 |
CarlFK | o does Felix need to build? | 19:30 |
CarlFK | right. so something is off. | 19:30 |
mithro | CarlFK[m]: Because we haven't gotten that working for Windows | 19:30 |
CarlFK | oh. thats whats off | 19:31 |
mithro | https://conda.io/docs/user-guide/tasks/build-packages/compiler-tools.html -- https://anaconda.org/anaconda/mingw -- https://github.com/conda/conda-recipes/tree/master/gcc-5 | 19:34 |
tpb | Title: conda-recipes/gcc-5 at master · conda/conda-recipes · GitHub (at github.com) | 19:34 |
FelixVi | I tried to build openocd, installed patch, but it also fails at the end - much like flterm did | 19:35 |
FelixVi | it doesn't seem to find the binary | 19:35 |
mithro | http://conda-test.pydata.org/docs/build_tutorials/pkgs.html | 19:35 |
tpb | Title: Tutorial: Basic tutorial for building a Conda package Conda documentation (at conda-test.pydata.org) | 19:35 |
mithro | FelixVi: Do you have the output again? | 19:36 |
FelixVi | yes, trying to get it from the prompt into pastebin... | 19:43 |
FelixVi | give me a sec | 19:43 |
FelixVi | https://pastebin.com/ZeH9vjbw | 19:48 |
tpb | Title: Possible Spam Detected (at pastebin.com) | 19:48 |
FelixVi | sorry about the lack of formatting - i'll have to figure out a better way to copy from that console | 19:48 |
mithro | FelixVi: Can you run with --verbose? | 19:49 |
FelixVi | --debug seems to be the closest thing | 19:52 |
FelixVi | https://pastebin.com/kqtzWU9m | 19:53 |
tpb | Title: < CF-Cache-Status: HIT < CF-RAY: 3c8988ef1e2b4fe1-DEN < Date: Tue, 05 Dec 2017 - Pastebin.com (at pastebin.com) | 19:53 |
mithro | I can't really see where it is doing the building.... | 19:56 |
FelixVi | when I execute the run_test.bat manually, it just exits | 19:56 |
FelixVi | and whatever it does, the openocd binary is not found - which is why I think it exits in the first place | 19:57 |
FelixVi | the subfolder in ..../conda-bld is empty | 19:59 |
FelixVi | there's some subfolders but no files | 19:59 |
FelixVi | I assume the _b_env subfolder is where it would build | 19:59 |
mithro | https://ci.appveyor.com/project/mithro/conda-hdmi2usb-packages/history | 20:00 |
tpb | Title: AppVeyor (at ci.appveyor.com) | 20:00 |
mithro | It looks like I didn't get as far as I thought i did... | 20:00 |
FelixVi | ah, that would explain what's going on | 20:01 |
mithro | https://github.com/timvideos/conda-hdmi2usb-packages/issues/5 | 20:01 |
tpb | Title: Get packages working on Windows (including CI) · Issue #5 · timvideos/conda-hdmi2usb-packages · GitHub (at github.com) | 20:01 |
FelixVi | I'm interested in helping out on the Windows version | 20:03 |
FelixVi | but it'll have to happen outside of work | 20:03 |
FelixVi | right now, I am trying to get some LM32 running to show that it's feasible at work | 20:04 |
FelixVi | do you think there is a way to get there relatively quick? | 20:04 |
mithro | FelixVi: The quickest way would be a Linux VM? | 20:04 |
FelixVi | I got cygwin setup with gcc, binutils etc | 20:06 |
FelixVi | misoc is running on it | 20:06 |
FelixVi | that's why I started there - I think I got the environment up and running, too | 20:07 |
FelixVi | but running make.py --platform mimasv2 is looking for hdmi2usb which doesn't exist | 20:07 |
FelixVi | I was just trying to build basesoc gateware for a simple test | 20:08 |
FelixVi | maybe I should try to build for opsis first | 20:10 |
FelixVi | python 3.6 doesn't work with the tracer in migen, but there's a workaround | 20:13 |
FelixVi | this does the trick, but it's not backwards compatible: https://github.com/FelixVi/litex/commit/7df6c9110da7f43f8555539074d9314b68d4687d | 20:26 |
tpb | Title: Making tracer compatible with Python 3.6 · FelixVi/litex@7df6c91 · GitHub (at github.com) | 20:26 |
FelixVi | for opsis, I now get to this point: | 20:28 |
FelixVi | make: *** No rule to make target '#/HDMI2USB-litex-firmware/third_party/liteeth/firmware/uip/Makefile'. Stop. | 20:28 |
FelixVi | but there is no firmware folder that has been created | 20:29 |
*** thaytan has quit IRC | 20:41 | |
*** thaytan has joined #timvideos | 20:42 | |
*** ChanServ sets mode: +v thaytan | 20:42 | |
mithro | FelixVi: sorry, went to lunch | 21:21 |
FelixVi | mithro: ah, no worries | 21:21 |
FelixVi | Currently, I'm trying to figure out the boot medium stuff | 21:22 |
FelixVi | if I pack bios into integrated rom, why can't I boot from flash through that bios? | 21:22 |
cr1901_modern | rohitksingh: He has used it quite much. | 21:23 |
cr1901_modern | No, I have actively avoided it for the past 7 years. I happen to have it installed b/c I've been helping FelixVi out, and I've also needed it for the ATS programming language | 21:23 |
mithro | FelixVi: What does "flashboot" show when you try? | 21:23 |
FelixVi | it's not listed under the "help" command | 21:24 |
FelixVi | so it says "command not found" | 21:24 |
FelixVi | when you have integrated-rom defined, flash doesn't get registered | 21:24 |
FelixVi | that's what I find so confusing - I thought you can have bios in BRAM and use that to boot from flash | 21:25 |
FelixVi | when I build the basesoc without --integrated-rom-size I don't get any bios prompt anymore, so one seems to need that in order to get the bios into BRAM | 21:26 |
FelixVi | see here: https://github.com/m-labs/misoc/blob/master/misoc/targets/papilio_pro.py#L83 | 21:27 |
tpb | Title: misoc/papilio_pro.py at master · m-labs/misoc · GitHub (at github.com) | 21:27 |
FelixVi | I don't seem to be able to find the equivalent to this line here: https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/targets/mimasv2/base.py#L186 | 21:30 |
tpb | Title: HDMI2USB-litex-firmware/base.py at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 21:30 |
mithro | FelixVi: take a look at the Opsis + Atlys examples | 21:31 |
FelixVi | does opsis have the bios in BRAM or on flash? | 21:33 |
mithro | FelixVi: All of the Pipistrello, Atlys and Opsis use BIOS in BRAM, Firmware in Flash | 21:34 |
mithro | FelixVi: you will only get flashboot option if the bios knows you have SPI flash | 21:35 |
cr1901_modern | ^ | 21:35 |
shorne | shenki: switching back to uclibc I see the same issue again (after updating to the latest buildroot). It might be related to the PIC stuff (position independant code) | 21:39 |
shorne | no... it cant be the PIC stuff, the variable sent to clock_gettime is not a global one | 21:46 |
*** sb0 has joined #timvideos | 22:00 | |
FelixVi | mithro: are you supposed to get a bios prompt from BRAM when flash is found? | 22:18 |
mithro | FelixVi: FYI - What do you have under HDMI2USB-litex-firmware/third_party/ directories? | 22:19 |
mithro | FelixVi: Yes | 22:19 |
mithro | FelixVi: What FPGA boards do you have again? | 22:20 |
FelixVi | papilio pro, waxwing, saturn | 22:20 |
mithro | The waxwing + saturn should be easy to get going | 22:21 |
FelixVi | I got them setup, memtest is passing | 22:21 |
FelixVi | I just don't get the boot from flash part | 22:21 |
mithro | Can you past the complete output? | 22:21 |
FelixVi | I can serial boot a test program I wrote | 22:21 |
mithro | FelixVi: Oh -- you are much further along then I thought -- I assume you hadn't even seen anything from the BIOS | 22:22 |
FelixVi | only with --integrated-rom-size | 22:23 |
FelixVi | as soon as I try to use flash, there is no more prompt | 22:23 |
mithro | FelixVi: Can I see your soc config? | 22:24 |
FelixVi | https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py | 22:26 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 22:26 |
mithro | FelixVi: you want something like this -> https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/targets/opsis/base.py#L261-L271 | 22:28 |
tpb | Title: HDMI2USB-litex-firmware/base.py at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 22:28 |
mithro | FelixVi: Remove the if here -> https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py#L138 | 22:29 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 22:29 |
mithro | FelixVi: then add a "self.flash_boot_address" value | 22:29 |
FelixVi | I tried that, but since it's misoc it doesn't know constants | 22:30 |
FelixVi | what I have is hopefully as close as possible to your example | 22:30 |
cr1901_modern | ... hmmm, maybe you were right all along FelixVi re: it works in litex but not misoc | 22:31 |
mithro | Let me look up what misoc currently uses | 22:32 |
FelixVi | ah, thank you! | 22:32 |
FelixVi | I am not far enough along to fix this problem - I think it gets clearer once I see how things are supposed to work | 22:33 |
mithro | FelixVi: the BIOS code is here -> https://github.com/m-labs/misoc/blob/master/misoc/software/bios/boot.c#L263-L289 | 22:33 |
tpb | Title: misoc/boot.c at master · m-labs/misoc · GitHub (at github.com) | 22:33 |
FelixVi | I don't get the printf | 22:34 |
cr1901_modern | Nope, CONFIG_ constants are part of misoc, just checked | 22:34 |
FelixVi | it just sits silent | 22:34 |
mithro | https://github.com/m-labs/misoc/blob/master/misoc/integration/cpu_interface.py#L37-L44 | 22:34 |
tpb | Title: misoc/cpu_interface.py at master · m-labs/misoc · GitHub (at github.com) | 22:34 |
mithro | It does look like you should just be setting "self.flash_boot_address" value | 22:35 |
mithro | https://github.com/m-labs/misoc/blob/master/misoc/integration/builder.py#L91 | 22:35 |
tpb | Title: misoc/builder.py at master · m-labs/misoc · GitHub (at github.com) | 22:35 |
FelixVi | to me it seems like the bios doesn't get executed when flash is specified | 22:35 |
mithro | FelixVi: If you have that if statement, then it will try and use the bios from flash | 22:36 |
mithro | FelixVi: Which isn't what you want | 22:36 |
FelixVi | ah, that makes sense, too - if I remove it I get a wishbone collision | 22:36 |
FelixVi | that's probably because mapping isn't right somewhere | 22:36 |
mithro | FelixVi: Replace this line -> https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py#L144 | 22:37 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 22:37 |
mithro | self.register_mem("spiflash", self.mem_map["spiflash"], self.spiflash.bus, size=platform.spiflash_total_size) | 22:38 |
mithro | Something like that | 22:38 |
mithro | FelixVi: BTW Did you actually flash both the gateware + bios? | 22:39 |
FelixVi | yes | 22:39 |
FelixVi | https://github.com/m-labs/misoc/issues/60 | 22:39 |
tpb | Title: Papilio pro default rom size is too small · Issue #60 · m-labs/misoc · GitHub (at github.com) | 22:39 |
FelixVi | this is what I tried initially | 22:39 |
mithro | FelixVi: Okay, it's most likely the spiflash isn't actually working correctly | 22:39 |
mithro | FelixVi: Take a look at this file -> https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/targets/opsis/base.py#L261-L271 | 22:40 |
tpb | Title: HDMI2USB-litex-firmware/base.py at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 22:40 |
cr1901_modern | FelixVi: Wait a sec... | 22:40 |
cr1901_modern | FelixVi: Nevermind. I just remembered something important, and that I suspect that spiflash1x does not current work properly in misoc. | 22:43 |
cr1901_modern | spiflash2x should be fine | 22:43 |
cr1901_modern | But maybe it isn't. In any case, spiflash in litex _is_ known to work correctly | 22:44 |
cr1901_modern | (This is why I disdain forks) | 22:44 |
cr1901_modern | Well that's something I'll have to fix in misoc | 22:45 |
FelixVi | the spi_flash in litex is very different | 22:46 |
FelixVi | I noticed that before, but didn't know what to make of it | 22:46 |
cr1901_modern | Correct, b/c _florent_ and I rewrote it after some issues w/ the misoc version | 22:46 |
FelixVi | but in either event, shouldn't you still get some text via serial from the bios? | 22:47 |
FelixVi | I'm literally getting nothing | 22:47 |
cr1901_modern | Idk :( | 22:47 |
FelixVi | even if flash doesn't work at all, there's still some printf in the bios when that get's executed | 22:47 |
cr1901_modern | It's possible the bios is crashing before it reaches the text | 22:48 |
cr1901_modern | I'd use a debug led for that | 22:48 |
FelixVi | https://github.com/m-labs/misoc/blob/master/misoc/software/bios/boot.c#L271 | 22:48 |
tpb | Title: misoc/boot.c at master · m-labs/misoc · GitHub (at github.com) | 22:48 |
cr1901_modern | basically, misoc did not meaningfully support 1x spiflash. sb0 provided a fix but we opted to use our own impl for _reasons_ | 22:48 |
FelixVi | ah - but all the numato boards use 1x spiflash | 22:49 |
FelixVi | I assume that's why I am not having much luck | 22:49 |
FelixVi | Is there a simple way to use the mitex spiflash core in misoc? | 22:49 |
cr1901_modern | FelixVi: Really what I should do is trim the litex core down and contribute it back to misoc | 22:50 |
FelixVi | cr1901_modern: do you have either a papilio, mimas, waxwing or saturn to try this with? | 22:50 |
cr1901_modern | Yes I have a mimasv2 | 22:50 |
FelixVi | ah, that's why you said misoc didn't work but mitex did? | 22:50 |
cr1901_modern | self.submodules.spiflash = spi_flash.SpiFlash(platform.request("spiflash2x"), dummy=8, div=4)- you're using a 2x here... | 22:51 |
FelixVi | isn't the flash the same as in papilio? | 22:51 |
cr1901_modern | (5:47:04 PM) FelixVi: ah - but all the numato boards use 1x spiflash | 22:51 |
cr1901_modern | I don't know- it may very well be.] | 22:51 |
FelixVi | saturn uses m25p16 | 22:52 |
FelixVi | papilio pro uses mx25l6445 | 22:52 |
FelixVi | both seem to be 1x to me | 22:53 |
FelixVi | so how did the papilio pro flash boot ever work? | 22:53 |
FelixVi | I'm just confused | 22:53 |
FelixVi | http://papilio.cc/index.php?n=Papilio.PapilioPro#PProSPIFlash | 22:53 |
tpb | Title: PapilioPro (at papilio.cc) | 22:53 |
FelixVi | I have tried to get anything to boot on all 3 platforms thus far | 22:54 |
FelixVi | pipistrello is obsolete (or can you still get them)? | 22:55 |
FelixVi | mimas doesn't seem to work with misoc either (or does it?) | 22:55 |
FelixVi | I'd be more than happy to buy another board to get things started | 22:55 |
cr1901_modern | ... Let me get my bearings please ._. | 22:55 |
FelixVi | is there a S6 board that is known to work? | 22:55 |
cr1901_modern | mimasv2, minispartan6 | 22:56 |
FelixVi | mimasv2 uses m25p16 - which is the same as waxwing and saturn | 22:56 |
cr1901_modern | I can't even _find_ a datasheet for papilio's flash | 22:58 |
FelixVi | why don't we focus on mimasv2 then? since you got the board | 22:59 |
cr1901_modern | FelixVi: Hold on I found it | 22:59 |
FelixVi | that one is the same as the LX45 boards I got here | 22:59 |
FelixVi | papilio was just what I tried since it was already part of misoc - I don't actually use those for anything except quick prototyping and testing | 22:59 |
cr1901_modern | FelixVi: The Papilio Flash _does_ support 2x | 23:00 |
FelixVi | ah | 23:00 |
cr1901_modern | Saturn does not | 23:00 |
FelixVi | wait, I thought there a bpi version and a non-bpi | 23:00 |
FelixVi | or is that different | 23:00 |
cr1901_modern | I have no idea what that means | 23:00 |
*** sb0_ has joined #timvideos | 23:01 | |
*** sb0 has quit IRC | 23:01 | |
cr1901_modern | FelixVi: Try w/ spiflash1x. Ignore what I said about "misoc being broken" for now; I want you to try anyway. | 23:04 |
cr1901_modern | (try w/ misoc*) | 23:04 |
FelixVi | give me one sec | 23:11 |
FelixVi | oh, just need to modify the platform | 23:13 |
FelixVi | what pin becomes dq? | 23:14 |
cr1901_modern | Right, spiflash1x and spiflash2x have the same connections | 23:14 |
FelixVi | in spiflash 2x, dq is mosi, miso | 23:14 |
cr1901_modern | miso should be dq; mosi never switches directions in 1x | 23:15 |
FelixVi | so wouldn't 1x only have 1 dq pin? | 23:15 |
cr1901_modern | actually it shouldn't be called dq. | 23:15 |
* cr1901_modern checks | 23:15 | |
FelixVi | https://pastebin.com/eCMh0UhG | 23:16 |
tpb | Title: ("spiflash", 0, Subsignal("cs_n", Pins("V3")), Subsignal(" - Pastebin.com (at pastebin.com) | 23:16 |
FelixVi | this is my 1x flash interface | 23:16 |
FelixVi | and misoc tells me "AttributeError: 'Record' object has no attribute 'dq'" when I try to use that | 23:16 |
FelixVi | so it seems like it wants dq | 23:17 |
mithro | FelixVi: We have the MimasV2 working on the HDMI2USB-litex-firmware | 23:17 |
cr1901_modern | FelixVi: I retract my retraction. Use Litex until I figure out what to do. | 23:18 |
mithro | FelixVi: Mimas != MimasV2 | 23:18 |
mithro | FelixVi: https://github.com/timvideos/HDMI2USB-firmware-prebuilt/blob/master/archive/master/v0.0.3-1058-g0c06257/mimasv2/base/lm32/image-gateware%2Bbios%2Bfirmware.bin | 23:18 |
tpb | Title: HDMI2USB-firmware-prebuilt/image-gateware+bios+firmware.bin at master · timvideos/HDMI2USB-firmware-prebuilt · GitHub (at github.com) | 23:18 |
FelixVi | and mimas has the same flash as saturn and waxwing | 23:18 |
mithro | FelixVi: Give that image a go | 23:18 |
FelixVi | mimasv2 | 23:18 |
FelixVi | mithro: I didn't get litex up and running yet | 23:18 |
mithro | FelixVi: If you flash that above .bin you can see if it works on your board | 23:19 |
FelixVi | oh, are those going to work on saturn? | 23:19 |
mithro | FelixVi: No | 23:19 |
FelixVi | mithro: I don't have a mimasv2 | 23:19 |
cr1901_modern | FelixVi doesn't have mimasv2 | 23:19 |
mithro | Oh - why are we talking about a MimasV2? | 23:19 |
FelixVi | but I'm happy to order one | 23:19 |
FelixVi | mimasv2 and saturn, waxwing have the same spi flash | 23:19 |
cr1901_modern | mithro: B/c spiflash boot is known to work | 23:20 |
mithro | FelixVi: Did you make the changes I said to your saturn soc? | 23:20 |
FelixVi | yes, that's the config I posted | 23:21 |
FelixVi | but misoc and litex are different when it comes to spi flash | 23:21 |
FelixVi | so I could only get it so close | 23:21 |
mithro | FelixVi: I don't see any changes in https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py#L144 ? | 23:21 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 23:21 |
cr1901_modern | FelixVi: You have managed to stumble upon pretty much every ugly wart in migen/misoc and litex development in two weeks by trying to port a new board to _misoc_ (em). | 23:22 |
cr1901_modern | Clearly something we need to work on. | 23:22 |
FelixVi | mithro: this is what I currently have | 23:23 |
FelixVi | https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py#L144 | 23:23 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 23:23 |
cr1901_modern | FelixVi: Litex/MiSoC diverged in that respect, and IMO they never should have. But I just didn't have the energy to make them converge again. | 23:23 |
FelixVi | cr1901_modern: Sorry, that wasn't my intention ;) | 23:23 |
cr1901_modern | But since an actual user ran into this issue I don't think I have a choice now | 23:23 |
FelixVi | I'll help where I can | 23:23 |
FelixVi | At this point, it seems like I'm not crazy and it's clear that I wasn't doing things in a weird way | 23:24 |
FelixVi | So I might try to move beyond trying to figure out what I'm doing wrong to fixing the issue | 23:24 |
FelixVi | But neither FHDL nor spi flash are areas I have a lot of experience in | 23:25 |
cr1901_modern | FelixVi: Could you make a repo/gist of your saturn migen config and misoc impl that bombs with "dq" is required? | 23:25 |
FelixVi | https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py#L144 | 23:25 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 23:25 |
mithro | FelixVi: So what happens when you use that code? I think that would just explode with a traceback? | 23:25 |
FelixVi | mithro: yeah, I get an index error | 23:26 |
cr1901_modern | FelixVi: The issue is that the naming convention for spiflash1x doesn't match spiflash2x and above | 23:26 |
FelixVi | https://pastebin.com/wtk0Cftg | 23:26 |
mithro | FelixVi: Ignore cr1901_modern for now | 23:26 |
tpb | Title: $ python3 -m misoc.targets.saturn fvco (MHz) = 1000 n= 10 d= 1 clk_freq (par - Pastebin.com (at pastebin.com) | 23:26 |
mithro | FelixVi: I assume you get a key error about spiflash not existing in mem_map? | 23:26 |
mithro | FelixVi: You need to add these lines -> https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/targets/opsis/base.py#L231-L234 | 23:26 |
tpb | Title: HDMI2USB-litex-firmware/base.py at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 23:26 |
FelixVi | it crashes here: https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py#L139 | 23:27 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 23:27 |
FelixVi | mem_map is where it would crash after the current issue | 23:28 |
mithro | FelixVi: Traceback? | 23:28 |
FelixVi | in the pastebin above | 23:28 |
FelixVi | crashes on " self.miso.status.eq(dq.i[1]) " | 23:29 |
FelixVi | because the 1x intf has inconsistent pin naming conventions compared to 2x and 4x | 23:29 |
FelixVi | but - why does my papilio pro also not work in 2x mode? | 23:31 |
FelixVi | cr1901_modern: are you in the us? I can mail you a papilio board if that helps move things along | 23:32 |
mithro | FelixVi: add "with_bitbang=False" | 23:32 |
cr1901_modern | FelixVi: Yes, but that won't be necessary | 23:32 |
FelixVi | mithro: now we're on the spiflash_total_size error - I don't have that defined in my platform | 23:33 |
mithro | FelixVi: https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/platforms/mimasv2.py#L132-L143 | 23:34 |
tpb | Title: HDMI2USB-litex-firmware/mimasv2.py at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 23:34 |
FelixVi | TypeError: register_mem() got an unexpected keyword argument 'size' | 23:35 |
FelixVi | let me get you a snapshot of my platform, too | 23:35 |
mithro | FelixVi: Remove ", size=platform.spiflash_total_size" from the register_mem line | 23:36 |
FelixVi | TypeError: register_mem() missing 1 required positional argument: 'interface' | 23:36 |
mithro | FelixVi: register_mem(self, name, origin, length, interface): | 23:38 |
FelixVi | self.register_mem("spiflash", self.mem_map["spiflash"], platform.spiflash_total_size, self.spiflash.bus) | 23:39 |
mithro | self.register_mem("spiflash", self.mem_map["spiflash"], platform.spiflash_total_size, self.spiflash.bus) | 23:39 |
mithro | jinx :-P | 23:39 |
FelixVi | ok, we had the same idea | 23:39 |
FelixVi | migen.fhdl.module.FinalizeError: CPU needs a rom to be registered with register_mem() | 23:39 |
cr1901_modern | mithro: Am I allowed to speak now? | 23:39 |
mithro | FelixVi: Are you still giving "integrated_rom = False" to the SoC somewhere? | 23:40 |
FelixVi | I just changed it to 20000 | 23:40 |
FelixVi | it now synthesizes | 23:40 |
mithro | cr1901_modern: As soon as FelixVi gets a bios which boots with the "flashboot" command you can take over getting the spiflash to actually work | 23:40 |
cr1901_modern | mithro: Fine. In any case I added it to my internal "misoc/litex" todo list since this appears to be a legitimate bug and not user error | 23:41 |
FelixVi | I am not sure if the bitfile offsets are right - but we'll see | 23:41 |
mithro | FelixVi: Your " self.flash_boot_address = 0x180000" is wrong | 23:42 |
FelixVi | ok, then upload top to 0x0 and firmware to 0x180000? | 23:42 |
mithro | FelixVi: The Saturn has a LX45 right? | 23:43 |
FelixVi | yeah, so the bitfile is ~5x larger than for LX9 | 23:43 |
mithro | https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/platforms/atlys.py#L621-L624 | 23:43 |
tpb | Title: HDMI2USB-litex-firmware/atlys.py at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 23:43 |
mithro | FelixVi: You'll want these lines too | 23:44 |
mithro | https://github.com/timvideos/HDMI2USB-litex-firmware/blob/master/platforms/atlys.py#L621-L624 | 23:44 |
tpb | Title: HDMI2USB-litex-firmware/atlys.py at master · timvideos/HDMI2USB-litex-firmware · GitHub (at github.com) | 23:44 |
FelixVi | top.bit is 1,485,325 bytes large | 23:44 |
FelixVi | oh, that's pretty much the same size | 23:44 |
mithro | The Atlys is a LX45 | 23:44 |
FelixVi | oh, that makes a lot of sense - thought we're looking at mimasv2 | 23:45 |
FelixVi | k, got that in there | 23:46 |
mithro | FelixVi: It would have been better to start from the Atlys or the Pipistrello if I had realized that you were also using a LX45 | 23:47 |
mithro | FelixVi: Upload your latest and I'll take a look | 23:47 |
FelixVi | this is the migen part: https://github.com/FelixVi/migen/blob/configuration/migen/build/platforms/saturn.py | 23:49 |
tpb | Title: migen/saturn.py at configuration · FelixVi/migen · GitHub (at github.com) | 23:49 |
FelixVi | and this is misoc: https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py | 23:49 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 23:49 |
mithro | FelixVi: This still needs fixing -> https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py#L148 | 23:50 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 23:50 |
FelixVi | self.flash_boot_address = self.mem_map["spiflash"]+platform.gateware_size+bios_size | 23:51 |
FelixVi | and bios-size is --integrated-rom-size, correct? | 23:51 |
mithro | FelixVi: Yes | 23:53 |
FelixVi | k, just pushed that again | 23:53 |
mithro | FelixVi: remove this line -> https://github.com/FelixVi/misoc/blob/config/misoc/targets/saturn.py#L124 | 23:53 |
tpb | Title: misoc/saturn.py at config · FelixVi/misoc · GitHub (at github.com) | 23:53 |
FelixVi | k, got that | 23:54 |
FelixVi | I'm not gonna ask about what that does now, hopefully I can figure it out on my own | 23:55 |
mithro | FelixVi: It sets the address that the CPU starts executing at :-P | 23:57 |
FelixVi | so, 0 is the default which we want now | 23:59 |
FelixVi | is 0-20000 the bram bios in our memory map? | 23:59 |
Generated by irclog2html.py 2.13.1 by Marius Gedminas - find it at mg.pov.lt!