Repository navigation
Extended mips - #116
Merged
Merged
Extended mips#116
Conversation
…ipe to mips_extended_pipe
- Added support for dynamic symbols in InstrMem with a default value for PC_IM. - Implemented a method to set all dynamic symbols in MemViewWindow while preserving visibility of existing symbols.
The zoom fix (#114) added canvas_rect to Gui and disabled egui's built in keyboard zoom in gui(), but extended_mips builds the Gui through Gui::new/run (used by the mips-lib cli), which missed both.
- mips_im_dm_regfile: the DataMem read enable was wired to a probe named data_read_enable but the probe was named read_enable, giving "A port left unconnected" - mips_extended_pipe_example: CP0 EPC input used the port name instruction_ex_4_address_in as component id, wire it to mux_b2_reg like mips_pipe_ex.json does - mips_pipe_example_1 and mips_extended_pipe_example saved to mips_pipe_ex.json, overwriting the hand tuned in built extended model, save to their own files instead
- un_clock computed compare - 1 which overflowed when compare is 0 (the default), panicking in debug and desyncing the compare flag history in release. Use the same check as clock (counter == compare) before undoing the counter step instead. - clock computed compare + 1 which overflowed for compare = u32::MAX, use wrapping_add. - Add clock/unclock round trip tests for the timer.
Spooky-Firefox
commented
Sep 23, 2026
Spooky-Firefox
left a comment
Collaborator
Author
There was a problem hiding this comment.
Look through the code that we wrote 2 years ago with new eyes, everything looks good but cant approve my own pr :(
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the version the students have been using the last two years, i think its battle tested and does not require much of a review.
Summary:
This pull request introduces several enhancements and refactors to the MIPS simulation codebase, primarily focused on improving memory control signal handling, expanding component capabilities, and updating dependencies. The most significant changes include the addition of explicit memory read enable signals throughout the control unit and data memory, the introduction of new example files, and updates to optional dependencies and feature flags.
Key changes:
Memory Control Signal Improvements
mem_read_enablesignal to the control unit (ControlUnit), including new constants, default values, and logic for setting this signal for relevant instructions. This ensures more precise control over memory read operations. [1] [2] [3] [4] [5] [6] [7]DataMem) structure and related input wiring to support the newread_enable_input, enabling components to respond correctly to read enable signals. [1] [2] [3] [4] [5]mips_pipe.json,mips_single_cycle.json) to include the newread_enable_inputfield for data memory components. [1] [2]Control Unit Refactoring and CP0 Handling
CP0_MV_OP_OUT,IS_SYSCALL,IS_RFE) and handling for CP0 instructions in the control unit. This lays groundwork for future CP0 instruction support. [1] [2] [3] [4]Example and Test Expansion
mips_io.rsandmips_timer.rs, which demonstrate the use of new components and signals, and updated existing examples to use more descriptive file names and to wire up the new signals. [1] [2] [3] [4]Dependency and Feature Management
rfdcrate as optional inCargo.tomland ensured it is only enabled for thegui-eguifeature, improving build flexibility and reducing unnecessary dependencies. [1] [2] [3] [4]bitveccrate as a dependency for potential future use with bit manipulation.Development Environment Updates
.vscode/settings.jsonto include new identifiers and terms relevant to recent code additions, aiding code navigation and linting.