Advertisement
Guest User

How to use Yosys as a library

a guest
May 2nd, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. ## Using Yosys as a library
  2.  
  3. First you need to build Yosys with lib support. Go into the Yosys top level `Makefile` and set the build flag `ENABLE_LIBYOSYS := 1`
  4.  
  5. Then, build Yosys as usual.
  6.  
  7. After this is done there should be a `libyosys.so` build artifact. This needs to made available to the C++ compiler/linker. The easiest way to do this is to copy it to `/usr/local/lib/libyosys.so`.
  8.  
  9. Next, the header files need to be made available for inclusion in your code. To achieve this, symlink the `yosys/share/include/kernel` folder into your `/usr/local/include` e.g. `cd /usr/local/include/` and then `sudo ln -s <YOSYS_DIR>/share/include/kernel` where `<YOSYS_DIR>` should be replaced by the location of your Yosys tree.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement