aeon20

Members
  • Content Count

    46
  • Joined

  • Last visited

Everything posted by aeon20

  1. Hello. I'm trying to follow https://www.lowrisc.org/docs/debug-v0.3/fpga/ to build my own bitstream for the RISC-V. There is a section just for that: However, I can't find this folder. What am I supposed to git clone to get this directory structure? I see that https://github.com/lowRISC/lowrisc-chip is referenced, so I've tried to clone that, and also lowrisc-nexys4, lowrisc-quickstart, and others. I can't find it. Am I using an outdated tutorial? Maybe someone that got this working or simply has enough experience in general to see my mistake, could give me some pointers?
  2. Much appreciated, thank you. Sorry for overlooking this. I thought it would throw an error if there was something wrong with the file system, such as the typical "kernel panic - not syncing", or similar to what I'd see on a normal Linux system if it can't access the root disk at all.
  3. So in order to actually boot, it requires an SD card? Forgive my naive questions, but what does it use the SD card for? I might have guessed it is the only form of non-volatile storage it has, however, if it needed this to boot, shouldn't Linux throw an error? I'm assuming the kernel and initial ramdisk are all programmed to the QSPI, so I don't really see why it needs the SD card in order to boot in that sense. Once I get an SD card to try with, do I need to do anything to it? Create a file system?
  4. I have RISC-V running (sort of) on a Nexys A7, I was able to get it booting by doing as kwilber suggested in the following thread make getrelease, and then make program-cfgmem, as explained in the guide https://www.lowrisc.org/docs/getting-started/?_ga=2.61717228.1512607184.1562590486-778246975.1562590486 that you linked to in the thread. This makes the process pretty simplified, as it uses a precompiled Linux kernel and initial ramdisk as well as a precompiled FPGA bitstream which implements the RISC-V. I turn it on, and I do get a display. However, I'm prompted with the following on the VGA output immediately after some self test output: "Hello LowRISC! Tue Aug 14 10:40:47 2018: Turn on SW0 for gdb loading, SW1 for SD-card loading, or SW2 for Ethernet loading." I'm running this installed from the QSPI memory on the Nexys A7. I've tried all the switches, but they don't seem to do anything, not after it has loaded, nor after a reset/power cycle of the device. Since the tutorial appears to have been made for the Nexys A4, I'm wondering if this is the reason switches that aren't present on the A7 are referred to in this manner. How can I get past this? I understand that ideally I should modify the source of the bitstream and recompile it, taking into account the physical differences on the board layout between the Nexys 4 and A7. However, this negates the whole point in using this quick start tutorial for me. I was wondering, is there a simple way to work around this, that I'm not aware of?
  5. I'd like to run RISC-V with very basic (command line only, obviously) Linux on a Nexys A7 just to play around with it. Since I'm a beginner I find it hard to adapt steps for other boards. If anyone could suggest a tutorial that either matches Nexys A7 exactly, or would be as easy as possible for me to adapt, that would be great.
  6. Again just following this guide: https://reference.digilentinc.com/vivado/getting-started-with-ipi/start?_ga=2.157204989.738863100.1553677249-924004044.1549634437 I had it working, but then, when I just generate the bitstream again, without making any changes, export the hardware and launch the SDK, again without having made any changes, just repeating the steps, I'm able to program the device. All of this with no errors. However, I get this when I try to "Launch on hardware". As I said, I had this working before, didn't make any changes, just repeated the steps. Is this a normal problem? Did I miss something? I don't know how to debug this. I did find this: but refreshing doesn't help.
  7. Please consider the following block diagram (from here https://reference.digilentinc.com/vivado/getting-started-with-ipi/start?_ga=2.35038633.906437217.1554114007-924004044.1549634437 but with a utility vector logic block added): I want push_buttons_5bits to remain connected to GPIO2, so I can read from them directly, like before. However, I also want two bits, e.g. bit 0 and bit 1 from push_buttons_5bits to be connected to Op1 and Op2. This has no purpose whatsoever, I'm just learning and would like to be able to read in my C code the result of the and gate.
  8. Wow. It works on /dev/ttyUSB1 !! Thanks a lot for all your support!
  9. Thanks for the help Jon. I am root when I try to do this, so adding myself to the dialout group shouldn't matter. However, just to be sure, I just tried this, and it doesn't change anything, my regular user has the same problem as root, despite being in the dialout group. I also remembered to fully log out and back in, and check that I am indeed in the dialout group. djtgcfg output: # djtgcfg enum Found 1 device(s) Device: NexysA7 Product Name: Digilent Nexys A7 -100T User Name: NexysA7 Serial Number: 210292AA7671
  10. Thanks. (Edit: Sorry, I made a mistake that I corrected, I wrote at first that now it doesn't look like it runs code at all, but this is working now). I've followed the new version of the tutorial. I started a new project from scratch. However, I don't get anything over serial. tried with Putty (running as root), using /dev/ttyS0 and 9600 baud, 8 data bits, no parity bits, 1 stop bit (also tried 115200 baud), confirmed by dmesg: # dmesg |grep tty [ 0.000000] console [tty0] enabled [ 0.479388] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 10.253071] cdc_acm 1-1:1.1: ttyACM0: USB ACM device [ 10.272354] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0 [ 10.272542] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB1 [ 1626.079324] cdc_acm 1-1:1.1: ttyACM0: USB ACM device [ 1986.688788] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 [ 3263.978305] cdc_acm 1-1:1.1: ttyACM0: USB ACM device [ 4315.373016] cdc_acm 1-1:1.1: ttyACM0: USB ACM device Tried to program the device again, tried to hit CPU reset, tried some more. Nothing. The device does get programmed, as I can see it stops with the display demo it comes shipped with. I can also see it running code as the LEDs light up. There are also no errors or warnings when I program it. The block diagram now: The SDK program:
  11. This is my block diagram. I've used the following design https://reference.digilentinc.com/vivado/getting-started-with-ipi/start?_ga=2.256868941.738863100.1553677249-924004044.1549634437 This should be a good and well-known design that should work?
  12. My only problem right now is probably the UART/serial data issue. I can see that the code runs on the FPGA board -- all the LEDs light up when I press a button, just as the code intends. Hence, my only problem now is actually being able to see the data.
  13. Thanks for the help. I can't get this to work. I have: # dmesg |grep tty [ 0.000000] console [tty0] enabled [ 0.471821] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 24.745885] cdc_acm 1-1:1.1: ttyACM0: USB ACM device [ 24.828365] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0 [ 24.828539] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB1 [ 1077.049689] cdc_acm 1-1:1.1: ttyACM0: USB ACM device [ 2845.837523] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 I have programmed the FPGA. Then I do step 8.3 in the tutorial https://reference.digilentinc.com/vivado/getting-started-with-ipi/start?_ga=2.1642103.738863100.1553677249-924004044.1549634437 8.3 Right click on the application project in the Project Explorer, then select Run As → Launch on Hardware (System Debugger). I try using minicom, as you can see I'm using port /dev/ttyS0. Welcome to minicom 2.7 OPTIONS: I18n Compiled on Apr 22 2017, 09:14:19. Port /dev/ttyS0, 12:53:04 Press CTRL-A Z for help on special keys I expect to see "button state: 000000" something. But instead I see nothing. I've tried to relaunch, restart minicom, I've tried to reprogram the FPGA. I have also tried with Putty.
  14. In the following guide: https://reference.digilentinc.com/vivado/getting-started-with-ipi/start?_ga=2.157204989.738863100.1553677249-924004044.1549634437 At the bottom, it states: "The appropriate port to connect to can be determined by reviewing the Device Manager in Windows." I'm using Linux, how can I determine the port to connect to so I can view UART messages? What should I use to connect to it?
  15. Hi jpeyron, and thanks. That is exactly the tutorial I'm following. https://reference.digilentinc.com/learn/programmable-logic/tutorials/nexys-4-ddr-getting-started-with-microblaze/start?_ga=2.225019612.738863100.1553677249-924004044.1549634437 At step 23 I encountered this problem. I have attached a block diagram here: So I should use https://reference.digilentinc.com/vivado/getting-started-with-ipi/start?_ga=2.161408763.738863100.1553677249-924004044.1549634437 instead? I'm using Vivado v2018.3 (64-bit).
  16. This is what I should see: This is what I see: Why don't I have this tab?
  17. Nice! Thanks Dan. I will try to work through that. In general I was hoping to find an example repository of sorts for simple examples I could run and play around with. Vivado .xpr projects that I can just load up and program onto the device. That should be possible right? Or am I too naive? Still, thanks very much for the article.
  18. Thanks. Is that a link from your local disk? The URL starts with "localhost". Do you have the real link?
  19. Is there a simple VGA example suitable for the Digilent Nexys A7 that I could play around with? I suppose I should start with something simpler, but since the board has a VGA output port on it, it would be nice to just see some splash screen just for fun.
  20. I'm stoked. I finally have a working development environment, and the hardware manager recognizes my board. I'm following the tutorial Bianca provided: https://reference.digilentinc.com/vivado/getting_started/2018.2 This is my .xdc file (and a bunch of other commented out lines, but I omitted those): ## Clock signal set_property -dict { PACKAGE_PIN E3 IOSTANDARD LVCMOS33 } [get_ports { clk }]; #IO_L12P_T1_MRCC_35 Sch=clk100mhz create_clock -add -name sys_clk_pin -period 10.00 -waveform {0 5} [get_ports { clk }]; ## LEDs set_property -dict { PACKAGE_PIN H17 IOSTANDARD LVCMOS33 } [get_ports { led }]; #IO_L18P_T2_A24_15 Sch=led[0] However, it fails at "Run implementation". I've tried to Google this but it doesn't help me. I've attached a screenshot:
  21. I got it working on this machine now by restarting it!
  22. I've now tried on a different physical machine with the following Intel USB controller. I'm now also using xhci instead of ehci/ohci. 00:14.0 USB controller: Intel Corporation Device a2af Subsystem: ASUSTeK Computer Inc. Device 8694 Kernel driver in use: xhci_hcd Kernel modules: xhci_pci This is what lsusb shows: # lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120 Bus 001 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse Bus 001 Device 035: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub djtgcfg shows: # djtgcfg enum Found 1 device(s) Device: NexysA7 Product Name: Digilent Nexys A7 -100T User Name: NexysA7 Serial Number: 210292AA7671 # djtgcfg init -d NexysA7 Initializing scan chain... ERROR: failed to initialize scan chain I have Vivado installed, full install. I have cable drivers installed, sourced the settings file, I have utilities and Digilent runtime installed through .deb packages. This is on a fresh Debian 9.8 install. Nothing. Vivado shows "No device":
  23. I don't believe I have the same issue as this other person. He is able to initialize the scan chain with the init and -d argument to djtgcfg. I am not. I get: # djtgcfg init -d NexysA7 Initializing scan chain... ERROR: failed to initialize scan chain Moreover, this is not a virtual machine, the USB controller is real and not emulated. This machine has two NVIDIA MCP51 USB controllers. One controller is running on the ohci-pci kernel driver, the other on ehci-pci. Should I try to force the USB controllers to use xhci? If enforcing xhci drivers on the USB controllers is required to make Vivado work, it would probably be a good idea to inform the developers of this fact. I'm simply running a 100% stock Debian install on a non-VM computer. If this is indeed the issue I can imagine many others also experience the same but simply give up. This is far from easy. I am still stuck at "No device" in Vivado.