def mtvec_c(self): self.mtvec_mode.inside( vsc.rangelist(mtvec_mode_t.DIRECT, mtvec_mode_t.VECTORED)) with vsc.if_then(self.mtvec_mode == mtvec_mode_t.DIRECT): vsc.soft(self.tvec_alignment == 2) with vsc.else_then(): vsc.soft(self.tvec_alignment == (rcs.XLEN * 4) // 8)
def mtvec_c(self): self.mtvec_mode.inside( vsc.rangelist(mtvec_mode_t.DIRECT, mtvec_mode_t.VECTORED)) if (self.mtvec_mode == mtvec_mode_t.DIRECT): vsc.soft(self.tvec_alignment == 2) else: vsc.soft(self.tvec_alignment == (rcs.XLEN * 4) / 8)
def mtvec_c(self): self.mtvec_mode.inside(vsc.rangelist(self.supported_interrupt_mode)) with vsc.if_then(self.mtvec_mode == mtvec_mode_t.DIRECT): vsc.soft(self.tvec_alignment == 2) with vsc.else_then(): # Setting MODE = Vectored may impose an additional alignmentconstraint on BASE, # requiring up to 4×XLEN-byte alignment vsc.soft(self.tvec_alignment == self.tvec_ceil)
def valid_ab_c(self): self.a < self.b vsc.soft(self.a > 5) #A
def test_c(self): #self.a[0].value < 7 # Works vsc.soft(self.a[0].value == 5) # Fails self.a[0].value < self.a[1].value
def a_lt_b(self): vsc.soft(self.a < self.b) self.a > 0
def valid_ab_c(self): pass # vsc.soft(self.a < 5) #Case A: this is fine since it is a looser bound than the dist constraint vsc.soft(self.a > 5) #Case B: this throws off distribution; would have expected this soft constraint to be ignored as if it were commented out and distribution to follow 1:97:1:1)
def valid_ab_c(self): pass vsc.soft(self.a < 5) #Case A: this is fine since it is a looser bound than the dist constraint
def mtvec_c(self): self.mtvec_mode.inside(vsc.rangelist(self.supported_interrupt_mode)) with vsc.if_then(self.mtvec_mode == mtvec_mode_t.DIRECT): vsc.soft(self.tvec_alignment == 2) with vsc.else_then(): vsc.soft(self.tvec_alignment == self.tvec_ceil)