Closed Rutherther closed 8 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.
Index won't be removed as part of this issue.
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