Comparison of bipolar and unipolar ionic diodes