Skip to content

gen_edge3: support "flattening" blocks

Tom Levens requested to merge (removed):edge3_include_submaps into master

Currently the following structure:

memory-map:
  name: top
  children:
    - reg:
        name: reg1
    - reg:
        name: reg2
    - block:
        name: block1
        children:
          - reg:
              name: reg3
          - reg:
              name: reg4

Would generate the following EDGE CSV blocks by default:

block_def_name    type,   name, ...
           top,    REG,   reg1, ...
           top,    REG,   reg2, ...
           top, block1, block1, ...

block_def_name,   type,   name, ...
        block1,    REG,   reg3, ...
        block1,    REG,   reg4, ...

With this MR, adding the x-driver-edge attribute include: True on block1 includes its registers in the parent with the names prefixed with the block name, like:

block_def_name,     type,        name, ...
           top,      REG,        reg1, ...
           top,      REG,        reg2, ...
           top,      REG, block1_reg3, ...
           top,      REG, block1_reg4, ...

It is also be possible to add the x-driver-edge attribute block-prefix: False on block1 to remove these prefixes:

block_def_name,     type, name, ...
           top,      REG, reg1, ...
           top,      REG, reg2, ...
           top,      REG, reg3, ...
           top,      REG, reg4, ...

But unless care is taken this may lead to duplicate register names. This is not (currently) checked as I assume EDGE will complain in this case.

Closes #121 (closed).

Edited by Tom Levens

Merge request reports