Skip to content

Write crossbar calendar in software#1056

Open
rslawson wants to merge 1 commit intomainfrom
rs/softwareCalendar
Open

Write crossbar calendar in software#1056
rslawson wants to merge 1 commit intomainfrom
rs/softwareCalendar

Conversation

@rslawson
Copy link
Collaborator

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 (:

Comment on lines +51 to +52
switch_cal.set_read_addr(const { IndexTy::<7, u8>::min_value() });
switch_cal.shadow_entry().ve_repeat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +64 to +65
switch_cal.set_shadow_entry(shadow_entry);
switch_cal.set_write_addr(idx);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants