PrashanthP Posted April 27, 2023 Report Posted April 27, 2023 Hello. I have a use case wrto IPXACT where in we have a register set Let us say we have 3 register sets. Register names are same but their offset addresses are different. Is there any parameter feature in IPXACT where in if we set parameter to be 4 then we have 4 sets of registers created with their respective offset addresses as mentioned above. Request to help me on this. Thanks in Advance, Prashanth Quote
kock Posted April 28, 2023 Report Posted April 28, 2023 Hi Prashanth, You can describe the 4 registers in a registerFile with range 0x20 and dim 3 to get the three register sets. The dim value can be a parameter. Best regards, Erwin Quote
PrashanthP Posted April 28, 2023 Author Report Posted April 28, 2023 Hi Erwin. Small correction. Register names as well are different wrto sets. For ex: 1st set has names with _0(Reg0_0,Reg1_0,..) extension and 2nd set has extension with _1(Reg1_1,Reg2_1..) etc Can you add the snippet for the same. It would be very helpful. Thanks, Prashanth Quote
PrashanthP Posted May 2, 2023 Author Report Posted May 2, 2023 Hi Erwin, Can you please help me with this. Thanks, Prashanth Quote
Jason H Posted May 2, 2023 Report Posted May 2, 2023 You need to avoid embedding "instantiation" information in the register name itself. Arrays are very useful in the address map, and you don't need to uniquify the names when you leverage them. For example, <registerFile> <name>RfGrp</name> <dim>3</dim> <register> <name>Reg1</name> </register> <register> <name>Reg2</name> </register> <register> <name>Reg3</name> </register> <register> <name>Reg4</name> </register> </registerFile> Then, your names are defined by path, so instead of Reg1_0 you have RfGrp[0].Reg1. Your IP-XACT logical representation doesn't have to match exactly to the implementation (e.g. RTL module), but if they do differ and you want to use backdoor paths in UVM RAL or similar, you can add accessHandles to specify the "view" specific names. And as for the parameter part, dim is an positiveUnsignedIntExpression, so you can reference a parameter which will adjust the dimensionality. <component> <parameters> <parameter parameterId="N" resolve="user" type="int" signed="false" minimum="1"> <name>N</name> <value>3</value> </parameter> </parameters> <!-- ... --> <registerFile> <dim>N</dim> </registerFile> </component> Quote
PrashanthP Posted May 3, 2023 Author Report Posted May 3, 2023 Can you please check this snippet where it is written inside an addressblock. And based on dim PARAM, those many sets of registers will be created. Can you help with the offset address that i require as per the tables given in above comments. Thanks, Prashanth Quote
kock Posted May 4, 2023 Report Posted May 4, 2023 Hi Prashanth, Your register offsets are correct. Since the offset of the register file is 0x2000, the register are located at 0x2000, 0x2004, 0x2008, and 0x200C. For the next occurrence of the register file, you add the register file range: 0x2020, 0x2024, 0x2028, and 0x202C. Best regards, Erwin Quote
PrashanthP Posted May 4, 2023 Author Report Posted May 4, 2023 Hi Erwin, I did not understand what you said in last comment. You want me to create another register file or for regfile[1] how can i proceed so that register offst addresses should be 1*0x20+0x0,1*0x20+0x4 and so on. Could you please add some snippet on same for more understanding on this. Thanks and Regards, Prashanth Quote
kock Posted May 8, 2023 Report Posted May 8, 2023 Sorry for the confusion. You do not need to "add" anything. The next occurrence of the register file is at offset + 0x20 (the range). So the register file array element are at 0x2000, 0x2020, 0x2040 .... Within each register file element you have the registers at offsets 0x0, 0x4, 0x8 and 0xC. The XML snippet is the same as yours above. PrashanthP 1 Quote
PrashanthP Posted May 9, 2023 Author Report Posted May 9, 2023 Hi Erwin. thanks for the validation. I need small info. How can i cross check whether registers with in register file is mapped properly as intended. Are there any built in methods for uvm_reg_file that i can use to check from where a register file is starting and its respective registers ? Thanks and Regards, Prashanth Quote
kock Posted May 9, 2023 Report Posted May 9, 2023 I do not know about that Prashanth. I am not an UVM expert. Quote
Jason H Posted May 9, 2023 Report Posted May 9, 2023 @PrashanthP you might want to check out simple built-in sequences like the bit bash sequence as a baseline for whether your (presumably generated from IP-XACT) UVM RAL model matches the design. Details beyond that could be answered in UVM forums or other docs. PrashanthP 1 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.