Retrascope is a toolkit for Reverse Engineering and TRAnsformation of digital hardware designs described in such HDLs (hardware description languages) as Verilog and VHDL. The toolkit allows analyzing HDL descriptions, reconstructing the underlying models and using them for test generation, property checking and other tasks. Retrascope is organized as an extensible framework with the ability to add new types of models as well as tools for their analysis and transformation. The primary application domain of the toolkit is functional verification of hardware at the unit level.
Retrascope consists of three subsystems: 1) data representations (entities); 2) active components (engines); 3) library. Entities are either internal representations (models) of HDL descriptions or artifacts. Models are based on the HDL code and can either be extracted from it or generated through a sequence of transformations. Artifacts are built from models or described by the user (like specifications).Retrascope entities include the following:
- Control Flow Graph (CFG);
- Guarded Actions Decision Diagram (GADD);
- Extended Finite State Machine (EFSM);
- Input signals sequence (Test);
- Specification to be checked (Property).
- Transformer – transforms a model of one type to another type;
- Launcher – runs external tool on an entity;
- Generator – creates an artifact from an entity;
- Simulator – performs model’s execution;
- Printer – translates an entity into a graphical or text format;
- Parser – creates an entity from a text description.
On Fig. 1 the main flow of the Retrascope toolkit and several used engines are shown. Engines are shown as black round nodes, models are shown as rectangles and artifacts are shown as elliptic nodes. Data flows are shown as arrows, file reading/writing interactions are shown as dotted arrows. Model checker is not a part of Retrascope, so there is a possibility to change it.
Figure 1 : Hardware model checking flow in Retrascope
The engines cannot interact with each other. Instead, they can be combined in sequences, so-called toolchains. Two components can be combined if one of them returns an entity of some type and the other takes this entity as input. The library part of the Retrascope framework provides facilities to automatically build toolchains. Target types of engines and entities are user-defined. On Fig. 1 the following toolchain is shown: “ Parser (1), Parser (2), Transformer, Launcher, Parser (3), Printer ”. The user specifies the target entity and main engines and the toolkit constructs the required toolchain and applies it to input data.