diff --git a/b_asic/operation.py b/b_asic/operation.py index a1f3b7ca1ccd2f4f022afe4e46d80521f087ea41..c010ebb012983ae4a19141a63e3a7687e97188ad 100644 --- a/b_asic/operation.py +++ b/b_asic/operation.py @@ -195,6 +195,8 @@ class AbstractOperation(Operation, AbstractGraphComponent): if bits is None: args.append(input_values[i]) else: + if isinstance(input_values[i], complex): + raise TypeError("Complex value cannot be truncated to {bits} bits as requested by the signal connected to input #{i}") args.append(self.truncate_input(i, input_values[i], bits)) else: args.append(input_values[i])