-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
…tion that uses datapath_state
src/emulation_core/mips/line_info.rs
Outdated
@@ -330,3 +333,314 @@ impl VisualDatapath for MipsDatapath { | |||
} | |||
} | |||
} | |||
|
|||
pub fn visual_line_to_data(variable: &str, datapath_state: &UseReducerHandle<DatapathReducer>) -> LineInformation { |
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.
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.
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.
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
.
Works, but makes the
VisualDatapath
trait redundant by adding a publicvisual_line_to_data
function that uses the Datapath Reducer's state.