The is the sample_i2c_device class which is an example of how I2C slave devices can be written in Simics.
conf_object, log_object, i2c_slave_v2
- cell-change
- Notifier that is triggered after the object's cell was changed.
- object-delete
- Notifier that is triggered just before Simics object is deleted.
- queue-change
- Notifier that is triggered after the object's clock was changed. New clock can be obtained with the SIM_object_clock function.
-
info
– print information about the object
-
status
– print status of the object
-
address
-
Required attribute;
read/write access; type:
i
7-bit address on the i2c bus. It can be any valid i2c address in range of [0, 127].
-
read_value
-
Optional attribute;
read/write access; type:
i
Value to return on reads.
-
written_value
-
Optional attribute;
read/write access; type:
i
Last byte written to this device.
sample-i2c-device