Skip to content

Conversation

coolbreeze413
Copy link
Contributor

Add documentation on binary file generation in the FPGA toolchains sphinx docs.

Also removed the doc mentioning generation of <TOP>_jlink.h which I believe was previously used, but I see that this generation method is not being invoked anymore.

Copy link
Contributor

@kkumar23 kkumar23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coolbreeze413 : Since the PR on symbiflow is not yet merged, this will be on hold till next release package

@coolbreeze413
Copy link
Contributor Author

Now that the PRs for the Symbiflow changes are merged into respective repos, I think that this PR can be merged.
Please check if any further changes are needed.

@kkumar23
Copy link
Contributor

kkumar23 commented Dec 14, 2020 via email

@kkumar23
Copy link
Contributor

@coolbreeze413 : Please look into this so that i can publish the release today

@kkumar23 kkumar23 merged commit 8e0caa2 into master Dec 14, 2020
@coolbreeze413
Copy link
Contributor Author

coolbreeze413 commented Dec 14, 2020

As discussed, this is not a problem for us, because this is a change in the Symbiflow fasm project.
The change to optionally use antlr if available(as it is much faster), otherwise fall back to textx has been added recently with this commit:
chipsalliance/fasm@7fa746c

Without antlr installed, textx will be used, as it was being used previously, but it will also output a warning message as above to indicate that antlr is the preferred parser.

From the updated readme at https://github.com/SymbiFlow/fasm, I have tried to setup antlr in the local machine(inside the conda env) with the following steps:
Ensure conda activate is executed before these steps:

git clone https://github.com/SymbiFlow/fasm.git
cd fasm

run test to check antlr (same as what happens in our build)

python3 -c "import fasm.parser as p; print(p.available)"

output:

fasm/fasm/parser/__init__.py:27: RuntimeWarning: 
Falling back on slower textX parser implementation:
  ImportError: cannot import name 'tags' from 'fasm.parser' (/home/coolbreeze413/work/quicklogic/symbiflow/db_14_DEC_2020/quicklogic-arch-defs/tests/counter_16bit/fasm/fasm/parser/__init__.py)
Please install all dependencies and reinstall with:
  pip uninstall
  pip install -v fasm
  '  pip install -v fasm'.format(e), RuntimeWarning)
['textx']

Install antlr

git submodule update --init
sudo apt install cmake default-jre-headless uuid-dev libantlr4-runtime-dev
make build
python setup.py test

Run test to check antlr again:

python3 -c "import fasm.parser as p; print(p.available)"

Output seen this time:

['antlr', 'textx']

Now we clean and build our test case:

ql_symbiflow -compile -d ql-eos-s3 -P pd64 -v counter_16bit.v -t top -p chandalar.pcf

We don't see any warning, as antlr is now installed and available.

Now, we need to further check how to integrate this into our installation flow and conda env for setup.

@tpagarani Could you take a look at this as well, we can plan for this task in the next release.

@mkurc-ant
We currently have the Symbiflow fasm as a requirement for the quicklogic-fasm repo, which is expressed in the requirements.txt as -e git://github.com/symbiflow/fasm.git#egg=fasm.
Can you suggest a good way to incorporate the above manual installation of antlr which seems to require a submodule of the fasm plus build steps?
Should we just add those steps as part of our toolchain installation flow perhaps?

@coolbreeze413 coolbreeze413 deleted the fpga-bootloading-changes-phase-1 branch December 14, 2020 21:06
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

Successfully merging this pull request may close these issues.

2 participants