from kratos import *
class Example(Generator):
def __init__(self,
area_opt=True):
super().__init__("example")
self.area_opt = area_opt
self._b = self.output("b", 2)
@always_comb
def tb_ctrl():
for i in range(2):
if i == 0 and self.area_opt:
# if i == 0:
self._b[i] = 0
else:
self._b[i] = 1
self.add_code(tb_ctrl)
if __name__ == "__main__":
example_dut = Example()
verilog(example_dut, filename="example.sv")
the following example code does not work