Awang
Awang

Reputation: 1

Is it better to use uvm_reg_file for an array of uvm_reg objects or just declare an array in a uvm_reg_block?

I am trying to justify using uvm_reg_file but that will add an extra layer of hierarchy than if I just declare an array of the "uvm_reg" object inside the uvm_reg_block class.

I don't expect any functional differences as I have encountered both previously.

Upvotes: 0

Views: 180

Answers (1)

Tudor Timi
Tudor Timi

Reputation: 7573

A reg file won't really bring you anything and you're better off just using an array of registers.

I'd guess the reg file makes sense if the design is somehow structured to contain reg files and you want to mirror that structure in your test bench. Personally, I've never had to use it and never felt like I missed out on anything.

Upvotes: 0

Related Questions