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

Connectal Support for open source bsc compiler #157

Closed
rajat-agarwal- opened this issue Feb 20, 2020 · 10 comments
Closed

Connectal Support for open source bsc compiler #157

rajat-agarwal- opened this issue Feb 20, 2020 · 10 comments

Comments

@rajat-agarwal-
Copy link

I tried using connectal with open-source version of Bluespec and it fails.
There seems to be some outdated switches in connectal and include locations in regards to open sourced version.
Attached are the error logs.

Kindly help.
log_V.txt
log.txt

@jameyhicks
Copy link
Member

I have not been able to build it so I have not tested it yet. I will pull from the repo and try again.

Thank you for sharing the log files, these are helpful.

@hanw
Copy link
Member

hanw commented Feb 21, 2020

I tried to build echo for bluesim. The opensource version seems to miss some Xilinx libraries in Prelude. For instance, the XilinxCells.bo file cannot be found.

@hanw
Copy link
Member

hanw commented Feb 22, 2020

This is resolved with the release of contrib library

@hanw hanw closed this as completed Feb 22, 2020
@rajat-agarwal-
Copy link
Author

rajat-agarwal- commented Feb 23, 2020

I am still getting the following error if i try to build echo for bluesim.
make[1]: *** No rule to make target 'obj/Vector.bo', needed by 'obj/XsimTop.bo'. Stop.

I think i am missing some variable or my paths are not pointing to correct location. Can you please help??

@hanw hanw reopened this Feb 23, 2020
@hanw
Copy link
Member

hanw commented Feb 23, 2020

You can use V=1 make build.bluesim to print the commands used by connectal to compile your module. Current problem is the licensed bsc release and open-source bsc release install the library file to different paths. In the licensed bsc, all library files are installed under Prelude, in open-source bsc, the library files are under Libraries and the contrib library files are under their own directory. We need to update connectal to source from all these places.

@hanw
Copy link
Member

hanw commented Feb 23, 2020

Search for Prelude in connectal repo, these two python files need fix. scripts/packagesource.py, scripts/bsvdependencies.py Can you perhaps make a PR?

jameyhicks added a commit that referenced this issue Mar 3, 2020
Problem: open source bsc does not accept license related flags

Solution: check bsc usage message for support of the flag

Fixes one part of issue #157
jameyhicks added a commit that referenced this issue Mar 3, 2020
Open source bsc keeps core libraries in "Libraries" instead of
"Prelude", so look in both places.

This commit still assumes BLUESPECDIR is points to the bsc installation.

This commit fixes a second part of issue #157.
@jameyhicks
Copy link
Member

bsc-contrib has XilinxCells but the hierarchy has changed, so one more fix needed.

@jameyhicks
Copy link
Member

I was able to build and run examples/simple for verilator using open source bsc and bsc-contrib.
I compiled the BSV to Verilog for VC707 (build.vc707g2) and I'm compiling the verilog to a bitstream now.

This depends on bsc and bsc-contrib being installed into the same prefix:
cd bsc; make PREFIX=~/Bluespec install
cd bsc-contrib; make PREFIX=~/Bluespec install
export BLUESPECDIR=~/Bluespec/lib
cd connectal/examples/simple; make build.verilator run.verilator

We can make another change so that if bsc is on the path but BLUESPECDIR is not that the scripts would detect where the libraries are by running which bsc.

@acw1251
Copy link
Contributor

acw1251 commented Mar 3, 2020

Just using which bsc will not work if bsc is a sym link. Instead you can use the technique mentioned in B-Lang-org/bsc#33 to get the library folder for open-sourced bsc. Running the command echo 'puts $env(BLUESPECDIR)' | bluetcl in the shell will get you the internal value of BLUESPECDIR used in bluetcl. This command works with licensed bsc as well.

One more thing, since bsc-contrib is separate from bsc now, would it make sense to add bsc-contrib as a submodule to connectal?

@jameyhicks
Copy link
Member

I was planning to dereference any symlinks. But why use a symlink rather than adjusting PATH?

I'm working on making bsc and bsc-contrib .debs.

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

4 participants