From a6534b7b6e3734cfd48ab910924b240ad0adfb86 Mon Sep 17 00:00:00 2001 From: Greg Chadwick Date: Tue, 29 Oct 2024 15:39:52 +0000 Subject: [PATCH] [top] Use new 'unpacked_dimensions' parameter field in templates Update both earlgrey and darjeeling templates Signed-off-by: Greg Chadwick --- hw/top_darjeeling/templates/toplevel.sv.tpl | 4 ++++ hw/top_earlgrey/templates/toplevel.sv.tpl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/hw/top_darjeeling/templates/toplevel.sv.tpl b/hw/top_darjeeling/templates/toplevel.sv.tpl index 0805edb7ae562..0b0962f2882ac 100644 --- a/hw/top_darjeeling/templates/toplevel.sv.tpl +++ b/hw/top_darjeeling/templates/toplevel.sv.tpl @@ -60,6 +60,10 @@ module top_${top["name"]} #( p_type_word = p_type + ' ' if p_type else '' p_lhs = f'{p_type_word}{p_exp["name_top"]}' + + if 'unpacked_dimensions' in p_exp: + p_lhs += p_exp['unpacked_dimensions'] + p_rhs = p_exp['default'] params_follow = not loop.last or loop.parent.index < last_modidx_with_params diff --git a/hw/top_earlgrey/templates/toplevel.sv.tpl b/hw/top_earlgrey/templates/toplevel.sv.tpl index d78088657f66c..87e9debf272e8 100644 --- a/hw/top_earlgrey/templates/toplevel.sv.tpl +++ b/hw/top_earlgrey/templates/toplevel.sv.tpl @@ -58,6 +58,10 @@ module top_${top["name"]} #( p_type_word = p_type + ' ' if p_type else '' p_lhs = f'{p_type_word}{p_exp["name_top"]}' + + if 'unpacked_dimensions' in p_exp: + p_lhs += p_exp['unpacked_dimensions'] + p_rhs = p_exp['default'] params_follow = not loop.last or loop.parent.index < last_modidx_with_params