Overview
The HCL2U Translator is a tool described in the verification framework for pipelined Y86-64 microprocessors using UCLID5. Its role is to translate control logic written in HCL (Hardware Control Language) into UCLID5 macro definitions. In the framework, HCL2U is one of the programs used to generate UCLID5 files for specific verification tasks, alongside a Python program that performs file merging and option selection.
Role in the verification workflow
The verification framework generates UCLID5 files that each describe a model and verification script. Processor models are built by combining HCL-expressed control logic with frameworks for functional blocks and their interconnections. The generated processor models are then merged with files defining common data types, the overall system model, and the verification script. HCL2U performs the translation from HCL signal definitions into UCLID5 macro definitions, while a Python program performs merging and selection among modeling and verification options.
The framework was used in a task comparing the SEQ processor model against seven variants of PIPE for functional equivalence. The control logic for both SEQ and PIPE is written in HCL, and generating logic directly from the common HCL representation helps maintain consistency among simulation models, synthesizable hardware descriptions, and formal verification models.
Translation behavior
HCL2U generates a UCLID5 macro for each HCL signal definition. The translation is described as straightforward, but not designed to produce human-readable output.
Important translation rules include:
- HCL case expressions are translated into nested UCLID5
if-then-elseexpressions. - HCL set-membership tests are expanded into disjunctions of equality tests.
- Because HCL does not require a default case, the translator replicates the final
thenvalue as the finalelsevalue when constructing nestedif-then-elseexpressions.
Example: ALU input selection
The source evidence gives an example HCL signal definition for selecting input A to the ALU. The HCL definition selects among valA, valC, -8, and 8 based on the instruction code. HCL2U translates this into a UCLID5 macro named gen_aluA() returning common.word_t. The generated UCLID5 code uses nested if expressions and replaces membership tests such as icode in { IRRMOVQ, IOPQ } with equality disjunctions such as icode == IRRMOVQ || icode == IOPQ.
Design significance
Within the described framework, HCL2U helps ensure that the formal verification model uses control logic extracted from the same HCL descriptions used elsewhere. The evidence states that HCL had also been translated to C for simulation, to Verilog for logic synthesis, and to an earlier version of UCLID in prior work; using a common representation supports consistency across those generated artifacts.