0

I'm running a sequence where I need to temporarily write to a certain field in a register, and after a while I wish to reset it back to its reset value. I don't want to reset the entire register using the reset() function, I wish only to reset the field. I couldn't find an easy way to access the reset value of the field itself, even though it's defined per field in the reg_fld macro.

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Shay Golan
  • 89
  • 7

1 Answers1

0

You can access vr_ad_reg::static_info::fields_info via vr_ad_reg::get_fields_info() (provided the static_info exists). This is a list with an item for each field that contains information about the field. Have a look in the data browser, this should help you.

Thorsten
  • 710
  • 8
  • 17
  • The `vr_ad_reg::static_info::fields_info` does contain some info, but the reset value for some reason, is not there.. – Shay Golan Jun 24 '18 at 12:41
  • There is something that is called `vr_ad_reg::static_info::fld_reset_val_list`, but it's empty. – Shay Golan Jun 24 '18 at 12:42
  • Yes, sorry, I didn't have a working Specman setup at hand. But the field info gives you the size ``fld_size`` and LSB position ``fld_fidx`` of the field. Using this you can extract the reset value from the reset value of the register, which is ``vr_ad_reg_static_info::reset_value``. – Thorsten Jun 25 '18 at 14:47