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

Not possible to call wrapper scripts by passing the file name #538

Open
carlosedp opened this issue Sep 21, 2021 · 1 comment
Open

Not possible to call wrapper scripts by passing the file name #538

carlosedp opened this issue Sep 21, 2021 · 1 comment

Comments

@carlosedp
Copy link

The way the wrapper scripts are, it's not possible to call the scripts without setting an environment variable as the Toplevel name that ends generating the output binary and header.

The ideal way would be able to pass it as an argument and use the env var as a fallback in case no argument is present. This way it's much easy to integrate the pipeline with tools like FuseSoc and Edalize.

The scripts are mainly:
https://github.com/QuickLogic-Corp/symbiflow-arch-defs/blob/quicklogic-upstream-rebase/quicklogic/common/toolchain_wrappers/symbiflow_write_binary
https://github.com/QuickLogic-Corp/symbiflow-arch-defs/blob/quicklogic-upstream-rebase/quicklogic/common/toolchain_wrappers/symbiflow_write_bitheader

@carlosedp
Copy link
Author

I believe something like:

#!/bin/bash
set -e

MYPATH=$(dirname "$(readlink -f "$BASH_SOURCE")")
TOPLEVEL="${1:-$TOP_F}"

source ${MYPATH}/env

BIT2BINARY=`readlink -f ${MYPATH}/../bin/python/bitstream_to_binary.py`

python3 ${BIT2BINARY} ${TOPLEVEL}.bit ${TOPLEVEL}.bin

Would work.

@carlosedp carlosedp changed the title Not possible to call the wrapper by passing the file name Not possible to call wrapper scripts by passing the file name Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant