Skip to content
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

Add none type chip capability handling #381

Closed
wants to merge 1 commit into from

Conversation

jnie-TT
Copy link
Contributor

@jnie-TT jnie-TT commented Aug 13, 2024

#380
Add handling for None type chip capability

Copy link
Contributor

@kmabeeTT kmabeeTT left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@kmabeeTT
Copy link
Contributor

kmabeeTT commented Aug 13, 2024

Sorry, I deleted my prev reply - I thought there was an issue (seg fault) but I had typo on my cmd (referencing wrong workspace systemdesc). Works good, no more error seen. This looks a bit strange though, is it intended?

    "chip_capabilities": [
      6,
      "None"
    ],

Edit: Maybe lets keep this open a bit to get Nick's thoughts.
Edit2: chatgpt says this bitflag enum should yield values 0,1,3 but we are seeing 6 above for some reason...

enum ChipCapability: uint32 (bit_flags) {
  None = 0,
  PCIE = 1,
  HostMMIO = 2,
}

@kmabeeTT kmabeeTT self-requested a review August 13, 2024 15:23
@jnie-TT
Copy link
Contributor Author

jnie-TT commented Aug 13, 2024

Sorry, I deleted my prev reply - I thought there was an issue (seg fault) but I had typo on my cmd (referencing wrong workspace systemdesc). Works good, no more error seen. This looks a bit strange though, is it intended?

    "chip_capabilities": [
      6,
      "None"
    ],

Edit: Maybe lets keep this open a bit to get Nick's thoughts. Edit2: chatgpt says this bitflag enum should yield values 0,1,3 but we are seeing 6 above for some reason...

enum ChipCapability: uint32 (bit_flags) {
  None = 0,
  PCIE = 1,
  HostMMIO = 2,
}

You're seeing 6 because with this change you're bitwise or'ing 0b'10 and 0b'100 so it yields 6.

@jnie-TT jnie-TT closed this Aug 13, 2024
@svuckovicTT
Copy link
Contributor

Curious, what's the use of the None type?

@jnie-TT
Copy link
Contributor Author

jnie-TT commented Aug 13, 2024

Curious, what's the use of the None type?

Remote chips connected via ethernet.

@jnie-TT jnie-TT reopened this Aug 13, 2024
@svuckovicTT
Copy link
Contributor

Curious, what's the use of the None type?

Remote chips connected via ethernet.

Would it be plausible to call it something like TT_ChipCapabilityEth?

@jnie-TT
Copy link
Contributor Author

jnie-TT commented Aug 13, 2024

Curious, what's the use of the None type?

Remote chips connected via ethernet.

Would it be plausible to call it something like TT_ChipCapabilityEth?

Yeah that's a good idea! I'll update the name

@nsmithtt
Copy link
Contributor

+1 for adding an eth attribute.

But back to the core issue, does it work instead of using < and > to use [ and ]. Or we could do this instead:

let assemblyFormat = "`<` (`none` `:` $value^)? `>`";

Copy link
Contributor

@nsmithtt nsmithtt left a comment

Choose a reason for hiding this comment

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

Let's try and support the assembly syntax I posted above. I'd rather not have a special case value for None I think that only works around the issue.

@nsmithtt
Copy link
Contributor

@jnie-TT, we can close this, fixed with #402 right?

@jnie-TT
Copy link
Contributor Author

jnie-TT commented Aug 21, 2024

@nsmithtt that's correct, closing this.

@jnie-TT jnie-TT closed this Aug 21, 2024
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.

4 participants