Functional Type Expressions of Sequential Circuits with the Notion of Referring Forms
Abstract
This paper introduces the notion of referring forms as a new metric for analyzing sequential circuits from a functional perspective. Sequential circuits are modeled as causal stream functions, the outputs of which depend solely on the past and current inputs. Referring forms are defined based on the type expressions of functions and represent how a circuit refers to past inputs. The key contribution of this study is identifying a universal property in multiple clock domain circuits using referring forms. This theoretical framework is expected to enhance the comprehension and analysis of sequential circuits.
Index Terms:
sequential circuit, stream function, causal functionI Introduction
The primary expectation of digital circuits is functionality. We are concerned with how the circuit produces output when a sequential series of input values is provided, from an external perspective. Although the internal structure of a circuit that realizes this functionality is important, it can be considered as secondary. Further theoretical studies on the functionality of these circuits are warranted. We discuss digital circuits from a theoretical and functional perspective, without focusing on practical issues such as circuit design for a particular application. In this study, sequential circuits are viewed as causal functions, the outputs of which depend solely on past and current inputs and not on future inputs. We adopt type expressions to investigate these functions.
A previous study [1] adopted a similar approach, but with three profound differences. (1) Regarding background time, the previous study allowed an arbitrary partially ordered set as time, whereas this study considers stream functions; that is, only natural (ordinal) numbers are regarded as time, and this difference simplifies type expressions. (2) This study proposes the notion of referring forms, which appeared only implicitly in the previous paper. (3) The notion of time preservation was also proposed in the previous study, and multiple clock domain circuits were classified as time preserving without proof. In this study, the proof is provided.
The contribution of this work is that it proposes a new metric to investigate sequential circuits, namely referring forms, accompanied by the revelation of a universal property of multiple clock domain circuits. We expect that these results will enhance the understanding of sequential circuits.
II Preliminaries
II-A Types of Causal Stream Functions
From a theoretical perspective, sequential circuits are described using Mealy machines (or Mealy automata) [2, 3]. For arbitrary sets and , a Mealy machine with input and output consists of a set of states and transition function . When a previous state and current input are provided, a tuple of the current output and state is derived. For a given initial state, the Mealy machine behaves as a causal stream function of type , where denotes the natural numbers , excluding zero, as ordinal numbers. (We also use for later.) Domain and codomain represent infinite input and output streams over time; that is, the input and output signals, respectively. Causal means that the current output depends only on past and current inputs and not on future inputs.
This function is constructed from the transition function of the Mealy machine, as follows: Given an initial state and a finite input stream , the output stream is determined by . Conversely, [4] proved that an arbitrary causal stream function can be represented using the corresponding Mealy machine. Therefore, we investigate the causal stream functions instead of Mealy machines.
We consider a causal stream function . Because it is causal, the -th output depends on an -length input stream , and can be expressed by a family of functions . We denote this function family as
(1) |
to simplify the later expressions.
We must consider the product type of the input to develop our theory further. When the input of the causal stream functions (1) is converted into the product , it becomes and the type is isomorphic to
(2) |
by Currying. Note that the two pluses above must be interpreted as the same number; that is, in the expression of function families, which differs from the usual definition .
II-B Dependent Types
We also require notions of the dependent types [5, 6] for sets and elements instead of types and terms. For given and , a subset is defined as
(3) |
where represents a domain and an arbitrary is obtained from for later expressions. In this study, denotes a domain with dependent types, as explained above, and denotes the usual proposition.
III Referring Forms
III-A Definition
For functions with two-part inputs, such as (2), we introduce the notion that a given first input restricts the second input domain. To express this notion, we use dependent types and consider
(6) |
where denotes the power sets. We use the control input and data input instead of and in (2). The second domain of the upper expression in (6) is not the entire data input , but only part of it, as if it were filtered based on the control input . For example, for given and , means that can refer to all past inputs, whereas means that can refer to the current input only. In addition, we assume that a given first value of does not influence the final function ; that is, implies .
Our model can be made more precise by focusing on the first and final time steps. In the first time step, no past is referred to; thus, must be modified to . In the final time step, the current input is always referred to, because we consider Mealy machines. Finally, we obtain the following definition, originally proposed in [1]:
Definition 1.
(Domain restriction.) For given control input and data input , Mealy machines as causal stream functions with domain restrictions, as follows:
(9) |
and is known as a restriction map.
The current input is always provided, and the restriction map considers only past inputs and not current inputs. A restriction map comprehends how the circuit refers to the past with the passage of time.
The notion of domain restriction (9) contains the control signal ; however, to study the reference method, we only require the image . We omit the control signal from the expression of the domain restriction (9), which helps us to observe how the circuit refers to past inputs easily.
Definition 2.
(Referring forms.) For a causal stream function that can be expressed as
(10) |
is the referring form.
Roughly, referring forms represent a memory element of the target circuit and a given control signal to the memory element; they provide the manner in which the circuit refers to past inputs. When (10) is precisely expressed as a family of functions,
(11) |
and the referring form is . The set can be regarded as and approximately .
III-B Examples


We present an example of referring forms for a D-flip-flop (D-FF) as a sequential circuit, with data input , output , and a clock. Because the D-FF holds the input value at the latest edge of the clock, the referring form behaves as shown in Fig. 3; during time , provides the input value at , following which provides the input value at . An excerpt from the overall type expressions is as follows:
where means that the current input is not referred to by the D-FF. Note that the referring form shown in Fig. 3 is regarded as because and may be intuitively comprehensible. Henceforth, this isomorphism is sometimes used implicitly.
Owing to the abstractness of types, we can express a class of circuits such as synchronous circuits, as shown in Fig. LABEL:fig:Sync(a), in an expression; the referring form is shown in (b). The input is held and can be referred to at every edge of the clock. Unlike D-FFs, synchronous circuits can potentially refer to all past inputs at the clock edges through their feedback loop.
Next, we consider multiple clock domain circuits, as shown in Fig. 3. With the general description, their referring form becomes the same that of as Fig. LABEL:fig:Sync(b) for synchronous circuits because every FF may hold data from the input and outputs from all of the FFs. In fact, when multiple clock domains are required, multiple parts should independently have different clock domains; for instance, Fig. LABEL:fig:2CDin(a) has to latch input , followed by the general domain circuit. The referring form in Fig. LABEL:fig:2CDin(b) indicates that the latest input latched by is delivered to the domain when ticks.
IV Time Preservation
In the previous section, each referring form was studied individually. In this section, we investigate the universal properties of a set of referring forms representing a particular circuit. For a set of referring forms , each referring form is , and we denote the unified image as . As has an order, we can consider whether the unified image has an order preserved by each .
Definition 3.
(Time preservation.) A set of referring forms is time preserving when image has a partial order and each becomes order preserving.
Time preservation can be interpreted as the image that maintains the concept of time in the original environment.
We focus on multiple clock domain circuits, as shown in Fig. 3, and study their referring forms in detail. To generate the output at , the circuits can refer to the previous input if it has been latched by some FFs, as well as to the earlier input if it has been latched at and held at . This approach can be described using a pseudo-directed graph, as shown in Fig. 10(a), which allows us to determine which inputs can be referred to each output by tracking arrows. The nodes represent D-FFs, which connect only one of their two input arrows to the output arrow depending on their attribute latch or hold, as with a multiplexer. The circular nodes represent combinational circuits, and in this context, we consider their connections rather than their logic. When we consider these nodes as all input arrows connected to all output arrows, the subject circuits become abstract multiple clock domain circuits. However, when we consider that these nodes are one of every possible input-output connection, this corresponds to considering arbitrary circuits in the form of Fig. 3, and we take the latter stance. Thus, the pseudo-graph in Fig. 10(a) describes referring forms of multiple clock domain circuits (Fig. 3).


Lemma.
Let be a referring form of multiple clock domain circuits. If contains at , for an arbitrary , there exists and contains at .
Proof.
We can prove this by contradiction. Assume that are . According to , we assume that the path on the left side in Fig. 10(a), in which is connected to through , which we name an “earlier path.” Subsequently, we focus on the path towards as the right-hand side path in Fig. 10(a), and we observe that the latest FF is connected to via the combination node because of the assumption. If the attributes of are all held after the earlier path, the path towards is connected to the earlier path and becomes ; thus, a latch attribute exists at some point. Next, is connected to and we replicate the same argument. Finally, is connected to input at some point after , which contradicts this assumption. ∎
We can now state the theorem of a universal property for multiple clock domain circuits.
Theorem.
The referring forms for multiple clock domain circuits (as shown in Fig. 3) are time preserving.
Proof.
Let be the set of referring forms. We aim to define the order on as the order derived by each , but we must confirm its well-definedness by contradiction. Assuming that antisymmetry does not hold, we have and s.t.
Focusing on the latest appearance in , according to the Lemma, appears later in . As , another later appears in , and from , those appearances occur at the same time. For the second-latest appearance, we can reprise the same argument, and finally, we obtain , which contradicts the assumption. ∎
Finally, we present a non-time-preserving example. Fig. LABEL:fig:2mem(a) is a circuit with two data inputs and , three control inputs , and , and two memories that can be read selectively. Two referring forms, and , are shown in Fig. LABEL:fig:2mem(b) and (c), respectively, and assuming that both undescribed pasts are the same, we cannot provide the order between and on the united image of the referring forms.
V Conclusion
We have introduced referring forms as a novel approach for investigating the functional properties of sequential circuits. Referring forms capture the transition behavior of circuits, specifically how past inputs are used to generate current outputs. We defined the concept of time preservation for referring forms and demonstrated that multiple clock domain circuits exhibit this property. This study provides a behavioral perspective on sequential circuits and offers new insights into their analysis and design. We hope that future research will explore further theoretical developments and practical applications of referring forms in digital circuits.
References
- [1] S. Nishimura, “Classification of sequential circuits as causal functions,” in Journal of Physics: Conference Series (6th International Conference on Circuits, Systems and Simulation), vol. 2613, 2023, p. 012016.
- [2] G. H. Mealy, “A method for synthesizing sequential circuits,” The Bell System Technical Journal, vol. 34, no. 5, pp. 1045–1079, 1955.
- [3] M. Holcombe and W. M. L. Holcombe, Algebraic automata theory. Cambridge University Press, 2004, no. 1.
- [4] J. J. Rutten, “Algebraic specification and coalgebraic synthesis of mealy automata,” Electronic Notes in Theoretical Computer Science, vol. 160, pp. 305–319, 2006.
- [5] P. Martin-Löf, “An intuitionistic theory of types: Predicative part,” in Studies in Logic and the Foundations of Mathematics. Elsevier, 1975, vol. 80, pp. 73–118.
- [6] A. Chlipala, Certified programming with dependent types: a pragmatic introduction to the Coq proof assistant. MIT Press, 2022.