OneWare.Quartus is a plugin/extension for OneWare Studio, an open-source IDE for FPGA/embedded development. This extension adds support for the Intel/Altera Quartus toolchain, enabling compilation and programming (download) of designs for Altera FPGAs from inside OneWare Studio.
The extension integrates with OneWare's UniversalFpgaProjectSystem by registering a toolchain (compile flow) and a loader (device programming flow), plus UI extensions and settings.
- Language: C# (
net10.0, nullable enabled, implicit usings enabled) - UI: Avalonia (XAML
.axamlviews + MVVM view models), compiled bindings enabled - DI:
Microsoft.Extensions.DependencyInjectionvia OneWare's module system - Tests: xUnit (
Microsoft.NET.Test.Sdk) - Plugin model:
EnableDynamicLoading— built as a dynamically loaded plugin assembly
OneWare.Essentials— services (ILogger,ISettingsService,IWindowService,IChildProcessService,IEnvironmentService,IOutputService,IMainDockService), helpers (PlatformHelper), enums, base classes.OneWare.UniversalFpgaProjectSystem—UniversalFpgaProjectRoot,FpgaModel,FpgaService,IFpgaToolchain,IFpgaLoader,FpgaSettingsParser.
Both are referenced with Private="false" and ExcludeAssets="runtime;Native" because the host IDE supplies them at runtime. Never copy these assemblies into the output or bump them carelessly — version compatibility with the host is tracked in oneware-extension.json (minStudioVersion).
src/OneWare.Quartus/
QuartusModule.cs # Plugin entry point: registers services, toolchain, loader, UI extensions, settings
QuartusToolchain.cs # IFpgaToolchain: writes .qsf, runs compile flow
QuartusLoader.cs # IFpgaLoader: programs the device (short-/long-term, quartus_pgm / quartus_cpf)
Services/
QuartusService.cs # Runs `quartus_sh --flow compile`, streams output to OutputService
Helper/ # .qsf (Quartus Settings File) parsing/manipulation + settings control adapters
QsfFile.cs, QsfHelper.cs, IQsfSetting.cs, QsfSettingComboBox.cs, QsfSettingSlider.cs
ViewModels/ # Avalonia MVVM view models (settings + toolbar window extensions)
Views/ # Avalonia .axaml views + code-behind
Assets/ # Icons (AvaloniaResource)
tests/OneWare.Quartus.UnitTests/
OneWareQuartusTests.cs # xUnit tests
oneware-extension.json # Extension manifest: versions + minStudioVersion mapping
Always use the .NET CLI from the repo root.
# Restore (may require workloads for Avalonia)
dotnet workload restore
dotnet restore
# Build
dotnet build
# Run tests
dotnet test
# Build the publishable plugin (Release) — mirrors CI publish
dotnet build src/OneWare.Quartus/OneWare.Quartus.csproj -c Release -o publish- CI (
.github/workflows/test.yml) runs restore → build → test on every push/PR tomain. - CI (
.github/workflows/publish.yml) builds Release on release/workflow_dispatch, zips thepublishfolder and attachescompatibility.txt. - The
GenerateCompatibilityFileMSBuild target emitscompatibility.txtlisting host-provided package versions — used by OneWare to validate compatibility. Keep it intact.
Note: there is no host IDE in this repo, so the plugin cannot be "run" standalone here. Validate changes via
dotnet buildanddotnet test. Manual integration testing requires loading the built plugin into OneWare Studio with Quartus installed.
- Module init (
QuartusModule.Initialize): registersQuartusToolchainandQuartusLoaderonFpgaService, registers UI extensions by name (CompileWindow_TopRightExtension,UniversalFpgaToolBar_DownloaderConfigurationExtension), and registers aQuartus_Pathsettings entry under Tools. On valid path it exportsQuartus_Bin/Quartus_Bin64toIEnvironmentServiceso thequartus_*executables are on PATH. - Compile (
QuartusToolchain.CompileAsync→QuartusService): updates the project.qsf(family, device, top-level entity, included files), then runsquartus_sh --flow compile <top>. - Program (
QuartusLoader.DownloadAsync): locates.sof/.pofin the output dir, supports short-term (volatile) and long-term programming, optionally converting viaquartus_cpf, then runsquartus_pgm. .qsfhandling: all Quartus Settings File reading/writing goes throughHelper/QsfHelper+QsfFile. Reuse these helpers rather than parsing.qsfmanually.- Per-FPGA settings keys (read via
FpgaSettingsParser.LoadSettings): e.g.quartusToolchainFamily,quartusToolchainDevice,quartusProgrammerShortTermMode/Operation/Arguments,quartusProgrammerLongTermFormat/Mode/Operation/Arguments/CpfArguments.
- C# style: nullable reference types enabled; use primary constructors for services/toolchains/loaders (see
QuartusToolchain,QuartusLoader,QuartusService); resolve dependencies via constructor injection, not the service locator, except where the existing module code usesserviceProvider.Resolve<T>()/ContainerLocator. - Logging & errors: wrap external/IO operations in try/catch and log via
ILogger(logger.Error(...),logger.Warning(...)). Compile/program failures should be reported, not thrown to the UI. - External tools: invoke Quartus binaries (
quartus_sh,quartus_pgm,quartus_cpf) throughIChildProcessService.ExecuteShellAsync. Never hardcode absolute tool paths — rely on the PATH entries set fromQuartus_Path. - MVVM: view models go in
ViewModels/, derive from OneWare base view-model classes; views are.axaml+ code-behind inViews/. Keep logic in view models. - Cross-platform: use
PlatformHelper.PlatformandPlatformHelper.ExecutableExtensionfor platform-specific paths/executables (Windows + Linux x64/Arm64 are supported).
- Bump
<Version>insrc/OneWare.Quartus/OneWare.Quartus.csproj. - Add a matching entry to
oneware-extension.jsonversions[]with the correctminStudioVersion. - Publish runs off a GitHub release tag (version comes from the csproj).
- ✅ Reuse
QsfHelper/QsfFilefor any.qsfaccess. - ✅ Add unit tests in
tests/OneWare.Quartus.UnitTestsand validate withdotnet test. - ✅ Keep host packages (
OneWare.Essentials,OneWare.UniversalFpgaProjectSystem) asPrivate="false". - ❌ Don't bundle host-provided assemblies or change their copy/runtime behavior.
- ❌ Don't hardcode Quartus install paths or assume a single OS.
- ❌ Don't edit generated artifacts (
bin/,obj/,compatibility.txt).