summaryrefslogtreecommitdiff
path: root/rtl
diff options
context:
space:
mode:
Diffstat (limited to 'rtl')
-rw-r--r--rtl/gfx/gfx_top.sv30
-rw-r--r--rtl/gfx/mod.mk4
2 files changed, 28 insertions, 6 deletions
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