Jump to content

joaohf

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by joaohf

  1. I want to use SystemRDL to define some registers for a peripheral I2C device. I tried the following spec: regfile eTACHS { name = "TACH registers"; reg { name = "Read tach"; field { desc = "Checksum-byte 0xFF means not ready"; } CHECK[7:0] = 0; field { desc = "All 16bits should be 0x0000"; } ZEROS[15:8] = 0; field { desc = "Value with the RPM"; } TACH[24:16] = 0; field { desc = "Rest of the buffer is discarded"; } RESERVED[31:25] = 0; } READ_TACH0 @ 0x0a; reg { name = "Read tach"; field { desc = "Checksum-byte 0xFF means not ready"; } CHECK[7:0] = 0; field { desc = "All 16bits should be 0x0000"; } ZEROS[15:8] = 0; field { desc = "Value with the RPM"; } TACH[24:16] = 0; field { desc = "Rest of the buffer is discarded"; } RESERVED[31:25] = 0; } READ_TACH1 @ 0x0b; }; addrmap fan { name = "FAN registers"; eTACHS TACHS; }; The data size for each I2C command is 32 bits. The above rdl when I tried to `dump` it, I got the following result: peakrdl dump fan_i2c.rdl fan_i2c.rdl:36:7: error: Instance 'READ_TACH1' at offset +0xB:0xE overlaps with 'READ_TACH0' at offset +0xA:0xD } READ_TACH1 @ 0x0b; ^^^^^^^^^^ fatal: Elaborate aborted due to previous errors My I2C peripheral device is a set of commands like: READ_TACH0 = 0x0a READ_TACH1 = 0x0b .... The are many commands like that. With SystemRDL, would it be possible to define a RDL for I2C slave register map ? Maybe some way to avoid overlaps errors ? Well, I could find a RDL example for I2C specification. Thanks
×
×
  • Create New...