Hostname: page-component-77f85d65b8-pztms Total loading time: 0 Render date: 2026-03-28T11:23:40.178Z Has data issue: false hasContentIssue false

Fine-Grained Timing Analysis of Digital Integrated Circuits in Answer Set Programming

Published online by Cambridge University Press:  05 September 2025

ALESSANDRO BERTAGNON
Affiliation:
Department of Environmental and Prevention Sciences, University of Ferrara, Ferrara, Italy (e-mail: alessandro.bertagnon@unife.it)
MARCELLO DALPASSO
Affiliation:
DEI - University of Padova, Padova, Italy (e-mail: marcello.dalpasso@unipd.it)
MICHELE FAVALLI
Affiliation:
Department of Engineering, University of Ferrara, Ferrara, Italy (e-mail: michele.favalli@unife.it, marco.gavanelli@unife.it)
MARCO GAVANELLI
Affiliation:
Department of Engineering, University of Ferrara, Ferrara, Italy (e-mail: michele.favalli@unife.it, marco.gavanelli@unife.it)
Rights & Permissions [Opens in a new window]

Abstract

In the design of integrated circuits, one critical metric is the maximum delay introduced by combinational modules within the circuit. This delay is crucial because it represents the time required to perform a computation: in an Arithmetic Logic Unit, it represents the maximum time taken by the circuit to perform an arithmetic operation. When such a circuit is part of a larger, synchronous system, like a CPU, the maximum delay directly impacts the maximum clock frequency of the entire system. Typically, hardware designers use static timing analysis to compute an upper bound of the maximum delay because it can be determined in polynomial time. However, relying on this upper bound can lead to suboptimal processor speeds, thereby missing performance opportunities. In this work, we tackle the challenging task of computing the actual maximum delay, rather than an approximate value. Since the problem is computationally hard, we model it in answer set programming (ASP), a logic language featuring extremely efficient solvers. We propose non-trivial encodings of the problem into ASP. Experimental results show that ASP is a viable solution to address complex problems in hardware design.

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Fig. 1. Example of circuit featuring a false path that leads to pessimism in STA.

Figure 1

Fig. 2. (a) Example circuit and (b) corresponding signal waveforms.

Figure 2

Fig. 3. Examples of the application of equation (1). The shaded areas denote the interval between the early and the latest stabilization time. In such time regions, the signal value is not determined because we also account for multiple hazards. Each case shows the early arrival time (left) and the latest stabilization time (right) of the output, considering inputs with the controlling starting value 0 (a) and 1 (b), or the controlling final value 0 (c) and 1 (d).

Figure 3

Fig. 4. Example of timing waveforms featuring a potential hazard which, however, does not occur because of the relative timing of signals.

Figure 4

Fig. 5. Waveforms computed in the example circuit of Figure 1, in the case of maximum delay. The colored areas represent timings in which the value of the signals is undetermined. Waveforms automatically drawn with ASPECT (Bertagnon and Gavanelli, 2024a).

Figure 5

Fig. 6. Encoding in ASP of signals and logic gates, common to all the encodings.

Figure 6

Fig. 7. Time computation and optimization.

Figure 7

Table 1. Symbols in the mathematical formulation (Section 2) and in the ASP code

Figure 8

Fig. 8. Basic encoding.

Figure 9

Fig. 9. Advanced encoding.

Figure 10

Table 2. Benchmark results for a set of logic circuits using the two ASP encoding. For each circuit, the number of logic gates, solving and grounding times, and grounding sizes are reported. The final two columns show the maximum observed late output and the maximum delay from static timing analysis