chipsalliance / f4pga-examples

Example designs showing different ways to use F4PGA toolchains.
https://f4pga-examples.readthedocs.io
Apache License 2.0
263 stars 77 forks source link

Missing sudo: Errors while installing Toolchain for Artix-7 Devices #45

Closed SSandeep19 closed 4 years ago

SSandeep19 commented 4 years ago

Hi i am new to Linux and working on to generate bitstream file for a Verilog file using Symbiflow for a Artix-7 FPGA. I successfully installed Conda in tool chain installation and moved to second part of tool chain installation for Artix-7 and i got errors as shown in the screenshot. fri_01

tcal-x commented 4 years ago

It looks like there was a problem with the wget command that is the first step. It looks like you have captured stdout in your conda_installer.sh file, not the contents itself. If you look at the file, you should see this:

$ head conda_installer.sh 
#!/bin/sh
#
# NAME:  Miniconda3
# VER:   py38_4.8.3
# PLAT:  linux-64
# LINES: 570
# MD5:   728a5c953844917b24246080968d03b8

export OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
unset LD_LIBRARY_PATH

Try rerunning the wget, making sure that your cut-and-paste doesn't change characters.

SSandeep19 commented 4 years ago

yes you are right and now i can see the file as you mentioned but there is still an error which is different from the previous errors. fri_02

tcal-x commented 4 years ago

Yes, that is a mistake in the instructions. It should be:

sudo bash conda_installer.sh -b -p $INSTALL_DIR/conda && rm conda_installer.sh

The difference is the sudo, which gives you root permission for the duration of the following command.

This assumes that you have sudo permission on your machine. You may be asked for your password or root's password.

SSandeep19 commented 4 years ago

giving sudo worked . I believe you are saying to use the wget command you have given immediately after the sudo command because if i follow the instructions it is throwing errors. can you please confirm. fri_03

tcal-x commented 4 years ago

I'm sorry I added sudo to the wrong instruction (which also needs sudo). Let me edit the previous comment so that I don't confuse other readers.

This 'file not found' is another problem with the README. It asks you to use a file that isn't there yet. You don't have that file until you do the git clone.

So please go ahead with the git clone part of the instructions:

git clone https://github.com/SymbiFlow/symbiflow-examples && cd symbiflow-examples

And then continue with

conda env create -f examples/xc7/environment.yml
<etc>

Of course, skip the git clone when you get to that part of the instructions, since you've already done it.

tcal-x commented 4 years ago

@SSandeep19 , I've tried to fix the README problems here:

https://github.com/tcal-x/symbiflow-examples/tree/doc

After I double-check my changes, I'll submit a PR to this repo.

GitHub
tcal-x/symbiflow-examples
Examples designs for showing different ways to use SymbiFlow toolchains. - tcal-x/symbiflow-examples
SSandeep19 commented 4 years ago

Hi tcal-x,

i am facing an error while executing a command (pushd litex/litex/boards/targets && ./arty.py --toolchain symbiflow --cpu-type vexriscv --build && popd) almost at the end, attaching the screenshot and i don't know if it changes something. I also would like to know few things

  1. What boards of Artix-7 are supported i have Digilent NEXYS A7 will it be supported or should i change some architecture files.
  2. If it supports will i be able to generate bitstream with my own constrains file and is there any documentation i can refer to
  3. It will be helpful for me to know how to run Yosys,VPR and FPGA assembler individually and entire toolchain with my own eblif files or FASAM files, is this possible with the current setup final_mon ? and will be greatly helpful if you can point me in the right direction
tcal-x commented 4 years ago
GitHub
SymbiFlow/symbiflow-examples
Examples designs for showing different ways to use SymbiFlow toolchains. - SymbiFlow/symbiflow-examples
tcal-x commented 4 years ago

P.S. you don't need to put ALL the pins in the master XDC file in your PCF file -- just the ones the design uses.

litghost commented 4 years ago

In general, sudo shouldn't be required for using anything from https://github.com/SymbiFlow/symbiflow-examples, as everything should be installed into user local folders. Which commands/steps are believed to require sudo?

GitHub
SymbiFlow/symbiflow-examples
Examples designs for showing different ways to use SymbiFlow toolchains. - SymbiFlow/symbiflow-examples
litghost commented 4 years ago

If I had to guess, the fact that:

INSTALL_DIR="/opt/symbiflow/xc7"

is part of /opt is the issue. Rather than putting the install to /opt it probably just belongs in the users home folder by default, like:

INSTALL_DIR="~/symbiflow/xc7"

and then the sudo stuff can be dropped. If the user wants to install into a folder off of root, then they can handle the permissions independent of the instructions.

litghost commented 4 years ago

@SSandeep19 The instructions have been updated such that the sudo shouldn't be required! We believe this issue is fixed, so I'm going to close this issue. If you find you still have an issue, let us know!