Closed KoviRobi closed 4 years ago
I don't know what is causing this.
You need vivado 2019.2 with a license for the vcu9p FPGA synthesis and implementation.
An easy way to get these tools is to launch an AWS FPGA Developer AMI instance. That AMI is based on centos.
lib
directory but has been updated for the layout of libraries in the opensource bsc.Connectal could use which bsc
to determine BLUESPECDIR if it's not set.
Seems like the AWS FPGA Developer AMI only has GHC version 7.6 (and for some reason, it doesn't like installing the Nix package manager) so getting bluespec might be a bit difficult. I wonder if can I do the bluespec/bluesim parts on my machine, and the synthesis parts on the FPGA Developer AMI?
And it's Centos, which I find to be a pain. I had success copying vivado into a similarly configured Ubuntu 18.04 instance. I imagine you could do the same with other Linux distros.
Don't know if that will break any licenses (either break as in stop the software working, or as in legally I shouldn't do that). But we do have a lab machine that has Vivado set up (though not yet with the right license to do the encryption).
Is that a no on the being able to do the bluespec stuff on a separate machine to the synthesis stuff?
The software works but I did not ask if it was OK. I figure I'm complying with the spirit of the license: I only run it on AWS instances and only to develop for AWS FPGAs.
However, it's actually not hard to split those steps:
1) at the point where it attempts to run vivado for synthesis and implementation, all the necessary files are in awsf1/build
.
You should be able to copy that and the cd awsf1/build/scripts; ./build.sh
I changed some AWS scripts this week, btw.
If this makes sense, we could add a Makefile target to make this easier, or add a remote synthesis option that uses rsync and ssh (or other appropriate mechanism). It might be handy to have it start the instance, run the build, and then shut it down again, at least as an option.
That's great to hear the steps could be split! In the meanwhile I might be having success with installing Nix on CentOS so that I can get the FPGA Developer AMI to have Bluespec.
But still, splitting the steps will allow me to develop/simulate on my laptop, and only be billed for the synthesis time :) (Though I'm still just starting with the FPGA stuff so not 100% sure on how the workflow goes)
Solution that got me Nix installed on CentOS: https://github.com/NixOS/nix/issues/2632#issuecomment-481701310
For simulation, I recommend build.verilator, though it depends on what you'd like to do with AWS.
BSV compile time is short compared to synthesis and implementation for AWS.
Simulation of the AWS CL and SH requires Xilinx xsim or other commercial verilog simulators, which works but requires more manual steps.
Got the problem with 1. (the $(BOARD) not being defined) down:
https://github.com/cambridgehackers/connectal/blob/3f1bf0518b3bac3fa8acb414f3e253d001c829b2/Makefile.connectal#L206
forces the evaluation of the deferred variable $(PCIEGEN)
, defined at
https://github.com/cambridgehackers/connectal/blob/3f1bf0518b3bac3fa8acb414f3e253d001c829b2/Makefile.connectal#L178
which requires $(BOARD)
to be defined, but that is only defined at https://github.com/cambridgehackers/connectal/blob/3f1bf0518b3bac3fa8acb414f3e253d001c829b2/Makefile.connectal#L41-L45 after the gen.%
target/rule is evaluated, whereas make processes conditional directives before rules.
I'm puzzled why you are getting this, because I've been running make build.awsf1
over and over again the past couple of weeks. Is the behavior the same with make gen.awsf1
?
Yes, though it's just one line in the top of the Makefile, it still continues on fine. Now that I have figured out why I am getting that, I wonder why you aren't getting it, are you using the same Makefile.connectal as in the master branch here? Note, I'm using GNU Make 4.2.1
GNU Make 4.1.
But this is just a simple thing, make gen.awsf1 BOARD=awsf1
solves this problem.
A bigger thing I'm having is make[1]: *** No rule to make target 'obj/XilinxCells.bo', needed by 'obj/SyncAxisFifo32x8.bo'. Stop.
. I couldn't find XilinxCells.* in either $BLUESPECDIR or connectal repo
XilinxCells.bsv is in bsc-contrib
If we clean up the split build, then Travis could run awsf1 builds.
Right, I have I think got to the point where I have done all that is needed on my local machine :)
I.e. when it tries to run connectal/scripts/aws/build.sh
https://gist.github.com/bc9b3c13971584c14a2b543c1bf1eaa5
Also, I have 'packaged' bsc-contrib as a BlueSpec library for NixOS (inverted commas are there because it's not an upstreamed first class package yet). I think Nix could function as the BlueSpec package manager, but obviously I quite like Nix (Nix doesn't require NixOS, nor specifically Linux :) ).
Thanks for your help, I can confirm I have managed to synthesise and deploy the examples/echo
program, so closing. Here is a summary of the steps I did, but no doubt it can be simplified further and will do that tomorrow:
sh <(curl https://nixos.org/nix/install) --no-daemon
nix-shell shell.nix
where shell.nix
contains https://gist.github.com/KoviRobi/1381abdfce8e87139e4d04cfef3d76be (this sets up the bluespec tools)cd connectal/examples/echo
make build.awsf1
, this will fail before synthesisconnectal/examples/echo/awsf1/build/src_post_encryption/
to real files (this is kind of due to Nix, but I will patch the encrypt.tcl
file and pull request)Developr
sectionsource ~/aws-fpga/hdk_setup.sh
, export CONNECTALDIR=~/connectal
and export CL_DIR=~/connectal/examples/echo/awsf1
~/aws-fpga/hdk/common/shell_stable/build/scripts/aws_build_dcp_from_cl.sh
~/connectal/examples/echo/awsf1/build/checkpoints/to_aws/*.Developer.tar
to s3 and create an FPGA image per https://github.com/aws/aws-fpga/tree/master/hdk as usual.
Hi,
I'm fairly new to the FPGA development stuff, I'm just tying to play around with AWS F1, so I have done
the output of the make is in https://gist.github.com/KoviRobi/8316a68ee10dc7e3b22b0298ab6d9339 but let me highlight a couple of lines
grep: /home/rmk35/programming/bluespec/connectal/boardinfo/.json: No such file or directory
, perhaps a bug in Makefile.connectal, or I'm doing something wrong? There is anboardinfo/awsf1.json
make[1]: *** No rule to make target 'obj/Vector.bo', needed by 'obj/AwsF1Top.bo'. Stop.
I guess it's looking for theVector.bo
shipped with bluespec, which with the bluespec installed with the Nix package manager is/nix/store/2vxm66aq8f580x90z6nwc4iglm3ahijh-bluespec-unstable-2020.02.09/lib/Libraries/Vector.bo
in this instance, but this path (specifically the hash in/nix/store/<hash>-<name>
) will change with different versions of bsc so should definitely not be hardcoded.