mirror of
https://github.com/Minres/RISCV-VP.git
synced 2026-01-11 09:04:07 +00:00
adds 2x eth controller
This commit is contained in:
2
.github/workflows/cmake-single-platform.yml
vendored
2
.github/workflows/cmake-single-platform.yml
vendored
@@ -42,5 +42,5 @@ jobs:
|
||||
|
||||
- name: Smoke Test
|
||||
working-directory: ${{github.workspace}}
|
||||
run: ${{github.workspace}}/build/${{env.BUILD_TYPE}}/src/riscv-vp -f fw/hello-world/hello.elf
|
||||
run: ${{github.workspace}}/build/${{env.BUILD_TYPE}}/src/riscv-vp -f ${{github.workspace}}/fw/hello-world/hello.elf
|
||||
|
||||
|
||||
@@ -16,20 +16,18 @@ using namespace vpvper::minres;
|
||||
|
||||
system::system(sc_core::sc_module_name nm)
|
||||
: sc_core::sc_module(nm)
|
||||
, NAMED(ahb_router, 3, 2)
|
||||
, NAMED(ahb_router, 5, 2)
|
||||
, NAMED(apbBridge, PipelinedMemoryBusToApbBridge_map.size(), 1) {
|
||||
mtime_clk = (1.0 / 32768) * 1_sec;
|
||||
|
||||
core_complex.ibus(ahb_router.target[0]);
|
||||
core_complex.dbus(ahb_router.target[1]);
|
||||
|
||||
ahb_router.initiator.at(0)(qspi.xip_sck);
|
||||
ahb_router.set_target_range(0, 0x20000000, 16_MB);
|
||||
ahb_router.initiator.at(1)(mem_ram.target);
|
||||
ahb_router.set_target_range(1, 0x00000000, 128_kB);
|
||||
ahb_router.initiator.at(2)(apbBridge.target[0]);
|
||||
ahb_router.set_target_range(2, 0x10000000, 256_MB);
|
||||
|
||||
ahb_router.bind_target(mem_ram.target, 1, 0x00000000, 128_kB);
|
||||
ahb_router.bind_target(apbBridge.target[0], 2, 0x10000000, 128_MB);
|
||||
ahb_router.bind_target(eth0.socket, 3, 0x18000000, 4_KiB);
|
||||
ahb_router.bind_target(eth1.socket, 4, 0x18001000, 4_KiB);
|
||||
ahb_router.bind_target(qspi.xip_sck, 0, 0x20000000, 16_MB);
|
||||
size_t i = 0;
|
||||
for(const auto& e : PipelinedMemoryBusToApbBridge_map) {
|
||||
apbBridge.initiator.at(i)(e.target);
|
||||
@@ -45,6 +43,8 @@ system::system(sc_core::sc_module_name nm)
|
||||
qspi.clk_i(clk_i);
|
||||
core_complex.clk_i(clk_i);
|
||||
// mem_ram.clk_i(clk_i);
|
||||
eth0.clk_i(clk_i);
|
||||
eth1.clk_i(clk_i);
|
||||
|
||||
gpio0.rst_i(rst_s);
|
||||
uart0.rst_i(rst_s);
|
||||
@@ -53,6 +53,8 @@ system::system(sc_core::sc_module_name nm)
|
||||
irq_ctrl.rst_i(rst_s);
|
||||
qspi.rst_i(rst_s);
|
||||
core_complex.rst_i(rst_s);
|
||||
eth0.rst_i(rst_s);
|
||||
eth1.rst_i(rst_s);
|
||||
|
||||
aclint.mtime_clk_i(mtime_clk);
|
||||
aclint.mtime_o(mtime_s);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "tlm/scc/quantum_keeper.h"
|
||||
#include <cci_configuration>
|
||||
#include <minres/aclint.h>
|
||||
#include <minres/ethmac.h>
|
||||
#include <minres/gpio.h>
|
||||
#include <minres/irq.h>
|
||||
#include <minres/qspi.h>
|
||||
@@ -58,6 +59,8 @@ private:
|
||||
vpvper::minres::aclint_tl aclint{"aclint"};
|
||||
vpvper::minres::irq_tl irq_ctrl{"irq_ctrl"};
|
||||
vpvper::minres::qspi_tl qspi{"qspi"};
|
||||
vpvper::minres::ethmac eth0{"eth0"};
|
||||
vpvper::minres::ethmac eth1{"eth1"};
|
||||
|
||||
scc::memory<128_kB, scc::LT> mem_ram{"mem_ram"};
|
||||
scc::memory<8_kB, scc::LT> boot_rom{"boot_rom"};
|
||||
|
||||
Reference in New Issue
Block a user