Rutherther / vhdl-i2c

I2C master and slave implementation in VHDL
1 stars 0 forks source link

Store rw and address until not another start condition #3

Closed Rutherther closed 8 months ago

Rutherther commented 10 months ago

Even better should be to store it on start pulse to the master, not on start condition. That will make it possible to edit address and rw whenever after putting in start - for example to prepare for next device. For slave, store address on start condition

Rutherther commented 10 months ago

I've added store possibility. Currently it just stores the address instead of the behavior so far. It would be better to get rid of curr_index, as that is no longer needed, and shift register might be utilized.

That will restrict the public api of the entity however - leading to the necessity of storing the address only once and storing it again after next start(_condition). So far, the store flag can be kept high - that is the approach in testbenches for now. The state entities currently do precisely that - store it on start(_condition), so it should not produce any problems in the design.

Rutherther commented 8 months ago

Index won't be removed as part of this issue.