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

Visual datapath upgrade #349

Closed
wants to merge 7 commits into from
Closed

Visual datapath upgrade #349

wants to merge 7 commits into from

Conversation

cayb0rg
Copy link
Contributor

@cayb0rg cayb0rg commented Feb 18, 2024

Works, but makes the VisualDatapath trait redundant by adding a public visual_line_to_data function that uses the Datapath Reducer's state.

@@ -330,3 +333,314 @@ impl VisualDatapath for MipsDatapath {
}
}
}

pub fn visual_line_to_data(variable: &str, datapath_state: &UseReducerHandle<DatapathReducer>) -> LineInformation {
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do you think we should be handling the switch between MIPS and RISC-V? We're probably going to have a lot of similar variables and it might be cool to just have the UI call the same visual_line_to_data() function and have that function determine which value to use based on the value of datapath_state.current_architecture. It wouldn't require any code changes here but I'm curious what you think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered that as well but didn't know if we were keeping architecture-specific logic in their own modules. I'm open to either but I do like the compressed version of a single go-to function better. I've added it now and stuck it in utils.rs.

@cayb0rg cayb0rg mentioned this pull request Mar 1, 2024
@cayb0rg cayb0rg marked this pull request as ready for review March 1, 2024 22:48
@cayb0rg cayb0rg closed this Mar 1, 2024
@cayb0rg cayb0rg deleted the visual-datapath-upgrade branch April 20, 2024 00:59
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