mirror of
https://github.com/Silicon1602/srdl2sv.git
synced 2024-11-14 03:03:35 +00:00
Resolve bug for addrmaps without any genvars
In this case, there would be a line with `genvars ;`. This is not compilable by SystemVerilog compilers.
This commit is contained in:
parent
17f1877390
commit
240fba8e12
@ -264,13 +264,16 @@ class AddrMap(Component):
|
||||
|
||||
|
||||
def __append_genvars(self):
|
||||
genvars = ''.join([
|
||||
genvars = ', '.join([chr(97+i) for i in range(self.get_max_dim_depth())])
|
||||
|
||||
if genvars:
|
||||
genvars_instantiation = ''.join([
|
||||
'\ngenvar ',
|
||||
', '.join([chr(97+i) for i in range(self.get_max_dim_depth())]),
|
||||
genvars,
|
||||
';\n'
|
||||
])
|
||||
|
||||
self.rtl_header.append(genvars)
|
||||
self.rtl_header.append(genvars_instantiation)
|
||||
|
||||
def get_package_names(self) -> set():
|
||||
names = set()
|
||||
|
Loading…
Reference in New Issue
Block a user