lowRISC / sonata-system

A full micro-controller system utilizing the CHERIoT Ibex core, part of the Sunburst project funded by UKRI
Apache License 2.0
29 stars 17 forks source link

Implement I2C DPI and device models #194

Closed alees24 closed 1 month ago

alees24 commented 2 months ago

Introduce a generic DPI model of an I2C bus with an arbitrary number of attached I2C devices. All bus speeds and device behaviours including Sr (restart) conditions should be supported, and only support for clock stretching and multiple controllers is presently unimplemented. Out-Of-Band signals are present in each direction for future extensions such as interrupt signalling.

Introduce simple device models for:

These are the devices that are presently anticipated and exercised by the sw/legacy/demo/i2c_hat_id code, allowing the code to produce the same results in Verilator simulation as on the FPGA build.