// Code generated by https://github.com/gocomply/xsd2go; DO NOT EDIT. // Models for https://datafortress.dev/xml/central-arch-specification package spec import ( "encoding/xml" ) // Element type Specification struct { XMLName xml.Name `xml:"specification"` Exceptions ExceptionList `xml:"exceptions"` Formats FormatList `xml:"formats"` Instructions InstructionList `xml:"instructions"` } // XSD ComplexType declarations // SpecificationType: Central Architecture CPU XML Specification file. type SpecificationType struct { XMLName xml.Name Exceptions ExceptionList `xml:"exceptions"` Formats FormatList `xml:"formats"` Instructions InstructionList `xml:"instructions"` } // FormatList: Supported instruction encoding formats. type FormatList struct { XMLName xml.Name Format []Format `xml:",any"` } // InstructionList: Supported instructions. type InstructionList struct { XMLName xml.Name Instruction []Instruction `xml:",any"` } // ExceptionList: Supported exceptions. type ExceptionList struct { XMLName xml.Name Exception []Exception `xml:",any"` } // DocText: Documentation text. type DocText struct { XMLName xml.Name Ref []RefText `xml:"ref"` Todo []TodoText `xml:"todo"` InnerXml string `xml:",innerxml"` } // RefText: A reference to an element. type RefText struct { XMLName xml.Name // Type: Reference type. Used to set a specific styling to the reference text. Can also generate a link to a reference in the documentation. Type string `xml:"type,attr"` Text string `xml:",chardata"` } // TodoText: A TODO annotation. type TodoText struct { XMLName xml.Name Text string `xml:",chardata"` } // Exception: The specification of an exception. type Exception struct { XMLName xml.Name // Id: The unique identifier of this exception. Id string `xml:"id,attr"` // DisplayName: The name of the exception that will be displayed in the documentation. DisplayName string `xml:"display-name"` // Brief: A brief description of this exception. Brief DocText `xml:"brief"` // Details: Details about this exception. Used to give info about where the exception handler PSW is stored and what are the info given to it by the system. Details DocText `xml:"details"` } // Format: The specification of an instruction encoding format. type Format struct { XMLName xml.Name // Id: The unique identifier of an instruction encoding format. Id string `xml:"id,attr"` // DisplayName: The name of the instruction encoding format as it will be displayed in the documentation. DisplayName string `xml:"display-name"` Description DocText `xml:"description"` Fields FormatFieldList `xml:"fields"` } // FormatFieldList: The fields used in this instruction encoding format. type FormatFieldList struct { XMLName xml.Name Field []FormatField `xml:",any"` } // FormatField: Description of a field in this instruction encoding format. type FormatField struct { XMLName xml.Name // Bits: Field length, in bits. Bits int64 `xml:"bits,attr"` Type FormatFieldType `xml:"type,attr"` // Name: Field name. Ignored for opcode and condition fields. Name string `xml:"name,attr,omitempty"` } // Instruction: The specification of an instruction. type Instruction struct { XMLName xml.Name // Id: The unique identifier of this instruction. Id string `xml:"id,attr"` // Opcode: The opcode of this instruction. Opcode uint8 `xml:"opcode,attr"` // Format: The encoding format of the instruction. Format string `xml:"format,attr"` // DisplayName: The name of the instruction as it will be displayed in the documentation. DisplayName string `xml:"display-name"` // Description: The description of this instruction. Description DocText `xml:"description"` Syntax Syntax `xml:"syntax"` Examples ExampleList `xml:"examples"` Bindings BindingList `xml:"bindings"` Operation Operation `xml:"operation"` Exceptions InstructionExceptionList `xml:"exceptions"` } // Syntax: The assembler syntax of the instruction. type Syntax struct { XMLName xml.Name Mnemonic Mnemonic `xml:",any"` } // MnemonicArgRegister: A register passed as an argument of the instruction. type MnemonicArgRegister struct { XMLName xml.Name Binding BindingName `xml:"binding,attr"` Ref []RefText `xml:"ref"` Todo []TodoText `xml:"todo"` } // MnemonicArgImmediate: An immediate value passed as an argument of the instruction. type MnemonicArgImmediate struct { XMLName xml.Name Ref BindingName `xml:"ref,attr"` RefElm []RefText `xml:"ref"` Todo []TodoText `xml:"todo"` } // MnemonicArgGroup: A group of both registers and immediate values passed as arguments of the instruction. type MnemonicArgGroup struct { XMLName xml.Name Register []MnemonicArgRegister `xml:"register"` Immediate []MnemonicArgImmediate `xml:"immediate"` } // ExampleList: Instruction syntax examples. type ExampleList struct { XMLName xml.Name Example []Example `xml:",any"` } // Example: An example of the instruction syntax. type Example struct { XMLName xml.Name Code Code `xml:"code"` Comment CodeComment `xml:"comment"` } // CodeComment: Comment about the assembly code of the example. type CodeComment struct { XMLName xml.Name Ref []RefText `xml:"ref"` Todo []TodoText `xml:"todo"` } // BindingList: Value bindings to instruction fields. type BindingList struct { XMLName xml.Name Binding []Binding `xml:",any"` } // Binding: A value binding to an instruction field. type Binding struct { XMLName xml.Name Name BindingName `xml:"name,attr"` // Field: Reference to the instruction field to bind the value to. Field string `xml:"field,attr"` // Aligned: Optional immediate value alignement, must be a power of 2. Dictates how the value is encoded: an alignment of 2 means that the value is bitshifted right by one bit, an alignment of 4 means that it is bitshifted right by two bits, etc... Defaults to 1, i.e. no bitshifting is involved. Aligned uint64 `xml:"aligned,attr"` // MinusOne: Specifies whether the value is "-1 encoded". As an example, if an 8-bits value is -1 encoded then it means that one can use values in the range 1..256 and it will be encoded in the range 0..255. Defaults to false. MinusOne bool `xml:"minus-one,attr"` // Signed: Indicate whether the immediate value is signed. Defaults to false. Signed bool `xml:"signed,attr"` } // InstructionExceptionList: The exceptions that can be generated during execution of this instruction. type InstructionExceptionList struct { XMLName xml.Name Exception []InstructionException `xml:",any"` } // InstructionException: An exception that can be generated during the execution of this instruction. type InstructionException struct { XMLName xml.Name // Ref: The unique identifier of the exception. Ref string `xml:"ref,attr"` RefElm []RefText `xml:"ref"` Todo []TodoText `xml:"todo"` } // XSD SimpleType declarations // FormatFieldType: Field type. type FormatFieldType string const FormatFieldTypeOpcode FormatFieldType = "opcode" const FormatFieldTypeRegister FormatFieldType = "register" const FormatFieldTypeRegisterSrc FormatFieldType = "register.src" const FormatFieldTypeRegisterDest FormatFieldType = "register.dest" const FormatFieldTypeRegisterOffset FormatFieldType = "register.offset" const FormatFieldTypeImmediate FormatFieldType = "immediate" const FormatFieldTypeImmediateOffset FormatFieldType = "immediate.offset" const FormatFieldTypeCondition FormatFieldType = "condition" const FormatFieldTypeFlag FormatFieldType = "flag" const FormatFieldTypeUnused FormatFieldType = "unused" // Mnemonic: Instruction mnemonic. type Mnemonic string // Code: Single-line assembly code of the example. type Code string // BindingName: The name of the value binding. type BindingName string // Operation: Instruction microcoded operation. type Operation string