Skip to content

Modularize the bus. Add example of usage. #38

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jimktrains
Copy link

@jimktrains jimktrains commented May 31, 2025

This breaks the bus apart and allows it to be built up programmatically.

@jimktrains jimktrains marked this pull request as draft May 31, 2025 09:33
@@ -75,8 +131,6 @@ impl XRegisters {
/// Create a new `XRegisters` object.
pub fn new() -> Self {
let mut xregs = [0; REGISTERS_COUNT];
// The stack pointer is set in the default maximum memory size + the start address of dram.
xregs[2] = DRAM_BASE + DRAM_SIZE;
Copy link
Author

Choose a reason for hiding this comment

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

Since the stack is based on where the system wants it, we don't know where we would have to initialize this, and it needs to be done elsewhere. When the DRAM is initialized on the bus, I do set the stack pointer to the end of ram.

@jimktrains jimktrains marked this pull request as ready for review June 13, 2025 22:13
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.

1 participant