I have the following at the output of a PTAT and CTAT which are ok. The problem is that the mirrored current has an offset, which is further amplified when i double it at the output.
Your digital-trimmed cascode mirror has not one tap with
a dead match 1:1 ratio. Is the problem really a current
offset, or is it a current ratio problem? Seems to me like
the trim scheme is not ideal.
The L=40 mirror rack seems still prone to have lambda
error, why not a P cascode?