【正文】
n one of HDL languages such as VHDL or VERILOG and then injecting faults in desired points and observed important targets. We have used simulationbased fault injection since it has capability of high controllability and high observability pared to other fault injection methods.Simulationbased fault injection is used in several works. In [3], an analysis of the 華南理工大學畢業(yè)設(shè)計(論文)1effect of transient faults on Algha 21264 and AMD Athlon by simulationbased fault injection was characterized. An analysis of the effects of faults in the cache memories of the SPARC V8 architecture by simulationbased fault injection was reported in [4]. The effect of temporary faults located in the pipeline stages and cache memories is studied in [5]. In [6] fault injection using heavy ions proved the efficiency of the LEONFT microprocessor. In [7] the behavior of SEUs on the 8051 microcontroller protected by a single error correction code is analyzed. In [8] simulationbased fault injection in a 32bit processor, namely DP32 and an arithmetic processor called ARP is done and the effect of faults in the various points of these processors is reported. An analysis of the effects and propagation of faults in the 32bit OpenRisc1200 microprocessor by simulationbased fault injection is done in [9].This paper presents an analyzing of fault effects and propagations in one of AVR microcontroller families, named ATmega103(L). This microcontroller is a good candidate for being studied, for several reasons: 1) This microcontroller is high performance and low power RISC architecture and has many useful peripheral features such as Analog parator, Watchdogtimer, Universal Asynchronous Receiver/Transmitter (UART) and etc [11], 2) This microcontroller is the most wellknown among industrial applications, 3) It is used in many highcritical applications in recent years, such as modern automotives [12], airplanes [13], air traffic controllers [14], military applications, hospital equipments, nuclear equipments [10, 14] that any bugs can effect serious damage on human life, therefore finding out behavior of the AVR microcontroller against various faults and tolerating AVR architecture against faults is necessary .The reminder of this paper is posed of four sections. Section 2 describes an overview of the AVR microcontroller architecture, section 3 presents the characteristics of simulationbased fault injection and fault characteristics. Fault injection results and data analyzing are presented in section 4 and finally section 5 concludes the paper.華南理工大學畢業(yè)設(shè)計(論文)2 Microcontroller ArchitectureAVR microcontroller is a highperformance and low power microcontroller which utilized Harvard architecture. AVRs are generally classified into four groups: 1) tinyAVRs, 2) megaAVRs, 3) xmegaAVRS and 4) specific AVRS. megaAVRs have special features not found on other members of the AVR families such as LCD controller, USB controller, CAN [10, 14], therefore a member of megaAVRs named ATmega103(L) is studied here.ATmega103(L) is a 8bit RISC architecture that executes powerful instruction set in a single clock cycle and this feature allowing the designer to optimize power consumption versus speed. Rich instruction set with 32 general working registers that are directly connected to the ALU and various addressing modes is a major architectural benefit in the design of ATmega103(L). An overview of the ATmega103(L) architecture is shown in Figure 1. It has 8bit DataBuss, 16bit Address Buss that feeds through DataBuss, 16bit Program Counter (PC), 12bit InstructionRegister (IR) and many additional features such as 128K bytes of insystem programmable flash, 4K bytes SRAM memory, real time counters, UART and etc.Figure 2 illustrates the core of ATmega103(L) without peripheral features, moreover fault injection points are shown in that figure. As shown in Figure 2, all points of core in AVR ATmega103(L) are chosen for fault injection and therefore the 華南理工大學畢業(yè)設(shè)計(論文)3results can specify exhaustively the behavior of AVR microcontroller in the presence of various transient faults. Injection CharacteristicsThree wellknown workloads are considered in fault injection experiments [4, 5, 8, 9 and 15], the Quick Sort, the Matrix Multiplication and the linked List manager for insert and delete nodes in the linked List. Thanks to these wellknow workloads, we can pare the results of fault injection experiments with other related work. The workloads are coded in C++ and are piled with CodeVisionAVR C Compiler [16, 17] which can generates machine code for the ATmega103(L) microcontroller.The SINJECT fault injection tool [8] is used for injecting different fault models into the VHDL model of the ATmega103(L) [18], for all of workloads, the same set of fault injection is used.In the experiments, transient faults were injected only in the core of microcontroller. These faults have not been injected in the peripheral devices such as Universal Asynchronous Receiver/Transmitter (UART) and timers since these parts play no role in executing implicit workloads. The faults were injected in different parts of the core including the ALU, the ControlUnit, the PC register, the Registerfile, the IR register and the programmable memory.華南理工大學畢業(yè)設(shè)計(論文)4For having prehensive fault injection experiments, different fault models are considered for various parts of the ATmega103(L) microcontroller, so gatereplacement model is considered for inside the ALU and stuckatfault model considered for inputs and outputs of the ALU unit. The PC, IR and Registerfile consisting of registers so bitflip model are considered for these parts and stuckat and bridging model are considered in inputs and outputs wires of these parts. The ControlUnit of this microcontroller is described in behavioral level so it is poss