Taichi Ishitani Posted February 9 Report Share Posted February 9 Hi, I'm developing CSR generation tool named RgGen and planing to IP-XACT generation. https://github.com/rggen/rggen I'm wondering how to interpret RgGen's CSR description into IP-XACT. RgGen supports the indirect register type of which accessibility is controlled by other bit fields. Eexample: register { name 'register_11' offset_address 0x50 size [2, 4] type [:indirect, 'register_0.bit_field_0', 'register_0.bit_field_1', ['register_0.bit_field_2', 0]] # bit assignments: [ 7:0] [23:16] [39:32] [55:48] bit_field { name 'bit_field_0'; bit_assignment lsb: 0, width: 8, sequence_size: 4, step: 16; type :rw; initial_value 0 } # bit assignments: [15:8] [31:24] [47:40] [63:56] bit_field { name 'bit_field_1'; bit_assignment lsb: 8, width: 8, sequence_size: 4, step: 16; type :rw; initial_value 0 } } The register_11 register is an array register and its array size is 2 x 4. A sub-element of this register is selected by bit fields 'register_0.bit_field_0' and 'register_0.bit_field_1'. In addition, the 'register_11' can be accessed only when the bit field 'regiter_0.bit_field_2' is 0. For this case, do I need to use the 'mode' element and 'alternateRegister' element to interpret this kind of regiter? Regards, Taichi Ishitani Quote Link to comment Share on other sites More sharing options...
kock Posted February 9 Report Share Posted February 9 Hi Taichi, Yes, in the latest IP-XACT version 1685-2022, you can use the mode element with sub-element condition and then you can reference that mode in an alternateRegister element. Indirect registers with indirect addressing are described with an indirectInterface. Best regards, Erwin Quote Link to comment Share on other sites More sharing options...
Taichi Ishitani Posted February 9 Author Report Share Posted February 9 Hi Erwin-san, Thank you for your feedback! From this description, I think only one bit field can be specified as the index field. So I'm wondering whthier or not an indirect interface can be used for an indirect register which has multiple index fields. For the above example, the 'regiter_11' register uses 'register_0.bit_field_0' and 'register_0.bit_field_1' bit fields as its index fields. Regards, Taichi Ishitani Quote Link to comment Share on other sites More sharing options...
kock Posted February 12 Report Share Posted February 12 Hello Taichi, Indeed, within one indirectInterface element one bit field can be specified. It is possible to describe multiple indirectInterface elements. Best regards, Erwin Quote Link to comment Share on other sites More sharing options...
Taichi Ishitani Posted February 14 Author Report Share Posted February 14 Erwin, thank you for your comment. I understand that the indirectinterface element is not suitable for the above exmaple. I will consider another interpretation. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.