Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Block configuration proposal (for discussion) #3

@jsturdy

Description

@jsturdy

Quick summary

  • This issue is really cross-repo (depending on V2/V3 electronics, but the implementation will be the same in the end, modulo address differences and register differences)
  • It is also backwards incompatible, significantly moreso than the recent address table only changes
  • A healthy discussion and pro/con of various implementations needs to be done in order to fleshed out
    the best solution

State of the art

Currently, there are some registers that will make a total block type configuration impossible

  • A simple implementation (tested for read) would be to do (in uhal syntax), e.g.,
<node id=GEB.VFATS  address=0xwhatever>
  <node id=BLOCK  address=0x0  mode="block" size=24*N VFAT rw regs permissions="rw"/>
  <node id=VFAT0 address=0x0>
    <node id=REG1 address=0x0 permissions="rw"/>
---
    <node id=VFATChannels address=0xchanoff permissions="rw"/>
      <node id=BLOCK  address=0x0  mode="block" size=24*N VFAT rw regs permissions="rw"/>
    </node> <!-- ends VFATChannels section -->
...
</node> <!-- closes GEB.VFATS node -->
  • One can further move the BLOCK node (or add multiple appropriately named and placed nodes) inside the VFATX node, as the top node, do block read/write settings for just that VFAT
  • However, due to the current organization as above, this will make the BLOCK node fail
  • The GEB.VFATS.VFATX node contains both rw and r type registers
  • The non-optimal solution is to add BLOCKS of the correct size in each of the rw permission registers, excluding the r only registers
  • Better would be to move the r only registers to their own block and separate the rw into a different address space, but this requires a redesign of the firmware, which should definitely be done for both V2b and V3
  • On VFAT2 there are also the "extended registers" and the "extended register pointer" which is how one accesses most of the VFAT registers, and they are currently part of the address table and probably should be removed from the user accessible address space

Proposal for improved implementation

In the "most optimal" way, I would do something like:

<node id=GEB.VFATS  address=0xwhatever>
  <node id=STATUS  address=0x0  description="Contains all readonly VFAT registers">
    <node id=VFAT0 address=0x0>
      <node id=ChipID0 address=0x0 mode="r"/>
---
    </node> <!-- ends VFAT0 readonly node -->
...
    <node id=VFAT23 address=0xvfat23off>
      <node id=ChipID0 address=0x0 mode="r"/>
---
    </node> <!-- ends VFAT23 readonly node -->
  </node>
  <node id=CONFIGURATION  address=0xconfoff>
    <node id=BLOCK  address=0x0  mode="block"  size=24*N VFAT rw regs  permissions="rw"/>
    <node id=VFAT0 address=0x0>
      <node id=BLOCK  address=0x0  mode="block"  size=N VFAT rw regs  permissions="rw"/>
      <node id=REG1 address=0x0 permissions="rw"/>
---
      <node id=VFATChannels address=0xchanoff permissions="rw"/>
        <node id=BLOCK  address=0x0  mode="block" size=24*N VFAT rw regs permissions="rw"/>
      </node> <!-- ends VFATChannels section -->
---
    </node> <!-- closes VFAT0 node -->
...
    <node id=VFAT23 address=0xvfat23off>
      <node id=BLOCK  address=0x0  mode="block" size=N VFAT rw regs permissions="rw"/>
      <node id=REG1 address=0x0 permissions="rw"/>
---
      <node id=VFATChannels address=0xchanoff permissions="rw"/>
        <node id=BLOCK  address=0x0  mode="block" size=24*N VFAT rw regs permissions="rw"/>
      </node> <!-- ends VFATChannels section -->
---
    </node> <!-- closes VFAT23 node -->
  </node> <!-- closes CONFIGURATION node -->
</node> <!-- closes GEB.VFATS node -->

Caveats

Done in this way, the firmware is still responsible for doing the remote register access correctly (e.g., using the extended register and pointer invisibly from the user), but it would be possible to do a block configuration of all VFATS with one transaction, and also of all configurable registers on a single VFAT, if desired (in the case that maybe it is not possible to write to a given VFAT, as I'm not sure what the behaviour is in this case), or even just the VFATChannels node (but only for a given VFAT in this case, and moving this to a new place would need to be yet another discussion)

Anecdotal information

I tested a block read of all the VFAT channel registers (block write was failing, possibly due to ipbus implementation on the CTP7 as the transaction reply did not match the IPBus expectation) and it worked splendidly.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions