diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-05-06 01:56:14 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-05-06 01:56:14 -0600 |
| commit | 95c35cdd306868599e6ee11cbfbe4495a0ab843f (patch) | |
| tree | b19d3debc79ac0875d07c82cd7c6b3ea8a621001 /rtl | |
| parent | e7266cad08ac6f1bcb90c5bbcc501b919882cf1a (diff) | |
rtl/gfx: add axilemu interface
Diffstat (limited to 'rtl')
| -rw-r--r-- | rtl/gfx/gfx_top.sv | 30 | ||||
| -rw-r--r-- | rtl/gfx/mod.mk | 4 |
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 |
