Skip to content

Spec File Format Overview

Mark Polyakov edited this page Apr 27, 2017 · 1 revision

Note: You will probably be able to figure all this stuff out by just looking around in the spec/ folder for a while. Go there if you get confused reading this.

Another Note: Although the create spec tools are nice, it is good to know this stuff in case you need to edit some of the created files without regenerating them.

Types of files

  • Parts: Single parts, for example RX 480 or R7 1700X.
  • Containers: Something which contains other containers or parts. For example, RX 400 or Ryzen
  • Hidden: A file which doesn't actually represent anything seen in the UI, it is simply a file which contains data which is common to multiple parts. For example, there is a GCN 4 hidden file which has information common to all GCN 4 GPUs, such as the 14nm lithography and Vulkan support.

File Location

  • Parts: Should go in the folder of the most specific container. So, RX-480.yaml should go in the RX-400 folder.
  • Containers: Should have containerName.yaml and a folder containerName, which contains things in the container. containerName.yaml should go outside of the folder. Everything should go within the folder of the most specific container, if there is one.
  • Hidden: Should go somewhere where all parts it affects are underneath it. For example, if you are writing something which will be inherited by only RX 400 series GPUs, put it in the RX-400 folder. If it will affect many GPUs throughout different architectures and series, put it in the AMD-GPUs folder.

Look at the specs/ folder for yourself to get a better idea of this stuff

The Actual Files

All spec files are yaml. It's a very simple format, you should learn it if you don't already know it (although it is possible you'll be able to make do without it if you use the auto part creation tools).

Basic stuff

All files will need a name yaml property. For parts and containers, it should be "URL-safe", so it should have only alphanumeric characters and hyphens. For hiddens, it can be whatever. They may also have an inherits property, which is an array of hidden files to inherit from. Inheritance is covered later on.

Containers and Parts will also need a humanName property, which is like name except it can have special characters and spaces in it. This is what is actually displayed to the user. Additionally an isPart property is needed. It should be true if it is a part, and false if it is a container. They will also need a type property, which represents what type of thing they are and is used to generate the "subtext" which is displayed under the part names. Here are valid types:

  • CPU Architecture
  • Graphics Architecture
  • CPU
  • Graphics Card

Yes, I know Graphics Architecture should really not say that, because it is actually a series, which can have multiple architectures in it, but that's not the point for now. Just deal with it.

Container stuff

Containers should have a topHeader property which is the bold thing displayed at the top of the right panel, for example SELECT CARD:. It should be all caps and end in a colon.

They should also have a sections part, which is where all the juicy stuff happens. It should be an array of objects, and each object should have a header and members property. header should be the light text displayed to mark sub-sections, and members should be an array of names of parts or containers in this subsection. Example:

sections:
  - header: ENTHUSIAST
    members:
      - R9-295X2
  - header: HIGH END
    members:
      - R9-290X-8GiB
      - R9-290X-4GiB
      - R9-290

Data

The actual data/specs for stuff is all stored inside the data object. The data you should include varies depending on the type of file you're creating. You should look at similar files in the spec/ folder to see what you'll want to include. Certain properties are required in order to generate subtext successfully.

Inheritance

All data properties on a hidden file are applied to parts and containers which have that hidden file's name listed in their inherits property. Hidden files can also inherit other hidden files.