ankit jain Posted July 17, 2019 Report Posted July 17, 2019 Hi, I wanted to know use case of alternate register. Scenario 1(DYNAMIC) : lets take an example, for capturing metadata of a register.The field(1) in register represents data whose context changes when another field (2)is having another data. So in this case h/w changes field (2) data dynamically, changing context of field (1) data. Does alternate register is used in this case? Can multiple "alternate group names" tag be used while instantiating module registers. Scenario 2(STATIC) : According to my understanding, alternate register is used for capturing registers according to mode in which module is to be instantiated i.e. only 1 register definition to be selected from multiple alternate registers while instantiating module registers using single "alternate group name" tag. What is the use case of alternate registers.(Scenario 1 or 2) Thanks Quote
Richard Weber Posted July 17, 2019 Report Posted July 17, 2019 Hello Ankit, The active alternate register in the component implementation is selected by an alternateGroup. An alternateGroup is considered actively selecting an alternateRegisters due to an unspecified combination of port values, register values, memory values, or other component internal state values which can change value while the component implementation is running. An alternateGroup does not change the component implementation. Both scenarios you mention could be supported by the IP-XACT alternateRegister feature. Some examples: 1. The alternateGroup activation combination includes a component port value which can be tied to a constant in the component instantiation. 2. The alternateGroup activation combination includes a field value. Quote
ankit jain Posted July 18, 2019 Author Report Posted July 18, 2019 Thanks Richard for quick reply, can you share some insights on the example below considering SEL_AB as field 2, DTA and DTB as field1. Q2) Also if one doesn't want to use alternate register, what field naming convention to use as IPXACT doesn't allow usage of "/" character? ex in field name, DTA/DTB with which character to replace "/"? <spirit:component xmlns:spirit="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009 http://www.spiritconsortium.org/XMLSchema/SPIRIT/1685-2009/index.xsd"> <spirit:vendor>Vendor</spirit:vendor> <spirit:library>Library</spirit:library> <spirit:name>new_file</spirit:name> <spirit:version>1.0</spirit:version> <spirit:memoryMaps> <spirit:memoryMap> <spirit:name>mmap</spirit:name> <spirit:addressBlock> <spirit:name>blk1</spirit:name> <spirit:baseAddress>0x0</spirit:baseAddress> <spirit:range>0xc</spirit:range> <spirit:width>32</spirit:width> <spirit:usage>register</spirit:usage> <spirit:access>read-write</spirit:access> <spirit:register> <spirit:name>regA</spirit:name> <spirit:addressOffset>0x0</spirit:addressOffset> <spirit:size>32</spirit:size> <spirit:access>read-write</spirit:access> <spirit:field> <spirit:name>DTA</spirit:name> <spirit:bitOffset>0</spirit:bitOffset> <spirit:bitWidth>16</spirit:bitWidth> <spirit:access>read-write</spirit:access> </spirit:field> <spirit:field> <spirit:name>SEL_AB</spirit:name> <spirit:bitOffset>16</spirit:bitOffset> <spirit:bitWidth>4</spirit:bitWidth> <spirit:access>read-write</spirit:access> </spirit:field> <spirit:alternateRegisters> <spirit:alternateRegister> <spirit:name>regB</spirit:name> <spirit:alternateGroups> <spirit:alternateGroup>DB</spirit:alternateGroup> </spirit:alternateGroups> <spirit:access>read-write</spirit:access> <spirit:field> <spirit:name>DTB</spirit:name> <spirit:bitOffset>0</spirit:bitOffset> <spirit:bitWidth>16</spirit:bitWidth> <spirit:access>read-write</spirit:access> </spirit:field> <spirit:field> <spirit:name>SEL_AB</spirit:name> <spirit:bitOffset>16</spirit:bitOffset> <spirit:bitWidth>1</spirit:bitWidth> <spirit:access>read-write</spirit:access> </spirit:field> </spirit:alternateRegister> </spirit:alternateRegisters> </spirit:register> </spirit:addressBlock> <spirit:addressUnitBits>8</spirit:addressUnitBits> </spirit:memoryMap> </spirit:memoryMaps> </spirit:component> Quote
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.