semiconductor function