mirror of
https://github.com/Silicon1602/srdl2sv.git
synced 2024-11-13 02:53:37 +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([
|
||||
'\ngenvar ',
|
||||
', '.join([chr(97+i) for i in range(self.get_max_dim_depth())]),
|
||||
';\n'
|
||||
])
|
||||
genvars = ', '.join([chr(97+i) for i in range(self.get_max_dim_depth())])
|
||||
|
||||
self.rtl_header.append(genvars)
|
||||
if genvars:
|
||||
genvars_instantiation = ''.join([
|
||||
'\ngenvar ',
|
||||
genvars,
|
||||
';\n'
|
||||
])
|
||||
|
||||
self.rtl_header.append(genvars_instantiation)
|
||||
|
||||
def get_package_names(self) -> set():
|
||||
names = set()
|
||||
|
Loading…
Reference in New Issue
Block a user