Constant-current diode