The invention discloses a programmable online kernel self-diagnosis implementation method and a storage medium. The method comprises the following steps: S1, constructing a
hardware architecture; s2, test excitation and signature pre-generation; s3,
software programmable configuration is carried out; the CPU sets a test mode, the number of execution SEEDs, test
granularity,
clock distribution and start / stop through the configuration register; s4, preparing before testing; s5, executing an
online test; reading SEED from the ROM, generating excitation by a Pattern generator, loading the excitation to a kernel
scan chain, capturing output, generating an MISR, and comparing the MISR with a GOLDEN MISR; s6, fault
processing and a safety mechanism; and S7, recovering after testing. The storage medium is realized based on the method. The method has the advantages of simple principle, wide application range, good flexibility,
high coverage rate and the like.