Skip to content

Modularize the bus. Add example of usage.#38

Open
jimktrains wants to merge 5 commits intod0iasm:mainfrom
jimktrains:modular_bus
Open

Modularize the bus. Add example of usage.#38
jimktrains wants to merge 5 commits intod0iasm:mainfrom
jimktrains:modular_bus

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
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