Conversation
| switch_cal.set_read_addr(const { IndexTy::<7, u8>::min_value() }); | ||
| switch_cal.shadow_entry().ve_repeat |
There was a problem hiding this comment.
I think this gets the ve_repeat of entry 0 in the shadow calendar which is 0 given the setting of the inactive calendar.
It's probably easiest to just set the inactive calendar to be the same as the active calendar.
There was a problem hiding this comment.
It's not 0 anymore (see bittide-instances/src/Bittide/Instances/Hitl/Dut/SwitchDemo.hs:138) - I use it as a hack to exfiltrate nRepetitions and make it useable in the Rust code. Should that value ever change, then the Rust code will still receive the new value through this route.
| switch_cal.set_shadow_entry(shadow_entry); | ||
| switch_cal.set_write_addr(idx); |
There was a problem hiding this comment.
Could you either alter the Bittide.Instances.Pnr.Switch's switch and calendar to match the one in SwitchDemo?
In that case you should be able to use the switch_calendar HAL in manual additions.
OR copy that HAL and adjust it to the switch in SwitchDemo. And then use the hal instead of manually ensuring the (error prone) correct order of function calls.
Replaces the hard-coded crossbar calendar with software that writes the same one. Plus one weird to-do issue, but that's a Fix Me Later Please™ sort of thing (: