MODULARIZACE SIMULÁTORU PORUCH ČÍSLICOVÝCH OBVODŮ

Abstract
Účelem této práce je v teoretické části se seznámit s  problematikou testování poruch číslicových obvodů a získané vědomosti pak aplikovat v praktické části, při analýze simulátoru chyb číslicových obvodů Fsim, který je psán v programovacím jazyce C. Tento simulátor pak bude nutné převést do objektového programovacího jazyka C++. K tomuto převodu jsou dva hlavní důvody, první z nich je zlepšení přehlednosti kódu a usnadnění další práce na tomto programu. To se má docílit nahrazením velkého množství různých struktur, v tomto programu použitých, prostředky ze standartních knihoven C++, které v prostém jazyce C chybí. Jiné struktury pak budou přepracovány na třídy a zapouzdřeny, z důvodů lepšího řízení přístupu k jejich vnitřním proměnným. Dále by se také měla zlepšit přehlednost tohoto programu převedením mnoha použitých maker na funkce, což by mělo zlepšit typovou bezpečnost a snížit riziko nechtěně destruktivního zásahu do programu. Druhým důvodem pro transformaci do C++ je příprava programu na další práci na něm, hlavně na jeho převedení na vícevláknový program, který byl schopen zpracovávat ve více různých vláknech více různých obvodů najednou. Tomuto procesu brání hlavně široké použití globálních a statických proměnných pro většinu hodnot, týkajících se dané simulace a jejího stavu. Pokud by se tak spustilo více simulací najednou, navzájem by si přepisovaly svoje hodnoty, a tím pádem by nemohly fungovat. Tento problém bude řešen zapouzdřením proměnných řídících danou simulaci do jedné třídy, která pak bude spravovat celou simulaci.Výsledný program pak bude nutné otestovat na správnost výsledků vůči původnímu programu na poskytnutých testovacích souborech obvodů, testovacích vektorů a seznamů chyb. Při tomto testu musí nový program dávat stejné výsledky jako program původní.
Purpose of this task in the theoretical part is to become acquainted with problematic of fault simulation on digital circuits. Then use this knowledge in the practical part of this task to analyze fault simulator of digital circuits called Fsim, which is written in programing language C. Then it is necessary to translate this fault simulator to object programing language C++. There are two main reasons for this. The first one is to make simulator's code more transparent and make it easier to work with for future development. This should be accomplished through usage of features of standard C++ library that are missing from plain C. Other structures will be transformed into C++ classes and encapsulated, for the purpose of easier management of access to inner variables. Transparency of this code could be enhanced by transforming this program's many macros into functions, which also enhances its type safety and decreases chance of unwantedly destructive interference with the code.Second main reason for transforming this program into C++ is preparation of this program for transformation into multi-thread program, which will be able to use multiple threads to simulate multiple circuits at once. This process is mainly prevented by wide use of global and static variables for majority of values responsible for managing running simulation and holding its status. If multiple simulations were run at the same time they would overwrite each other's variables and would not be capable of functioning properly. This problem will be solved by encapsulating variables responsible for managing simulation into one class that will be responsible for running whole simulation.The final program then must be tested to determine whether it gives the same results as the original program on provided testing files of circuits, testing vectors and fault lists.
Description
Subject(s)
simulace poruch, C, C++, číslicové obvody, fault simulation, C, C++, digital circuits
Citation
ISSN
ISBN