Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: TerosHDL and Python virtual environments #660

Open
mkaiser opened this issue Sep 17, 2024 · 3 comments
Open

Q: TerosHDL and Python virtual environments #660

mkaiser opened this issue Sep 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@mkaiser
Copy link

mkaiser commented Sep 17, 2024

Hi,

I have a rather special use case for running TerosHDL and having trouble setting up the toolchain:

image

As you can see, I am using the SSH feature to connect to a remote server for development and can't simply start VSCode on my Notebook with a customized virtual environment (therefore the use-cases I found on the docs / github do not match :/ ).

Is there any way to "tell" TerosHDL to use a specific Python venv?

I tried this, having success in finding vunit, cocolib and edalize, but for example, I cannot properly set the installation path for GHDL:

image

image

Starting a TB results in:
image

Additional info:

content of "setup_teros_venv.sh" >>

TEROS_DIR="hw/TerosHDL"
PY_CMD=$(which python3)
TEROS_VENV_DIR="${TEROS_DIR}/venv"

$PY_CMD -m venv $TEROS_VENV_DIR && source $TEROS_VENV_DIR/bin/activate && pip install -r $TEROS_DIR/requirements.txt

echo -e "\nConfigure Teros: Click on the Teros icon on the left --> General --> Open Configuration Menu"
echo "For Python3 binary path add the path to the venv folder, e.g.," 
echo -e "$TEROS_VENV_DIR/bin/python3" 


content of "requirements.txt" >>

vunit
edalize 
cocotb 
teroshdl
vsg
yowasp-yosys
ghdl

@mkaiser mkaiser added the bug Something isn't working label Sep 17, 2024
@qarlosalberto
Copy link
Contributor

Maybe I don't understand it good. Are you installing GHDL with pip?

@mkaiser
Copy link
Author

mkaiser commented Sep 17, 2024

Yes, I did install IT with pip. Was this bad idea?

I have no sudo permissions on the synthesis machine, so installing there is tedious administrative stuff. I hope this could be done somehow via pyvenv

@qarlosalberto
Copy link
Contributor

qarlosalberto commented Sep 17, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants