In a semiconductor device capable of radio communication, a stable clock
signal is generated even if a reference clock signal for generating a
clock signal has varied frequencies in each cycle. A clock signal
generation circuit includes an edge detection circuit that detects an
edge of an input signal and generates a synchronization signal, a
reference clock signal generation circuit that generates a clock signal
which functions as reference, a counter circuit that counts the number of
edges of rise of the reference clock signal in accordance with the
synchronization signal, a duty ratio selection circuit that selects a
duty ratio of a clock signal from a count value, and a frequency division
circuit that generates the clock signal having the selected duty ratio.