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