Origen-SDK/origen_swd

Get/Send data methods should accept a BitCollection

Closed this issue · 1 comments

ginty commented

Hi Ronnie,

Bitwise read/overlay/store has been implemented at the JTAG-driver level for JTAG-based protocols. i.e. something like the read_register method in the ARM debug protocol driver can simply pass on the supplied register to the read_dr method and the JTAG driver will deal with extracting what bits are to be read, stored, etc.
https://github.com/Origen-SDK/origen_jtag/blob/master/lib/origen_jtag/driver.rb#L332

To allow such drivers to easily work with SWD, it should provide similar functionality. It looks like the send_data and get_data methods only work with dumb data values, but these should be enhanced to accept a reg_or_val, and if it is a reg/bitcollection then implement bit-wise features accordingly.

Thanks!

rlaj commented

This support has been added with new APIs:
def read(ap_dp, reg_or_val, options = {})
def write(ap_dp, reg_or_val, wdata, options = {})