Build with ATOM/APIO - how are build files selected?


#1

I’ve just started learning about the TinyFPGA BX and the Atom/Apio toolchain.

The “blink_project” demo builds fine, but I’m really confused about how the build configuration is set up. When you build the project, you get these two build commands:

yosys -p “synth_ice40 -blif hardware.blif” -q top.v
arachne-pnr -d 8k -P cm81 -p pins.pcf -o hardware.asc -q hardware.blif

But, it is not clear how the tools know which files to include (top.v) or which device configuration file (pins.pcf) as there does not seem to be any kind of build configuration or make file associated with the project. Possibly file hardware.asc is related?

Can anyone explain how the Atom/Apio toolchain decides what files to process?


#2

It is defined by the Sconstruct build file - see https://github.com/FPGAwars/apio/blob/master/apio/resources/SConstruct

You can put a custom version of SConstruct in your project directory and it is used instead of the default one.

No, that file is the input to the icepack utility which produces the hardware.bin bitstream.