The invention relates to a random
test vector generation device and method and a logic built-in self-
test structure and method, and the device comprises a random
vector generation module which is used for generating a random vector corresponding to each domain in all domains of an X86 instruction; the random instruction generation module is used for generating a random instruction aiming at the X86 instruction by utilizing the generated random vector aiming at each domain of the X86 instruction; the
instruction selection module is used for obtaining the length of a random instruction and selecting target random instructions according to the length of the random instruction and the generated random instruction, the selected
multiple target random instructions can be randomly combined into the random
test vector, and the random
test vector is output to the X86 instruction decoding module. Therefore, logic built-in self-testing can be effectively carried out on the X86 instruction decoding module.