Skip to content

DerivedFrom for peripheral with ability to change individual registers' parameters #2426

@MaxFlatline

Description

@MaxFlatline

Describe The Problem To Be Solved
Currently i have found no way of deriving one instance of periphery from other, with ability to change resetValue of one of the registers.

(Optional): Suggest A Solution

    <!-- PER0 -->
    <peripheral">
        <name>PER0</name>
        <baseAddress>0x0000</baseAddress>
        <registers>
          <register>
            <name>REG0</name>
            <description>Register 0</description>
            <addressOffset>0x00000008</addressOffset>
            <resetValue>0x00000000</resetValue>
          </register>
        </registers>
      </peripheral>

    <!-- PER1 -->
    <peripheral derivedFrom="PER0">
        <name>PER1</name>
        <baseAddress>0x1000</baseAddress>
        <registers>
          <register derivedFrom="PER0.REG0 ">
            <name>REG0</name>
            <resetValue>0x80000000</resetValue>
          </register>
        </registers>
      </peripheral>

I'd like to have a way of doing something like that, if it's possible. Of cource i can derive all registers inividially but i'm afraid that with will cause two types - PER0_Type and PER1_Type to appear instead of PER_Type.
Thank you!

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions