A repository for version control of the CASB firmware, created by B. Harris and based on similar work by A. Nikola (QPIX) and N. Barros (CTB).
- CASB Control - Software for programming the CASB and communicating with the DAQ
- CASB Calibration - Storage and processing of CASB calibration test results
- Z-turn Board: MYS-7Z020-V2
- Built around Xilinx Zynq-7020 (XC7Z020) SoC
- Combines dual-core ARM Cortex-A9 processor (PS) with Xilinx 7-series FPGA fabric (PL)
- Chosen for its pin count, customizable logic capabilities, and reasonable price
-
Firmware Development: Vivado 2023.2
- Creates configurable logic for trigger determination
- Implements i2c bus and memory-mapped registers for channel masks
- Outputs:
.bitfile (programs the PL/FPGA).xsafile (contains hardware platform description)
-
Operating System: PetaLinux 2023.2
- Embedded Linux SDK for FPGA-based SoC designs
- Automatically generates device trees and bootloaders from Vivado outputs
- Outputs:
BOOT.bin(bootloaders + FPGA bitstream)boot.scr(U-Boot script)image.ub(Linux kernel + device tree)rootfs(root filesystem)
- Create a new branch from your experiment's main branch
- Modify the Vivado project
- Rebuild PetaLinux
- Deploy to Z-turn board
- Verify functionality
- Submit a pull request to the experiment's main branch
The repository maintains separate main branches for each experiment:
eos- Latest stable version for Eos experiment
IMPORTANT: Never push changes directly to these main experiment branches. If you do I will turn into Liam Neeson from Taken.
- Install Vivado (follow
tutorials/install-vivado.md) - Set up Vivado (follow
tutorials/setup-vivado.md) - Install PetaLinux (follow
tutorials/install-petalinux.md) - Set up PetaLinux (follow
tutorials/setup-petalinux.md)
- Clone this repository:
git clone git@github.com:hbjamin/casb-firmware.git- Checkout appropriate branch:
cd casb-firmware
git checkout <branch_name>- Open Vivado:
vivado_2023
cd firmware
vivado- Execute the project creation script:
source ./create_project.tcl-
Generate the bitstream
-
Export bitstream to
casb-firmware/petalinux/casb_tester/casb_tester.bit- Click
File→Export→Export Bitstream
- Click
-
Export hardware to
casb-firmware/petalinux/casb_tester/casb_tester.xsa- Click
File→Export→Export Hardware→Include bitstream
- Click
- Build PetaLinux (follow
tutorials/build-petalinux.md)
- To deploy on a new SD card: Follow 'tutorials/deploy-new-sd.md'
- To manually deploy on an already partitioned SD card: Follow
tutorials/deploy-manual.md - To remotely deploy on an already partitioned SD card: Follow
tutorials/deploy-remote.md
- Start from your experiment's main branch:
git checkout <experiment_name>- Create a new feature branch:
git checkout -b <experiment_name+change_implemented>-
Open
setup.tcland update the project name -
Build the Vivado project (see "Part 1" of "Building the Project" section)
-
Make your changes
-
Build the PetaLinux project (see "Part 2" of "Building the Project" section)
-
Deploy the firmware (see "Part 3" of "Building the Project" section)
-
Verify functionality
-
Update
Changelog.mdwith your changes -
Regenerate the board design:
- Open block design in Vivado
- Click
File→Export→Export Block Design - Export to
casb-firmware/firmware/src/bd
- Add board design (and constraints if modified) to git and commit:
git add casb-firmware/firmware/src/bd/casb.tcl
git add casb-firmware/firmware/src/constrs/top.xdc
git commit -m "Description of changes"- Verify you're on the correct branch:
git branch- Push changes:
git push --set-upstream origin <your_branch_name>- Submit a pull request through GitHub