# US 2021/0089695 A1 · Logic simulation of circuit designs using on-the-fly bit reduction for constraint solving

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0089695 A1
- Document ID: US20210089695A1
- Status: Published application
- Kind: A1
- Application number: 17/023,153
- Filed: 2020-09-16
- Published: 2021-03-25
- Earliest claimed: 2019-09-20
- Assignees: Synopsys, Inc.
- Applicants: Synopsys, Inc.
- Inventors: In-Ho Moon
- Web page: https://patentgrep.com/patent/US20210089695A1

## CPC

- G06F 7/72: using residue arithmetic
- G06F 30/367: Design verification, e.g. using simulation, simulation program with integrated circuit emphasis [SPICE], direct methods or relaxation methods
- G06F 7/446: {by partial product forming (with electric multiplication table)}
- G06F 7/727: {Modulo N arithmetic, with N being either (2**n)-1,2**n or (2**n)+1, e.g. mod 3, mod 4 or mod 5 (G06F7/728 takes precedence)}
- G06F 9/451: Execution arrangements for user interfaces
- G06F 30/327: Logic synthesis; Behaviour synthesis, e.g. mapping logic, HDL to netlist, high-level language to RTL or netlist
- G06F 30/3308: using simulation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system performs logic simulation of a circuit design specified using a hardware description language such as Verilog. The system performs constraint solving based on an expression specified in the specification of the circuit design. The system identifies required bits for each variable in the expression. The number of required bits is less than the number of bits specified in the variable declaration. The system performs bit-level constraint solving by performing a bit operation on the set of required bits and a simplified processing of the remaining bits of the variable. Since the original circuit design is preserved with the original bit-widths for simulation, those required bits are used on the fly internally during constraint solving. Furthermore, dynamic bit reductions on arithmetic operations are performed on the fly. The system improves computational efficiency by restricting bit operations to fewer bits of variables and operators of the expression.

## Claims

### Claim 1

A method for execution of expressions in logic simulation of a circuit design, the method comprising:
receiving a specification of the circuit design, the specification using a hardware declaration language;
receiving a request to perform logic simulation of the circuit design;
identifying an expression in the specification of the circuit design, the expression specifying an operation based on one or more variables, wherein the specification of the circuit design includes a declaration of the variable;
identifying a set of required bits for a variable used in the expression, wherein the number of required bits is less than the number of bits specified in the declaration of the variable;
performing, by a processor, bit-level constraint solving using the expression by limiting the operation to the set of required bits;
determining a result of logic simulation based on the processing of the logical expression; and
sending the results of the logic simulation for display.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
generating a netlist representation of the circuit design from the specification of the circuit design;
generating a bit representation of the input signal for the circuit design; and
propagating the input signal through the circuit design to determine results of the logic simulation.

### Claim 3 (depends on 1)

The method of claim 1, wherein the specification of the circuit design includes a register transfer level (RTL) description or a gate-level description.

### Claim 4 (depends on 1)

The method of claim 1, wherein performing bit-level constraint solving comprises generating a binary decision diagram (BDD) based on the required bits that is smaller than a BDD based on the variable as declared.

### Claim 5 (depends on 1)

The method of claim 1, wherein the number of required bits is determined based on a range of values stored in the variable.

### Claim 6 (depends on 1)

The method of claim 1, wherein the number of required bits is determined as a logarithm of the maximum of:
(a) absolute value of the largest possible value of the variable, or
(b) absolute value of the smallest possible value of the variable.

### Claim 7 (depends on 1)

The method of claim 1, wherein the expression includes a shift operation comprising a left operand shifted by a value of a right operand, the method comprising:
determining the required bits of the right operand as a set of least significant bits, wherein the size of the set of least significant bits is determined based on a logarithm of the number of bits of the left operand.

### Claim 8 (depends on 7)

The method of claim 7, the method further comprising:
determining saturation bits as a set of bits of the right operand that cause saturation of the left operand; and
determining the result of the expression based on the values of the saturation bits.

### Claim 9 (depends on 1)

The method of claim 1, wherein the expression includes a multiply operation, the method comprising, determining a number of required bits based on the number of bits of the size of a result of the expression.

### Claim 10 (depends on 9)

The method of claim 9, further comprising, determining a final result of the expression by repeating a plurality of times:
1) computing a partial product and
2) determining a partial sum by adding the partial product to the final result, wherein the partial product and the addition operation restricted to be performed within the required bits and a sign bit.

### Claim 11 (depends on 1)

The method of claim 1, wherein the expression includes a modulo operation, the method further comprising:
replacing the expression with a modulo by an equivalent expression based on multiplication.

### Claim 12 (depends on 1)

The method of claim 1, wherein expression includes multiplication and division, the method comprising:
determining a number of required bits based on the number of bits of the result of the expression; and
increasing the number of required bits by a value based on the divisor of the division operator.

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
providing the circuit design for manufacturing of the circuit.

### Claim 14

The non-transitory storage medium storing instructions that when executed by a processor, cause the processor to perform operations for executing expressions in logic simulation of a circuit design, the operations comprising:
receiving a specification of the circuit design;
identifying an expression in the specification of the circuit design, the expression specifying an operation based on one or more variables, wherein the specification of the circuit design includes a declaration of the variable;
identifying a set of required bits for a variable used in the expression, the number of required bits determined based on a limit on the value of the variable, wherein the number of required bits is less than the number of bits specified in the declaration of the variable;
performing bit-level constraint solving using the expression by limiting a processing of the operation to the set of required bits;
determining a result of logic simulation based on the processing of the logical expression; and
sending the results of the logic simulation for display.

### Claim 15 (depends on 14)

The non-transitory storage medium of claim 14, wherein the number of required bits is determined as a logarithm of the maximum of:
(a) absolute value of the largest possible value of the variable, or
(b) absolute value of the smallest possible value of the variable.

### Claim 16 (depends on 1)

The non-transitory storage medium of claim 1, wherein the expression includes a shift operation comprising a left operand shifted by a value of a right operand, the instructions further causing the processor to perform operations comprising:
determining the required bits of the right operand as a set of least significant bits, where in the size of the set of least significant bits is determined based on a logarithm of the number of bits of the left operand.

### Claim 17 (depends on 18)

The non-transitory storage medium of claim 18, the instructions further causing the processor to perform operations comprising:
determining saturation bits as a set of bits of the right operand that cause saturation of the left operand; and
determining the result of the expression based on the values of the saturation bits.

### Claim 18 (depends on 14)

The non-transitory storage medium of claim 14, wherein the expression includes a multiply operation, the operations further comprising: determining a number of required bits based on the number of bits of the size of a result of the expression.

### Claim 19 (depends on 18)

The non-transitory storage medium of claim 18, the instructions further causing the processor to perform operations comprising:
determining a final result by repeating a plurality of times:
1) computing a partial product and
2) determining a partial sum by adding the partial product to the final result, wherein the partial product and the addition operation restricted to be performed within the required bits and a sign bit.

### Claim 20

A system comprising:
a processor; and
a non-transitory storage medium storing instructions that when executed by the processor, cause the processor to perform operations for executing expressions in logic simulation of a circuit design, the operations comprising:
receiving a specification of the circuit design, the specification using a hardware description language;
receiving a request to perform logic simulation of the circuit design;
identifying an expression in the specification of the circuit design, the expression specifying an operation based on one or more variables, wherein the specification of the circuit design includes a declaration of the variable;
identifying a set of required bits for a variable used in the expression, the number of required bits determined based on a limit on the value of the variable, wherein the number of required bits is less than the number of bits specified in the declaration of the variable;
performing bit-level constraint solving using the expression by limiting a processing of the operation to the set of required bits;
determining a result of logic simulation based on the processing of the logical expression; and
sending the results of the logic simulation for display.
