Skip to content

Commit e2eb4be

Browse files
committed
Fix writing of overflow and saturation modes in fixpt
1 parent bc27599 commit e2eb4be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hls4ml/backends/libero/libero_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def definition_cpp(self):
103103
if args[2] == 'AP_TRN' and args[3] == 'AP_WRAP':
104104
# This is the default, so we won't write the full definition for brevity
105105
args[2] = args[3] = None
106+
else:
107+
args[2] = 'hls::' + str(args[2])
108+
args[3] = 'hls::' + str(args[3])
106109

107110
args = ','.join([str(arg) for arg in args if arg is not None])
108111
typestring = 'hls::ap_{signed}fixpt<{args}>'.format(signed='u' if not self.signed else '', args=args)

0 commit comments

Comments
 (0)