Overview
Padmaraj Ramachandran is listed as a Synopsys Inc. co-author, alongside Alex Wakefield, of the technical article "Generating AMD microcode stimuli using VCS constraint solver". The article also lists Gregory Tang and Rajat Bahl of AMD, Inc. as co-authors. [C1]
Technical context
The co-authored article addresses verification challenges in increasingly complex microprocessor designs. It describes the shift away from hand-written directed tests toward automated random test generators that create microcode test sequences and distribute stimulus across meaningful opcode and instruction-attribute values. [C2]
The article contrasts traditional sequential randomization of instruction fields with a hierarchical constrained-random approach. According to the article, sequential randomization can produce verbose, redundant code and provide limited control over distributions, while the hierarchical approach was explored to accelerate generation, reduce memory consumption, and support distribution control and biasing toward corner cases using the Synopsys VCS constraint solver. [C3]
SystemVerilog constraint-based generation
The article describes use of SystemVerilog constraint-language constructs to model microcode instructions in terms of possible attribute combinations and to control value distributions for individual fields. An initial prototype used a single class containing constraints for all opcodes; the article states that this prototype addressed flaws associated with sequential randomization methods. [C4]
The article then describes an object-oriented refinement in which a base class captured global constraints common to all opcodes, while derived subclasses represented groups of related opcodes with similar constraints. This hierarchical partitioning reduced memory requirements and improved performance. [C5]
Generator architecture described in the article
The opcode generator architecture in the article consists of two layers:
- an upper layer implemented with a SystemVerilog random sequence construct and weighted knobs for controlling high-level distribution; and
- a lower layer containing the opcode class, randomized with additional constraints and weights provided by the upper layer. [C6]
The tests are described as weighted values that direct the generator toward the desired mix of instructions, with the constraint solver applying the weights to control the distribution of opcode types. [C6]
Single-class and multi-class randomization
For single-class randomization, the article describes a flexible opcode class containing all opcodes, allowing constraints between any data members. The trade-off identified is slower randomization, because the solver must handle many random variables and a large constraint set. The article reports that the opcode class contained approximately 100 random variables and 800 constraint equations. [C7]
The article also describes splitting the opcode class into multiple smaller classes to reduce the size of the randomization problem. [C8]