In the hardware design process, hardware components are usually described in a hardware description language. Most of the hardware description languages, such as Verilog and VHDL, do not have mathematical foundation and hence are not fit for formal reasoning about the design. To enable formal reasoning in one of the most commonly used description language VHDL, we define a formal model of the VHDL language in Isabelle/HOL. Our model targets the functional part of VHDL designs used in industry, specifically the design of the LEON3 processor's integer unit. We cover a wide range of features in the VHDL language that are usually not modelled in the literature and define a novel operational semantics for it. Furthermore, our model can be exported to OCaml code for execution, turning the formal model into a VHDL simulator. We have tested our simulator against simple designs used in the literature, as well as the div32 module in the LEON3 design. The Isabelle/HOL code is publicly available: https://zhehou.github.io/apps/VHDLModel.zip
翻译:在硬件设计过程中,硬件组件通常以硬件描述语言描述,大多数硬件描述语言,如Verilog和VHDL,没有数学基础,因此不适合对设计进行正式推理。为了在最常用的描述语言VHDL中进行正式推理,我们定义了伊莎贝尔/HOL中VHDL语言的正式模型。我们的模型针对的是工业中VHDL设计中的功能部分,特别是LEON3处理器整数单元的设计。我们覆盖了VHDL语言中许多通常不以文献为模型的功能,并定义了一种新的操作语义。此外,我们的模型可以导出到OCaml代码执行,将正式模型变成VHDL模拟器。我们已经对照文献中使用的简单设计以及LEON3设计中的div32模块测试了我们的模拟器。Isabel/HOL代码可以公开查阅:https://zhehou.github.io/apps/VHDLModel.zip。