[top_earlgrey] Restructure top files
ip files are moved to under `hw/top_earlgrey/ip/{ip}/(rtl|doc|etc)/autogen`
top generated files are also moved to follow the convention.
diff --git a/hw/top_earlgrey/doc/top_earlgrey.gen.hjson b/hw/top_earlgrey/doc/autogen/top_earlgrey.gen.hjson
similarity index 100%
rename from hw/top_earlgrey/doc/top_earlgrey.gen.hjson
rename to hw/top_earlgrey/doc/autogen/top_earlgrey.gen.hjson
diff --git a/hw/top_earlgrey/ip/xbar/doc/xbar_main.gen.hjson b/hw/top_earlgrey/ip/xbar/doc/autogen/xbar_main.gen.hjson
similarity index 100%
rename from hw/top_earlgrey/ip/xbar/doc/xbar_main.gen.hjson
rename to hw/top_earlgrey/ip/xbar/doc/autogen/xbar_main.gen.hjson
diff --git a/hw/top_earlgrey/rtl/top_earlgrey.sv b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
similarity index 100%
rename from hw/top_earlgrey/rtl/top_earlgrey.sv
rename to hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
diff --git a/hw/top_earlgrey/top_earlgrey.core b/hw/top_earlgrey/top_earlgrey.core
index 985d86f..51ceb99 100644
--- a/hw/top_earlgrey/top_earlgrey.core
+++ b/hw/top_earlgrey/top_earlgrey.core
@@ -28,7 +28,7 @@
- ip/rv_plic/rtl/autogen/rv_plic_reg_top.sv
- ip/rv_plic/rtl/autogen/rv_plic.sv
- rtl/padctl.sv
- - rtl/top_earlgrey.sv
+ - rtl/autogen/top_earlgrey.sv
file_type: systemVerilogSource
parameters:
diff --git a/util/topgen.py b/util/topgen.py
index 388c2b0..aa27b3c 100755
--- a/util/topgen.py
+++ b/util/topgen.py
@@ -42,7 +42,7 @@
def generate_xbars(top, out_path):
- xbar_path = out_path / 'ip/xbar/doc'
+ xbar_path = out_path / 'ip/xbar/doc/autogen'
xbar_path.mkdir(parents=True, exist_ok=True)
gencmd = ("// util/topgen.py -t hw/top_earlgrey/doc/top_earlgrey.hjson "
"-o hw/top_earlgrey/\n\n")
@@ -354,7 +354,8 @@
# TODO: Add conversion logic from top to top.complete.hjson
completecfg = merge_top(topcfg, ip_objs, xbar_objs)
- genhjson_path = hjson_dir / ("top_%s.gen.hjson" % completecfg["name"])
+ genhjson_path = hjson_dir / ("autogen/top_%s.gen.hjson" %
+ completecfg["name"])
gencmd = (
"// util/topgen.py -t hw/top_earlgrey/doc/top_earlgrey.hjson --hjson-only "
"-o hw/top_earlgrey/\n")
@@ -393,7 +394,7 @@
top_tplpath = tpl_path / ("top_%s.tpl.sv" % (top_name))
out_top = generate_rtl(completecfg, str(top_tplpath))
- rtl_path = out_path / 'rtl'
+ rtl_path = out_path / 'rtl/autogen'
rtl_path.mkdir(parents=True, exist_ok=True)
top_path = rtl_path / ("top_%s.sv" % top_name)