Install
#
Install RacketInstall racket:
On MacOS and Windows, you can download the installer from the Racket website, and setup the commandline properly.
#
Install BHDL packageStep 2: Install the BHDL directly as a racket package:
You can now run racket and require bhdl. The first time requiring bhdl, it will download footprint library to ~/.config/bhdl/bhdl-footprints
(Linux) or ~/Library/Application Support/bhdl/bhdl-footprints
(MacOS).
Then try some of the examples.
#
Update BHDLIn the future, you can update the package if there're updates upstream via:
TODO package name should be bhdl
#
JupyterLab IDEIn general, you can run racket programs via command line, editor plugins, IDEs. We are not covering them here. Instead, we recommand run the program via jupyter notebook. To set it up, first install jupyter:
The iracket kernel requires on libzeromq:
MacOS
On MacOS, it is a little trickier to setup libzmq. Specifically, you need to copy the library to the racket's library path, otherwise racket won't find it:
Then install the kernel itself:
note
iracket does not allow write access to file system by default. So you have to
modify the kernel file with a -t
parameter. In short, you need
to modify the content of ~/.local/share/jupyter/kernels/racket/kernel.json
on
your system from ["racket","-l","iracket/iracket","--","{connection_file}"]
to
["racket","-l","iracket/iracket","--","-t","{connection_file}"]
Then start the jupyterlab server:
You'll be able to create racket notebooks in the JupyterLab IDE. Inside the
notebook, try (require bhdl)
and some of the exampels.
#
Placement (Optional)To run the placement engine, you need setup julia. Refer to their installation guide on how to install Julia.
Install the BHDL julia package:
Then run the server:
This will listen on http://0.0.0.0:8082
. To use this, in racket, set the
parameter placer-url
, and call circuit-export
with #:auto-place #t
:
This package will detect if Nvidia GPU is available, and use it if possible. The first time invoking the package, julia will download and instantiate the dependencies and download CUDA (julia will not use your system's CUDA setup). The first time the placement is running, Julia will pre-compile the code, thus maybe a little slower. Subsequent placement request will be much faster (which is why we use a server instead of invoking the command for every placement request).
#
Freerouting (Optional)To use routing, you need to have
freerouting available. We tested
on
freerouting-v1.4.4. Make
sure freerouting-1.4.4-executable.jar
is available in your $PATH
.
The executable can be downloaded here on the new freerouting maintainer website: https://freerouting.mihosoft.eu/
UPDATE: the jar file is often not an executable command. You'll need
Thus, you need to create a executable called freerouting
, containing:
freerouting will need X11 window, even if we are running it in command line. Simulate the X11 session via:
But it seems to be impossible to view the progress. We'll probably need to use VNC if we really want to know what's going on.