On ubuntu, hit ctrl+alt+t to open terminal. Type:
$ cd ~/Desktop $ git clone https://github.com/Ailss/pnr.git $ cd ./pnr/src
Make the place and route tool:
$ make
Generate the bitstream:
first, coppy and.bliff from wherever you built it (Desktop/yosys-1/and.bliff, probably)
put a copy of and.bliff in the pnr/src directory
$ ./pnr.elf and.blif 2>and.bits $ gedit and.bits
at the top of the file, you will see debugging information. The important part is the bitstream, so delete the debugging info. make sure there is no newline at the end or top of the file after modifying it. The info will tell you which outputs and input pins will actually be used, though. So, it may be important to look over
In our case, the outpus will show up in the LSB's of the output pins. (output pins 0 and 1, since logic cells 0 and 1 are used.) The inputs will come from the LSB's on the input (index 0,1,2,3)