[reggen] Minor tidy-ups in gen_dv.py
[reggen] Minor tidy-ups in gen_dv.py

No functional change, but fix flake8 warnings, move comments above
functions into docstrings, and make gen_ral a bit easier to read.

Signed-off-by: Rupert Swarbrick <290093e2ad2515ed2f14d749293c8cf8e02ca274@lowrisc.org>

lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan,lowRISC/opentitan