-
Notifications
You must be signed in to change notification settings - Fork 104
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
Adding a Master peripheral #45
Comments
The best approach is to make step 1 and use axi_slv sub-module as an AXI interface inside of your device. Note: Most of the Verilog and SystemC files are generated by rtlgen utility (see https://github.com/sergeykhbr/rtlgen). When it will be fully finished it will implement full system generator that allows to create topology of the SoC and full customization. |
Hello, |
I see also that there is no axi_master interface or it is implemented in the sv version under a different name, because I wandering how the master peripherals are connected to the AXI without an interface module, so can you clarify where is this module or I need to implement one ? |
Master interface is in the development to provide coherence interface and re-used in CPUs workgroup |
so you mean that there is no module for AXI_master interface explicitly, sorry,I am not able to understand what you mean . |
As I want to add a new master peripheral, how can I communicate with the AXI bus? That's why I am asking about an interface module like the axi_slv. |
I cannot provide simple solution right now. You have several options that should be implemented manually:
|
Hello again,
Hello again, |
|
axi4_new_slave.txt |
I mean at the SoC level (file riscv_soc.sv) not inside of the slave device. |
riscv_soc.txt |
That looks good for me. But I think you should increase upper address. You cannot allocate less than 4 KB of memory on AXI bus (it is possible on APB - bus1). |
Hello,
Actually, I added these lines of code in the main function, and it didn't work, so is there something else to be done to disable cache access when I am trying to read from or write to the peripheral? Thank you very much for your effort. |
See Physical Memory Protection (PMP) in risc-v specification. I forget to remove map_mpu.h header file from examples that you are referring to. It was my own version of protection module before the specification updates and it is obsolete. |
You mean that I need to configure registers for PMP in the software program ? |
No, sorry. My bad. PMP setups access rights. Edit pma.sv file to specify new IO (uncached) region. |
I saw the pma module, and I didn’t understand what I should do to specify uncached memory regions, or I need to add something to the module itself |
In pma_pkg.sv specify constants:
In pma.sv add uncahced data region:
|
Hello, |
I am not sure that I understood your question but asic_sim, kc705_sim and a real hardware execute absolutely the same code and should show the same output. With the enabled DDR controller kc705_sim simulation works mush slower than 'unisim' asic_sim. CPU harts after reset wait until I/D caches finish its initialization and become available. Duration of the cache initialization depends of cache sizes. |
I mean that I want to test the peripheral in vivado simulator (xsim) using the software program that initialize the ROM, and I am trying to monitor some internal signals that should change depending on the software program, but the problem is that the signals aren't changing, so my asking that should the test bench of the top module simulate all the submodules, and I should see how the AXI signals are changing.Also, I tried to write data in the SRAM and monitor the Axi_slave_input_signals, but they are not changing also. |
Yes, whole system is simulating with the all peripheries. |
Hello sergey, |
No, sorry. I am more interested in the full-functional SD-controller right now. |
Hello Sergey, |
You can use fence.i instruction to flush caches |
I want to add a new slave peripheral to Riscv, and I took SRAM as reference to know the modules and packages that I should modify, and I found that I should add:-
Do I need to adjust any other modules or packages?
The text was updated successfully, but these errors were encountered: