Skip to content

addressing and alignment properties of addressmap not being followed #85

Description

@tenaliram

I want the following structure:

  1. Base address map at 0x0
  2. Child map1 at address 0x100
  3. Child map2 at address 0x200

Either of the following schemes will work for me:

  1. Base -> Child map1 -> Child map2
  • In this case child map1 is external address map for base
  • Child map2 is external address map for child map1
  1. Ring structure with base as root and child map1 and map2 declared as external ring

I tried the following:
Method1:
addrmap base {
...
external child_map1 child_map1@0x100;
}

addrmap child_map1 {
...
external child map2 child_map2 @0x100;
}

Method 2:
addrmap base {
...
regfile {
child_map1 child_map1 @0x100;
child_map2 child_map2 @0x200;
} external (RING32) ring_regs;
}

In method 1, the tool generates address for child 1 as: 0x200 instead of 0x100

In method 2, the tool generates the ring starting from 0x400 instead of 0x100

Thus, in either of the cases I am unable to get the addressing I want.

I tried using the following attributes (independently and together):
addressing = compact
alignment = 4

But then I get the following message (method 1):
*** WARNING ***: assignment of property addressing will be ignored in addrmap base_map near line 16
*** WARNING ***: property addressing not implemented
*** WARNING ***: assignment of property alignment will be ignored in addrmap base_map near line 16
*** WARNING ***: property alignment not implemented

I also get a warning that alignment for child map 1 is being shifted to 0x200

Questions:

  1. Why are the addressing and alignment properties not being followed
  2. How do I get the desired addressing?

Thanks in advance for the help.

Activity

  1. sdnellen commented on Sep 3, 2020

    @sdnellen
    Contributor

    ordt enforces a strict alignment for external regions to simplify the decoder and maintain address consistency with certain generated output types. Basically the tool computes the next pow2 size of each external address region and then enforces alignment of the region base address on this size. The tool doesn't support the addressing/alignment properties - early on, added some options to support less restrictive addressing, but it added considerable complexity and just never needed it, so didn't make the cut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions