Can We Have One Uvm_Reg_Map Connected to Multiple Sequencers

I have a situation where I have around 100000 registers in a uvm_reg_block. I have three drivers that can drive transactions to these registers. As per standard UVM RAL methodology, I understand we need three separate uvm_reg_maps connected to three sequencers and drive. The problem is to duplicate the registers in all the three uvm_reg_maps which is eating the CPU time to run. It is taking one hour to even enter the data phase. Can you help me solve this? Is there a way to connect all three sequencers to one uvm_reg_map and somehow based on the argument, decide which physical sequencer it should pick up?

Thanks in advance

2

3 Answers

A uvm_reg_map can only work with one sequencer.

You mention that creating multiple reg maps is too slow, because the add_reg(...). It might be possible to separate the register map specification aspect (at what addresses the registers are) from the sequencer aspect. For this you would need one uvm_reg_map instance on which you do your add_reg(...) calls. Let's call this the specification map. For each sequencer you want to drive register accesses on, you would need another uvm_reg_map (sub-class) that somehow points to the specification map. Let's call these driving maps.

I don't have any code on how to do this at the moment. One would need to look at how uvm_reg_map is called by other code and override those functions. Instead of calling the implementations in uvm_reg_map, which deal with its own register storage, they would point to the specification map and interrogate it using get_reg(...) and so on. This might not work if the functions are not declared virtual in uvm_reg_map. UVM has a tendency to make extension impossible because code relies on implementations instead of abstractions.

From what I know, you can't. If one reg map is able to connected to more than one sequencer, then later how can you choose which sequencer to run? In addition, for each added reg map, its handle will be stored inside the uvm_reg's m_maps array via map.add_reg(). It is not like each map will create its own registers, so the registers will not be duplicated.

Other way to do is to create a driver which uses all these 3 sequencer/agent.(Let's call it reg_driver) reg_driver will have one sequencer which gets generic reg. transactions. From run time switch given, select the reg sequence of interface to drive particular transaction inside reg_driver.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest