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

NutShell master branch re-adaption for FPGA platforms #206

Merged
merged 8 commits into from
Aug 26, 2024

Conversation

zhangziqing
Copy link
Contributor

@zhangziqing zhangziqing commented Aug 19, 2024

The master branch of NutShell can not generate an FPGA project that provides correct functionality(#205 #204 #200 ). Therefore I made serval changes to the NutShell and the FPGA project tcl.

  1. For software simulation, NutShell uses the nutcoretrap in CSR as a signal to dump the statistic during the simulation, this signal is connected by the boringUtil. However, the source of this connection is missing when using the FPGA platform. I set nutcoretrap signal to zero when using FPGA.
  2. Vivado can automatically identify the signals for AXI protocol if the name of these signals follow a certain form, the early version of NutShell uses a sed command in Makefile to convert the Chisel name to the specific form of AXI Signals. However, after using --spilt-verilog option, not all the signals were converted by the command.
  3. Still an issue related to the --spilt-verilog, vivado project tcl only adds TopMain.v to the project, therefore other RTL source files are missing in the vivado project.
  4. The tcl file generated by vivado restricts the version of vivado to 2019.1. However, these restrictions are not needed. I modified the tcl file, currently the mismatch of vivado version will only cause a warning message other than a termination to the project generation.
  5. The FPGA platform uses a top name different from the simulation. Current Makefile needs to use mv command to rename the top file name from SimTop.sv to TopMain.sv, which will cause an error to the FPGA platform as the `SimTop.sv`` does not exist.
  6. Currently Nutshell uses LogPerfHelper for logging. this module connects all the log units to the control logic in SimTop, which does not exist in the FPGA project. So I have disabled logging for the FPGA platform

The issues mentioned above have been resolved in the pull request. These modifications have been tested with sidewinder and PYNQ.

@zhangziqing zhangziqing changed the title Oscpu master wip NutShell master branch re-adaption for FPGA platforms Aug 19, 2024
Copy link
Collaborator

@poemonsense poemonsense left a comment

Choose a reason for hiding this comment

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

Look good to me

@sashimi-yzh Do you have time to take a look?

@poemonsense
Copy link
Collaborator

Thank you for the contribution.

Please help add a CI test (simply build the verilog from Chisel?) for FPGA verilog to .github/workflows/main.yml if possible.

@poemonsense
Copy link
Collaborator

I'm merging this now.

If there're issues after yzh review, we can further fix them

@poemonsense poemonsense merged commit 5dafeda into OSCPU:master Aug 26, 2024
1 check passed
markaulunGH pushed a commit to markaulunGH/NutShell that referenced this pull request Oct 26, 2024
NutShell master branch re-adaption for FPGA platforms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants