antmicro-labs / 2d-gpu

Apache License 2.0
1 stars 3 forks source link

Run LiteX on ArtyA7 #11

Open kmezynski opened 4 years ago

kmezynski commented 4 years ago
  1. Go through Quick start guide from LiteX repo
  2. Run LiteX on ArtyA7 board
  3. Learn how LiteX attaches modules to Arty board (python script)
  4. Arrange next meeting for further instructions
kmezynski commented 4 years ago

We're ready for further instructions. We both managed to compile LiteX on Arty. I couldn't only upload the bitstream via xc3sprog to ArtyA7 board. I got following error:

xc3sprog -c nexys4 top.bit
...
Could not open FTDI device (using libftdi): unable to fetch product description
Unable to access FTDI device with either libftdi or FTD2XX

@kacperchmiel97 was successful at this point. We suspect problem is related to hardware... either board or my PC

kgugala commented 4 years ago

@kmezynski the problem you have means that xc3sprog couldn't access the USB <-> serial converter on the board. This can be caused by many things:

1) insufficient privileges (try sudo) 2) the board was not connected (e.g. cable is bad). Try lsusb and check if you can see the board 3) if you're using a virtual machine the USB device has to be forwarded to VM

as for the next steps there are a few things:

1) run a system with video output (@rw1nkler please provide info about it) 2) add simple GPIO controller to the system (to figure out how to do it) 3) proceed with DMA integration

rw1nkler commented 4 years ago

Hey, here you can find the repositories which will help you to prepare bitstream and Linux binaries with framebuffer support. This will allow you to observe the framebuffer memory on your screen - You should observe small penguin icon on your monitor if you connect it to the HDMI port of your expansion board

https://github.com/antmicro/linux-on-litex-vexriscv-build

  1. First, you should follow the instructions from: (install direnv, invoke make init) https://github.com/antmicro/linux-on-litex-vexriscv-build/blob/master/README.md

  2. Next, you can apply the patches for LiteX repositories, with the expansion board support: https://github.com/antmicro/linux-on-litex-vexriscv-build/tree/master/patches/arty_hdmi_expansion_board

kmezynski commented 4 years ago

@kgugala Thank you for help, sudo worked perfectly!

rw1nkler commented 4 years ago

Hey, what is the progress in this task? Have you managed to run the LiteX with Linux and framebuffer?

kmezynski commented 4 years ago

@rw1nkler He've realised we hadn't picked up HDMI extension boards, could we arrange meeting? On the other hand we managed to control GPIO, however we still have doubts about it and DMA. Some video conference would be kindly appreciated.

rw1nkler commented 4 years ago

I've sent you e-mails about the next meeting

rw1nkler commented 4 years ago

Have you run this HDMI example on the board?

kacperchmiel97 commented 4 years ago

We have a few questions regarding the DMA integration and GPIO - would it be possible to arrange a short meeting?

kgugala commented 4 years ago

Sure we can. In https://github.com/antmicro-labs/2d-gpu/issues/13#issuecomment-631683765 proposed a date. Can we all meet then?

kmezynski commented 4 years ago

@rw1nkler @kgugala I managed to upload the bitstream according to the instruction described in repo. Unfortunately my monitor doesn't see HDMI signal from ArtyA7 extension board. Am I missing something? Details of my progress:

pip install git+https://github.com/litex-hub/pythondata-cpu-vexriscv.git
pip install git+https://github.com/litex-hub/pythondata-software-compiler_rt.git

To do so, python >=3.5 has to be set as default

sudo apt-get install python
sudo apt-get install python3
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
python --version
kgugala commented 4 years ago

did Linux on LiteX boot correctly?

kmezynski commented 4 years ago

@kgugala I had no errors during the whole process.

kgugala commented 4 years ago

do you have any other display to test on?

kmezynski commented 4 years ago

@kgugala I don't have. I've checked both working HDMI ports on my monitor.

rw1nkler commented 4 years ago

Please paste here the Linux booting log. You should have there information about framebuffer driver:

simple-framebuffer c8000000.framebuffer: framebuffer at 0xc8000000, 0x7e9000 bytes, mapped to 0x(ptrval)
kmezynski commented 4 years ago

@rw1nkler After make apply-patches from repo I got following errors:

error: patch failed: litex/boards/platforms/arty.py:255
error: litex/boards/platforms/arty.py: patch does not apply
error: patch failed: litex/boards/targets/arty.py:28
error: litex/boards/targets/arty.py: patch does not apply