cpu/ibex: Add local patch to fix missing import.

This commit is contained in:
Florent Kermarrec 2021-10-19 15:41:42 +02:00
parent f4bd729d28
commit b9545c2276
2 changed files with 21 additions and 1 deletions

View File

@ -211,8 +211,16 @@ class Ibex(CPU):
"ibex_register_file_fpga.sv", "ibex_register_file_fpga.sv",
"ibex_wb_stage.sv", "ibex_wb_stage.sv",
"ibex_core.sv", "ibex_core.sv",
"ibex_top.sv" #"ibex_top.sv" FIXME.
) )
# FIXME: Patch ibex_top.sv to fix missing import.
if not os.path.exists("ibex_top.sv"):
# Get ibex_top source.
os.system("cp {src} {dst}".format(src=os.path.join(ibexdir, "rtl", "ibex_top.sv"), dst="ibex_top.sv"))
# FIXME: Patch ibex_top
os.system(f"patch -p0 < {os.path.dirname(os.path.realpath(__file__))}/ibex_top.patch")
platform.add_source("ibex_top.sv")
platform.add_source(os.path.join(ibexdir, "syn", "rtl", "prim_clock_gating.v")) platform.add_source(os.path.join(ibexdir, "syn", "rtl", "prim_clock_gating.v"))
platform.add_sources(os.path.join(opentitandir, "hw", "ip", "prim", "rtl"), platform.add_sources(os.path.join(opentitandir, "hw", "ip", "prim", "rtl"),
"prim_alert_pkg.sv", "prim_alert_pkg.sv",

View File

@ -0,0 +1,12 @@
diff --git a/ibex_top.sv b/ibex_top.sv
index c0148ea4e..eaf4d1533 100644
--- a/ibex_top.sv
+++ b/ibex_top.sv
@@ -8,6 +8,7 @@
`endif
`include "prim_assert.sv"
+`include "prim_ram_1p_pkg.sv"
/**
* Top level module of the ibex RISC-V core