# File lib/ruby-vpi/integer.rb, line 120 120: def extend_sign aOrigWidth, aExtWidth 121: result = self 122: maskWidth = aExtWidth - aOrigWidth 123: 124: if maskWidth > 0 && result[aOrigWidth - 1] == 1 125: result |= (maskWidth.to_mask << aOrigWidth) 126: end 127: 128: result & aExtWidth.to_mask 129: end