Re: [PATCH v3] eng: Add register block specification types
On 15.05.23 02:13, Chris Johns wrote: Sorry about the delay, I have been out sick for the last week or so. I am ok with this to be pushed. I have a minor correction below and a clean up if you want. Thanks for the review. I checked it in with the correction. -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: sebastian.hu...@embedded-brains.de phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/ ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH v3] eng: Add register block specification types
Hi, Sorry about the delay, I have been out sick for the last week or so. I am ok with this to be pushed. I have a minor correction below and a clean up if you want. On 5/5/2023 6:50 pm, Sebastian Huber wrote: > A register block may be used to specify the interface of devices which > contain registers associated with an integer address. Register blocks > consist of register block members specified by the ``definition`` > attribute. Register block members are either instances of registers > specified by the ``registers`` attribute or instances of other register > blocks specified by links with the "register-block-include" link role. > Registers consists of bit fields. The register block members are placed > into the address space of the device relative to the base address of the > register block. Register member offests and the register block size are > specified in units of the address space granule. > > Update #3715. > --- > For examples see: > > https://git.rtems.org/rtems-central/tree/spec/dev/grlib/if > > v2: > > Clarify wording and remove the "register-block-type" attribute. > > v3: > > Do not mention a linear address space. > > eng/req/items.rst | 338 ++ > 1 file changed, 338 insertions(+) > > diff --git a/eng/req/items.rst b/eng/req/items.rst > index 783800f..59e3d30 100644 > --- a/eng/req/items.rst > +++ b/eng/req/items.rst > @@ -99,6 +99,8 @@ The specification item types have the following hierarchy: > > * :ref:`SpecTypeInterfaceVariableItemType` > > +* :ref:`SpecTypeRegisterBlockItemType` > + >* :ref:`SpecTypeProxyItemTypes` > >* :ref:`SpecTypeRequirementItemType` > @@ -1159,6 +1161,8 @@ This type is refined by the following types: > > * :ref:`SpecTypeInterfaceVariableItemType` > > +* :ref:`SpecTypeRegisterBlockItemType` > + > .. _SpecTypeApplicationConfigurationGroupItemType: > > Application Configuration Group Item Type > @@ -1619,6 +1623,65 @@ depend on configuration options. For example, in one > configuration a constant > could be a compile time constant and in another configuration it could be a > read-only object. > > +.. _SpecTypeRegisterBlockItemType: > + > +Register Block Item Type > + > + > +This type refines the :ref:`SpecTypeInterfaceItemType` through the > +``interface-type`` attribute if the value is ``register-block``. This set of > +attributes specifies a register block. A register block may be used to > specify > +the interface of devices. Register blocks consist of register block members > +specified by the ``definition`` attribute. Register block members are either > +instances of registers specified by the ``registers`` attribute or instances > of > +other register blocks specified by links with the > +:ref:`SpecTypeRegisterBlockIncludeRole`. Registers consists of bit fields > (see > +:ref:`SpecTypeRegisterBitsDefinition`. The register block members are placed > +into the address space of the device relative to the base address of the > +register block. Register member offests and the register block size are offests -> offsets > +specified in units of the address space granule. The address space granule > is > +usually 8-bits also known as one byte. Does "usually" mean using right or usually wrong? I am fine if the reference to 8-bits is removed. Chris > All explicit attributes shall be > +specified. The explicit attributes for this type are: > + > +brief > +The attribute value shall be an :ref:`SpecTypeInterfaceBriefDescription`. > + > +definition > +The attribute value shall be a list. Each list element shall be a > +:ref:`SpecTypeRegisterBlockMemberDefinitionDirective`. > + > +description > +The attribute value shall be an :ref:`SpecTypeInterfaceDescription`. > + > +identifier > +The attribute value shall be an :ref:`SpecTypeInterfaceGroupIdentifier`. > + > +name > +The attribute value shall be a string. It shall be the name of the > register > +block. > + > +notes > +The attribute value shall be an :ref:`SpecTypeInterfaceNotes`. > + > +register-block-group > +The attribute value shall be a string. It shall be the name of the > +interface group defined for the register block. For the group identifier > +see the ``identifier`` attribute. > + > +register-block-size > +The attribute value shall be an :ref:`SpecTypeOptionalInteger`. If the > +value is present, then it shall be the size of the register block in > units > +of the address space granule. > + > +register-prefix > +The attribute value shall be an optional string. If the value is present, > +then it will be used to prefix register bit field names, otherwise the > +value of the ``name`` attribute will be used. > + > +registers > +The attribute value shall be a list. Each list element shall be a > +:ref:`SpecTypeRegisterDefinition`. > + > .. _SpecTypeRequirementItemType: > > Requirement Item Type > @@
[PATCH v3] eng: Add register block specification types
A register block may be used to specify the interface of devices which contain registers associated with an integer address. Register blocks consist of register block members specified by the ``definition`` attribute. Register block members are either instances of registers specified by the ``registers`` attribute or instances of other register blocks specified by links with the "register-block-include" link role. Registers consists of bit fields. The register block members are placed into the address space of the device relative to the base address of the register block. Register member offests and the register block size are specified in units of the address space granule. Update #3715. --- For examples see: https://git.rtems.org/rtems-central/tree/spec/dev/grlib/if v2: Clarify wording and remove the "register-block-type" attribute. v3: Do not mention a linear address space. eng/req/items.rst | 338 ++ 1 file changed, 338 insertions(+) diff --git a/eng/req/items.rst b/eng/req/items.rst index 783800f..59e3d30 100644 --- a/eng/req/items.rst +++ b/eng/req/items.rst @@ -99,6 +99,8 @@ The specification item types have the following hierarchy: * :ref:`SpecTypeInterfaceVariableItemType` +* :ref:`SpecTypeRegisterBlockItemType` + * :ref:`SpecTypeProxyItemTypes` * :ref:`SpecTypeRequirementItemType` @@ -1159,6 +1161,8 @@ This type is refined by the following types: * :ref:`SpecTypeInterfaceVariableItemType` +* :ref:`SpecTypeRegisterBlockItemType` + .. _SpecTypeApplicationConfigurationGroupItemType: Application Configuration Group Item Type @@ -1619,6 +1623,65 @@ depend on configuration options. For example, in one configuration a constant could be a compile time constant and in another configuration it could be a read-only object. +.. _SpecTypeRegisterBlockItemType: + +Register Block Item Type + + +This type refines the :ref:`SpecTypeInterfaceItemType` through the +``interface-type`` attribute if the value is ``register-block``. This set of +attributes specifies a register block. A register block may be used to specify +the interface of devices. Register blocks consist of register block members +specified by the ``definition`` attribute. Register block members are either +instances of registers specified by the ``registers`` attribute or instances of +other register blocks specified by links with the +:ref:`SpecTypeRegisterBlockIncludeRole`. Registers consists of bit fields (see +:ref:`SpecTypeRegisterBitsDefinition`. The register block members are placed +into the address space of the device relative to the base address of the +register block. Register member offests and the register block size are +specified in units of the address space granule. The address space granule is +usually 8-bits also known as one byte. All explicit attributes shall be +specified. The explicit attributes for this type are: + +brief +The attribute value shall be an :ref:`SpecTypeInterfaceBriefDescription`. + +definition +The attribute value shall be a list. Each list element shall be a +:ref:`SpecTypeRegisterBlockMemberDefinitionDirective`. + +description +The attribute value shall be an :ref:`SpecTypeInterfaceDescription`. + +identifier +The attribute value shall be an :ref:`SpecTypeInterfaceGroupIdentifier`. + +name +The attribute value shall be a string. It shall be the name of the register +block. + +notes +The attribute value shall be an :ref:`SpecTypeInterfaceNotes`. + +register-block-group +The attribute value shall be a string. It shall be the name of the +interface group defined for the register block. For the group identifier +see the ``identifier`` attribute. + +register-block-size +The attribute value shall be an :ref:`SpecTypeOptionalInteger`. If the +value is present, then it shall be the size of the register block in units +of the address space granule. + +register-prefix +The attribute value shall be an optional string. If the value is present, +then it will be used to prefix register bit field names, otherwise the +value of the ``name`` attribute will be used. + +registers +The attribute value shall be a list. Each list element shall be a +:ref:`SpecTypeRegisterDefinition`. + .. _SpecTypeRequirementItemType: Requirement Item Type @@ -3919,6 +3982,12 @@ This type is used by the following types: * :ref:`SpecTypeInterfaceVariableItemType` +* :ref:`SpecTypeRegisterBitsDefinition` + +* :ref:`SpecTypeRegisterBlockItemType` + +* :ref:`SpecTypeRegisterDefinition` + .. _SpecTypeInterfaceCompoundDefinitionKind: Interface Compound Definition Kind @@ -4174,6 +4243,12 @@ This type is used by the following types: * :ref:`SpecTypeInterfaceVariableItemType` +* :ref:`SpecTypeRegisterBitsDefinition` + +* :ref:`SpecTypeRegisterBlockItemType` + +* :ref:`SpecTypeRegisterDefinition` + .. _SpecTypeInterfaceEnabledByExpression: