feat(fpga): add support for the new FabricFox devkit

* TT FPGA tool, prelim import
* config.ini manager, prelim
* bitstream uploads and FPGA config.ini management

Contributed by @psychogenic, with minor edits by @htfab
This commit is contained in:
Pat Deegan
2026-02-12 06:27:29 +01:00
committed by GitHub
parent b4a9e6c7ea
commit 89ad9bfa93
10 changed files with 705 additions and 103 deletions
+2 -37
View File
@@ -1,11 +1,11 @@
#!/usr/bin/env python3
import argparse
import logging
import sys
from project import Project
from project_checks import check_project_docs
from tech import TechName
from tt_logging import setup_logging
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="TT setup")
@@ -143,41 +143,9 @@ if __name__ == "__main__":
const=True,
)
# FPGA
parser.add_argument(
"--create-fpga-bitstream",
help="create the FPGA bitstream",
action="store_const",
const=True,
)
parser.add_argument(
"--fpga-breakout-target",
help="Select target breakout: classic (TT04) or fabricfox (TT06+)",
choices=["classic", "fabricfox"],
default="classic",
)
parser.add_argument(
"--fpga-bitstream-name",
help="Set the bitstream name",
default="",
)
args = parser.parse_args()
# setup log
log_format = logging.Formatter(
"%(asctime)s - %(module)-10s - %(levelname)-8s - %(message)s"
)
# configure the client logging
log = logging.getLogger("")
# has to be set to debug as is the root logger
log.setLevel(args.loglevel)
# create console handler and set level to info
ch = logging.StreamHandler(sys.stdout)
# create formatter for console
ch.setFormatter(log_format)
log.addHandler(ch)
setup_logging(args.loglevel)
pdk: TechName = "ihp-sg13g2" if args.ihp else "gf180mcuD" if args.gf else "sky130A"
@@ -228,6 +196,3 @@ if __name__ == "__main__":
if args.create_svg:
project.create_svg()
if args.create_fpga_bitstream:
project.create_fpga_bitstream(args)