The Directory Structure¶
<BoxLambda Root Directory>
├── boxlambda_setup.sh
├── activate_env.sh
├── CMakeLists.txt
├── scripts/
│ └── <build system scripts>
├── registers/
│ ├── definitions/
│ │ └── <Corsair .yaml format register map definitions>
│ ├── generated/
│ │ └── <generated register map header files>
│ └── generators/
│ └── <register map code generator templates>
├── docs/
│ └── <documentation>
├── sub/
│ └── <git submodules>
├── fs/ <target filesystem>
│ ├── forth/
│ │ └── <forth modules>
│ └── test/
│ └── <test files>
├── gw/
│ ├── CMakeLists.txt
│ ├── ip/
│ │ ├── dfx_controller/
│ │ │ ├── dfx_controller_0.xci
│ │ │ └── <other DFX Controller IP files>
│ │ └── <other Vivado IP>
│ ├── components/
│ │ ├── CMakeLists.txt
│ │ ├── wbuart32/
│ │ │ ├── rtl/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── lint.vlt
│ │ │ └── Bender.yml
│ │ ├── <other gw component directories>
│ │ ├── test/
│ │ │ └── <test gateware components>
│ │ └── archived/
│ │ └── <archived/unmaintained gateware components>
│ └── projects/
│ ├── CMakeLists.txt
│ ├── boxlambda_base/
│ │ ├── constr/
│ │ ├── rtl/
│ │ ├── sim/
│ │ ├── CMakeLists.txt
│ │ ├── lint.vlt
│ │ └── Bender.yml
│ ├── boxlambda_dfx/
│ │ ├── constr/
│ │ ├── sim/
│ │ ├── CMakeLists.txt
│ │ └── Bender.yml
│ └── test/
│ ├── ddr_test/
│ │ ├── sim/
│ │ ├── CMakeLists.txt
│ │ └── Bender.yml
│ └── archived/
│ └── <archived/unmaintained gateware components>
├── sw/
│ ├── CMakeLists.txt
│ ├── components/
│ │ ├── CMakeLists.txt
│ │ ├── <sw component directories>
│ │ ├── test/
│ │ │ └── <test sw component directories>
│ │ └── archived/
│ │ └── <archived/unmaintained sw components>
│ └── projects/
│ ├── CMakeLists.txt
│ ├── ddr_test/
│ │ ├── CMakeLists.txt
│ │ └── <ddr_test sources>
│ ├── <other sw project directories>
│ ├── test/
│ │ └── <test sw project directories>
│ └── archived/
│ └── <archived/unmaintained sw projects>
├── tools/
│ └── <3rd party tools used by build system>
└── build/
├── sim-a7-100/
│ └─── codegen/
│ └── <code-generated files>
└── arty-a7-100/
└─── codegen/
└── <code-generated files>
Note that the software tree (sw/) is separate from the gateware tree (gw/), and the build trees (build/) are distinct from both the software and gateware source trees.
The Build Trees¶
The build trees are CMake build trees generated by the boxlambda_setup.sh script. This script creates the following build trees:
sim-a7-100: Arty-A7-100T simulation build tree.arty-a7-100: Arty-A7-100T FPGA build tree.
The boxlambda_setup.sh script also populates the tools/ directory. It contains third-party tools used by the build system, such as Bender, the RISCV compiler, and OSS CAD Suite.
Important: The build and tools directories are not tracked under version control.
Make All, Cgen, and Regen¶
In the sim-a7-100 build tree, make all will lint check and build all \*_sim targets.
In the arty-a7-100 build tree, make all will build boxlambda_base_bit, boxlambda_dfx_bit, vs0_stub_bit, and vs0_j1b_bit.
Make cgen in a build tree will run all code generation rules in that build tree. The register map, the ibex code base, LiteDRAM, and early bootstrap code rely on code generation. Make cgen must be run whenever there are changes in those parts of the system.
If you want to return to a clean build tree, type make regen from the build directory. This command will:
- Remove and regenerate the build tree.
- Execute the code generation rules (
make cgen).