Open redxeth opened 4 years ago
Enumerated values in registers per https://github.com/Origen-SDK/o2/issues/31 I suspect will be one of those things not always in the source-- so should be something that can be added after import.
or you overwrite the already-imported register as needed.
How else are you thinking we should handle this?
Some way to modify only part of the register instead of having to overwrite the reg.
Examples used on exisiting projects (mind the ruby)
myreg.named_bits do |name, bit|
bit.writable((1 << bit.length) - 1)
end
which could be due to the fact that now we're in test mode. This is a very hack-ey way to change the bitfield writable flag.
But I had another case where there was a typo in the XML so had to add the entire register again with the correction, can't find it just now.
Often the register models generates from importing registers XML (or other) source are not complete for the needs of test. It could be that a register is used both in user mode and test mode, but is defined in XML only in test mode, or the format of a pin changes, or there is data or value tables missing that need to be added.
Work done on this before has been very 'hack-ey' in nature, or you overwrite the already-imported register as needed.