summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/wavelet3d/w3d_top.sv4
-rw-r--r--rtl/gfx/gfx_top.sv30
-rw-r--r--rtl/gfx/mod.mk4
3 files changed, 31 insertions, 7 deletions
diff --git a/platform/wavelet3d/w3d_top.sv b/platform/wavelet3d/w3d_top.sv
index ec19fd2..a30745c 100644
--- a/platform/wavelet3d/w3d_top.sv
+++ b/platform/wavelet3d/w3d_top.sv
@@ -42,6 +42,7 @@ import gfx::*;
);
gfx_wb fpint_wb();
+ if_axil host_ctrl();
if_pkts coverage(), geometry();
gfx_regfile_io fpint_io();
@@ -106,7 +107,8 @@ import gfx::*;
gfx_top gfx
(
.clk,
- .rst_n
+ .rst_n,
+ .host_ctrl(host_ctrl.s)
);
endmodule
diff --git a/rtl/gfx/gfx_top.sv b/rtl/gfx/gfx_top.sv
index 853468d..215c953 100644
--- a/rtl/gfx/gfx_top.sv
+++ b/rtl/gfx/gfx_top.sv
@@ -1,14 +1,19 @@
module gfx_top
import gfx::*;
(
- input logic clk,
- rst_n
+ input logic clk,
+ rst_n,
+
+ if_axil.s host_ctrl
);
logic srst_n;
if_axib insn_mem();
- if_axil bootrom_axi(), debug_axi(), sched_axi(), shader_0_axi();
+ if_axil bootrom_axi(), debug_axi(), host_ctrl_axi(), sched_axi(), shader_0_axi();
+
+ logic irq_host_ctrl;
+ irq_lines irq;
gfx_rst_sync rst_sync
(
@@ -22,10 +27,19 @@ import gfx::*;
.clk,
.rst_n,
.srst_n,
- .irq(0),
+ .irq,
.axim(sched_axi.m)
);
+ axilemu host_ctrl_bridge
+ (
+ .clk,
+ .rst_n,
+ .irq(irq_host_ctrl),
+ .agent(host_ctrl),
+ .driver(host_ctrl_axi.s)
+ );
+
gfx_bootrom bootrom
(
.clk,
@@ -70,4 +84,12 @@ import gfx::*;
);
*/
+ always_ff @(posedge clk or negedge rst_n)
+ if (~rst_n)
+ irq <= '0;
+ else begin
+ irq <= '0;
+ irq[0] <= irq_host_ctrl;
+ end
+
endmodule
diff --git a/rtl/gfx/mod.mk b/rtl/gfx/mod.mk
index 3c27a4a..6ea0fb1 100644
--- a/rtl/gfx/mod.mk
+++ b/rtl/gfx/mod.mk
@@ -1,11 +1,11 @@
cores := gfx_shader_schedif
define core
- $(this)/deps := axixbar gfx_shader_schedif if_common picorv32
+ $(this)/deps := axilemu axixbar gfx_shader_schedif if_common picorv32
$(this)/rtl_top := gfx_top
$(this)/rtl_dirs := .
- $(this)/rtl_files := gfx_isa.sv gfx_pkg.sv
+ $(this)/rtl_files := gfx_isa.sv gfx_pkg.sv gfx_top.sv
endef
define core/gfx_shader_schedif