For the purpose of providing an inexpensive memory from which test results can
be certainly read out, a semiconductor device having a BIST circuit (built-in self
test circuit) includes a RAM for use in processing to be tested incorporated in
a data processing system, a built-in self test circuit making a built-in self test
on the RAM for use in processing, and a RAM for tester storing test results of
the RAM for use in processing obtained by the built-in self test circuit so that
the test results can be read out by an external tester, wherein a RAM having a
data read-out margin greater than a data read-out margin of the RAM for use in
processing is used as the RAM for tester.