-
Notifications
You must be signed in to change notification settings - Fork 207
Add cosmo rev B #2257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add cosmo rev B #2257
Conversation
else if #[cfg(target_board = "cosmo-b")] { | ||
let expected_rev = 0b001; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nitpicks, but no concerns from me!
// Check that a valid bitstream is available for this board. | ||
let board = build_util::env_var("HUBRIS_BOARD")?; | ||
if board != "cosmo-a" { | ||
if board != "cosmo-a" && board != "cosmo-b" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take it or leave it: could also do
if board != "cosmo-a" && board != "cosmo-b" { | |
if !matches!(board, "cosmo-a" | "cosmo-b") { |
(or maybe if let
would work too?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's str
vs String
nonsense here
error[E0308]: mismatched types
--> drv/cosmo-seq-server/build.rs:18:25
|
18 | if !matches!(board, "cosmo-a" | "cosmo-b") {
| ----- ^^^^^^^^^ expected `String`, found `&str`
| |
| this expression has type `String`
error[E0308]: mismatched types
--> drv/cosmo-seq-server/build.rs:18:37
|
18 | if !matches!(board, "cosmo-a" | "cosmo-b") {
| ----- ^^^^^^^^^ expected `String`, found `&str`
| |
| this expression has type `String`
Co-authored-by: Eliza Weisman <[email protected]>
This reverts commit e94a113.
drv/cosmo-seq-server/src/main.rs
Outdated
self.log_pg_registers(); | ||
self.seq.power_ctrl.modify(|m| m.set_a0_en(false)); | ||
|
||
// XXX faulted isn't strictly a timeout, but this is the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is now out of date
drv/cosmo-seq-server/src/main.rs
Outdated
// `A0Sm::ENABLE_GRP_A` time | ||
// hardware-cosmo#658 prevents us from checking `CPU_PRESENT` | ||
// at `A0Sm::ENABLE_GRP_A` time on rev-a boards | ||
cfg_if::cfg_if! { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vibes: I would write this using a runtime conditional, i.e.
if cfg!(target_board = "cosmo-a") {
// ...
} else {
// ...
}
That way, all of the code is checked (and you can remove the #[allow(unused_mut)]
), but the compiler will almost certainly optimize it out.
No description provided.