-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema for JSON hardware description #1474
Comments
Those programs are essentially "scratch my own itch" tools that we use in-house at M-Labs and QUARTIQ, and released as-is.
Can those read the schema? Maybe there could be schema entries that tell the machine how to handle each peripheral in the gateware and device DB. |
Thanks for the feedback.
I understand. I feel like they should nevertheless be made more user friendly. Even if not building gateware/firmware, the JSON files are really convenient to contain the full system description and generate the DDB from it (e.g. when changing Urukul clocking).
This starts to feel a lot like dataclasses or even something like pydantic and a OO-heavy design. The JSON schema could be generated from the Python (data)class definition for convenience. But this doesn't look like the general design choice of these tools. The JSON schema validators can extract default values from the schema. What to do with the data is written in the scripts. I'm mostly afraid that the schemas get quickly out of date because they're not really needed by |
As someone who read the source code when writing a custom EEM module (see https://github.com/drewrisinger/entangler-core/blob/v1.1.1/example/entangler_gateware_example.json), I think this area could use some improvement, and a schema like this would be a good example of standardization. However, as with much of ARTIQ, I think there's a fundamental user interest issue: many of the physicist users just want SOMETHING to work with ARTIQ & aren't interested/don't have the skills for investing to fix the pain points they encounter. And the engineers who have more of the background/inclination to fix these issues are stretched too thin to adequately address these issues (I know I am). |
@drewrisinger Do you have experience with JSON schemas and associated tooling? I see two problematic aspects:
|
@airwoodix no, I don't have much experience. The main reference I have for JSON schemas is lightly skimming through https://github.com/Qiskit/qiskit-terra/tree/master/qiskit/schemas.
|
|
done |
ARTIQ Feature Request
Problem this request addresses
The schema for the JSON hardware description files (e.g. Sinara systems) grows dynamically with new boards and additions to the artiq_ddb_template tool.
When writing such files, the only way (I'm aware of) to know which options are supported is to read the source code. This is not very user friendly, even considering that generating custom configurations is an advanced usage of the ARTIQ/Sinara ecosystem.
Describe the solution you'd like
A JSON schema for the hardware description files.
Quick attempt for DIO and Urukul (no ambition to be complete)
Additional context
Pros:
title
anddescription
properties);Cons:
frontend.artiq_ddb_template
,gateware.targets.kasli_generic
, and coredevice drivers documentation (the latter is the most problematic, a schema is essentially documentation for the former two);pll_n
andpll_vco
need to be defined, then constrained for the DDS chip variants, otherwise"additionalProperties": false
breaks the whole schema (see here). Rejecting additional properties is IMHO more important here.Also:
dict.get
calls e.g. inartiq_ddb_template
and document these defaults as well.The text was updated successfully, but these errors were encountered: