According to one embodiment, a semiconductor device includes an internal circuit which is driven by a power supply voltage and is set in one of a first state and a second state in which an amount of current consumed by the internal circuit is greater than in the first state, and a wait control module. During a first period, a first pulse is sequentially applied to the plurality of groups, and a second pulse is sequentially applied to the plurality of sub-groups included in at least one of the plurality of groups during a second period following the first period. A variable gain circuit has as input connected to the first node, an input to accept a control signal, and an output to supply a gain-modified signal. This apparatus and method is particularly adapted to narrow zipper segments.