There have been cases where malfunction occurs in semiconductor device such as a LSI or the like owing to external invasion of EMS. Therefore, in order to prevent malfunction, a countermeasure of EMS is provided to semiconductor device such as an LSI or the like.