Skip to content

Commit

Permalink
Bugfix in conditional statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
honzastor committed Mar 22, 2023
1 parent b88c502 commit 7cf34d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ariths_gen/core/arithmetic_circuits/general_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ def get_circuit_gates(self, verilog_output: bool = False):
gates = []
for c in self.components:
if isinstance(c, TwoInputLogicGate):
if c.disable_generation is False and (verilog_output is False or (hasattr(self, "use_verilog_instance") and self.use_verilog_instance is False)) or hasattr(self, "use_verilog_instance") is False:
if c.disable_generation is False and (verilog_output is False or ((hasattr(self, "use_verilog_instance") and self.use_verilog_instance is False) or hasattr(self, "use_verilog_instance") is False)):
gates.append(c)
else:
# Check whether it is necessary to use gates for the Verilog component
# description (ArithsGen internally defined comp) or not (technology specific instance)
if verilog_output is False or (hasattr(c, "use_verilog_instance") and c.use_verilog_instance is False) or hasattr(c, "use_verilog_instance") is False:
if verilog_output is False or ((hasattr(c, "use_verilog_instance") and c.use_verilog_instance is False) or hasattr(c, "use_verilog_instance") is False):
gates.extend((c.get_circuit_gates(verilog_output)))
return gates

Expand Down

0 comments on commit 7cf34d0

Please sign in to comment.