class CSR_W1C(CSR): def __init__(self, size, name): CSR.__init__(self, size, name) self.sync += If(self.we, self.r.eq(self.r & ~self.w), )