chore: add Quartus Prime Lite toolchain via nix flake in devbox

This commit is contained in:
randogoth 2026-10-25 12:09:42 +02:00
parent d34f4c69e1
commit 3ee8a5c3db
5 changed files with 54 additions and 2 deletions

1
.gitignore vendored
View file

@ -5,6 +5,7 @@ fpga/**/output_files/
fpga/**/simulation/
*.qws
*.qsf.bak
*_assignment_defaults.qdf
*.qarlog
*.rpt
*.summary

View file

@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.17.2/.schema/devbox.schema.json",
"packages": ["arduino-cli@latest"],
"packages": ["arduino-cli@latest", "path:./nix#quartus"],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
@ -13,6 +13,9 @@
],
"build": [
"arduino-cli compile --fqbn arduino:samd:mkrvidor4000 arduino/strix"
],
"fpga": [
"cd fpga/src && quartus_sh --flow compile strix"
]
}
}

View file

@ -42,7 +42,7 @@ set_global_assignment -name DEVICE 10CL016YU256C8G
set_global_assignment -name TOP_LEVEL_ENTITY strix
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 23.1STD.1
set_global_assignment -name PROJECT_CREATION_TIME_DATE "18:01:00 JULY 21, 2024"
set_global_assignment -name LAST_QUARTUS_VERSION "23.1std.1 Lite Edition"
set_global_assignment -name LAST_QUARTUS_VERSION "25.1std.0 Lite Edition"
set_global_assignment -name PROJECT_OUTPUT_DIRECTORY output_files
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85

27
nix/flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1792773339,
"narHash": "sha256-rZLrzrC6i+jnTAlvPZHogKDulY7WWDEv9hJeHieO7Zw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3ec636362e1816bc2f0888fa0fa2c69f1bc9e504",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

21
nix/flake.nix Normal file
View file

@ -0,0 +1,21 @@
{
description = "STRIX FPGA toolchain";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { nixpkgs, ... }:
let
# Quartus is unfree (free of charge, proprietary) and only built for x86_64-linux.
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
in
{
# Only the Vidor's FPGA family; Questa is dropped in favour of open-source simulators.
packages.x86_64-linux.quartus = pkgs.quartus-prime-lite.override {
supportedDevices = [ "Cyclone 10 LP" ];
withQuesta = false;
};
};
}