# File lib/ruby-vpi/integer.rb, line 89
89:   def pack aPackedWidth
90:     bits = length
91:     bits += 1 if self > 0 # positive integers also have a sign bit (zero)
92: 
93:     unless aPackedWidth >= bits
94:       raise ArgumentError, "packed width #{aPackedWidth} must be at least #{bits} for integer #{self}"
95:     end
96: 
97:     extend_sign(bits, aPackedWidth)
98:   end