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

Fix reset #212

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix reset #212

wants to merge 2 commits into from

Conversation

markaulunGH
Copy link

@markaulunGH markaulunGH commented Oct 26, 2024

  1. Fixed the bug where the SRAM's CE signal was active when the reset signal was active.
  2. Fixed the bug where the Queue still allowed entries when reset or flush was active, causing the IFU to continue fetching instructions while reset was active.

Waveform diagram for issue:
WAVE
The BTB SRAM chip select signal is active when the reset signal is active, but there is no initialization operation at this time. The initialization of the BTB SRAM occurs after the reset signal is deasserted.
WAVE2

Commonality between the two issues: Both involve the Queue signal or SRAM chip select signal being active while the reset signal is active.
Resetting:Queue io.enq.ready is 1 => IFU io.imem.req.valid is 1 => Cache SRAM's CE is 1(valid)
Resetting: _resetState is 1 => BTB SRAM's CE is 1 (Valid) (before the initialization of the BTB SRAM)

Simulation results after code modification

  1. The SRAM chip select signal is not active when the reset signal is active.
  2. Can run the simulation of NutShell's built-in linux.bin with difftest enabled without encountering any errors.
    command:./build/emu -b 0 -e 0 -i ./ready-to-run/linux.bin -C 200000000 --diff ./ready-to-run/riscv64-nemu-interpreter-so

poemonsense and others added 2 commits October 26, 2024 16:43
NutShell master branch re-adaption for FPGA platforms
…sh was active, causing the IFU to continue fetching instructions while reset was active.
@markaulunGH markaulunGH reopened this Oct 30, 2024
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