-
Notifications
You must be signed in to change notification settings - Fork 29
Description
In the code fragment below, msbyte != 0x0 || msbyte != 0x6 || (anything) is always true, so it looks like the if statement below could be reduced to valid_fw_version.push(true);.
Is that the intention?
What is in msbyte? If I ripgrep the luwen repo looking for masked_version, I see its initial condition as fw_version & 0x00FFFFFF; and not coming across other writers. I then see below let eth_fw_version = self.eth_addrs.masked_version; let msbyte = (eth_fw_version >> 24) & 0xFF; and read that as zero out the top 8 bits, then compute the top 8 bits. Looks like masked_version was introduced by commit 53ab480 and that it has always been initialized to fw_version & 0x00FFFFFF;. What am I missing? I'm digging into all this because tt-inference-server won't start for me because something about sw and fw version. Yes, that's from tt-umd. I was looking here to get more understanding about what fw_version is.
This is from crates/luwen-if/src/chip/remote.rs as of commit ae98025
pub(crate) fn check_ethernet_fw_version(&mut self) -> Result<Vec<bool>, PlatformError> {
let mut valid_fw_version = Vec::with_capacity(self.eth_locations.len());
for core in &self.eth_locations {
let eth_fw_version = self.eth_addrs.masked_version;
let msbyte = (eth_fw_version >> 24) & 0xFF;
if msbyte != 0x0
|| msbyte != 0x6
|| self.noc_read32(0, core.x, core.y, self.eth_addrs.version)? & 0x00FFFFFF
!= eth_fw_version
{
valid_fw_version.push(true);
} else {
valid_fw_version.push(false);
}
}