CN113255257B - S box circuit optimization method and system based on process library - Google Patents

S box circuit optimization method and system based on process library Download PDF

Info

Publication number
CN113255257B
CN113255257B CN202110579580.4A CN202110579580A CN113255257B CN 113255257 B CN113255257 B CN 113255257B CN 202110579580 A CN202110579580 A CN 202110579580A CN 113255257 B CN113255257 B CN 113255257B
Authority
CN
China
Prior art keywords
circuit
node
search tree
areas
process library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110579580.4A
Other languages
Chinese (zh)
Other versions
CN113255257A (en
Inventor
王美琴
孙思维
樊燕红
吴立轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University
Institute of Information Engineering of CAS
Original Assignee
Shandong University
Institute of Information Engineering of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong University, Institute of Information Engineering of CAS filed Critical Shandong University
Priority to CN202110579580.4A priority Critical patent/CN113255257B/en
Publication of CN113255257A publication Critical patent/CN113255257A/en
Application granted granted Critical
Publication of CN113255257B publication Critical patent/CN113255257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/33Design verification, e.g. functional simulation or model checking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/327Logic synthesis; Behaviour synthesis, e.g. mapping logic, HDL to netlist, high-level language to RTL or netlist

Abstract

The invention belongs to the field of circuit optimization, and provides a process library-based S-box circuit optimization method and system, wherein the method comprises the following steps: taking the root node as an initial circuit, and performing single gate expansion on the source node according to each target node to build a search tree layer by layer; the circuit areas of the nodes on the same layer of the search tree are the same, and the difference between the areas of the nodes on the two adjacent layers is the greatest common divisor of the areas of all standard unit gate circuits in the set process library; and stopping constructing the search tree on the condition that the first-appearing node meets the circuit of the given Boolean function F to obtain the circuit of the Boolean function F with the minimum area.

Description

S box circuit optimization method and system based on process library
Technical Field
The invention belongs to the field of circuit optimization, and particularly relates to an S-box circuit optimization method and system based on a process library.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
The importance of Application Specific Integrated Circuit (ASIC) design is becoming increasingly prominent in the digital information age. The key element logic synthesis in ASIC design optimizes high level function or digital circuit description language mapping to a representation of gate level circuits. The logic synthesis link plays a crucial role in generating ASICs with low implementation cost and high performance. Therefore, the development of logic synthesis techniques and tools is a fundamental issue in the field of digital design. In the field of lightweight symmetric cryptography, an effective logic synthesis tool can directly and indirectly influence the hardware implementation performance of a cryptographic algorithm. The synthesis tool can be used to guide the design of cryptographic components and to optimize existing cryptographic components.
And guiding the design of the password component. A typical lightweight cryptographic algorithm is designed as follows, i need to select some components like MDS matrix and S-box to instantiate the algorithm after the overall architecture of the cryptographic algorithm is determined. In the step of designing the selected components, under some constraints (such as security and time delay), some optimization strategies (such as area) are specified, and the password components of the selected targets are searched from some candidate components. How the performance of the search selection component depends to a large extent on the effectiveness of the integration technique. A good comprehensive tool can help designers select high-quality and low-implementation-cost password components.
Existing cryptographic components are optimized. For a given cryptographic algorithm, the synthesis tool is able to generate circuits that satisfy various area and delay constraints to meet the practical application requirements of the cryptographic algorithm product. One way to optimize a cryptographic algorithm is to optimize the performance of the implementation of the cryptographic component. For example, many documents focus mainly on the optimization of the areas of MDS matrices and S-boxes.
The final implementation circuit of the cryptographic algorithm depends on a specific process library to be constructed, but most synthesis tools cannot directly convert a given design into a unit circuit of a target library due to complexity problems. In contrast, the process of circuit synthesis is typically accomplished in a two-step approach, where the first step is process library independent, using an abstract mathematical representation, with only limited logic gates (e.g., AND, OR, NOT) in the process library. In this step, many CAD tools often employ techniques such as two-level logic optimization methods or multi-level logic optimization methods. The resulting process-independent optimization design may ultimately be used to implement gate-level circuits of cryptographic algorithms under any particular library of process cells via process mapping techniques. This method is very efficient for medium-scale building blocks and is widely used in practice. However, the inventors have found that splitting the process into these separate stages can result in performance loss, e.g., the output of the first stage may not match the target architecture.
Disclosure of Invention
In order to solve the technical problems in the background art, the invention provides an optimization method and system of an S-box circuit based on a process library, which can quickly and accurately optimize the S-box circuit.
In order to achieve the purpose, the invention adopts the following technical scheme:
the first aspect of the invention provides a process library-based optimization method for an S-box circuit, which comprises the following steps:
taking the root node as an initial circuit, and performing single gate expansion on the source node according to each target node to build a search tree layer by layer; the circuit areas of the nodes on the same layer of the search tree are the same, and the difference between the areas of the nodes on the two adjacent layers is the greatest common divisor of the areas of all standard unit gate circuits in the set process library;
and stopping building the search tree on the condition that the first node is generated and meets the circuit of the given Boolean function F, so as to obtain the circuit of the Boolean function F with the minimum area.
A second aspect of the invention provides a process library-based optimization system for an S-box circuit.
A system for optimization of S-box circuitry based on a process library, comprising:
the search tree building module is used for building a search tree layer by taking the root node as an initial circuit and performing single gate expansion on the source node according to each target node; the circuit areas of the nodes on the same layer of the search tree are the same, and the difference between the areas of the nodes on the two adjacent layers is the greatest common divisor of the areas of all standard unit gate circuits in the set process library;
and the minimum area circuit searching module is used for stopping building the search tree on the condition that the first occurrence node meets the circuit of the given Boolean function F to obtain the circuit of the Boolean function F with the minimum area.
A third aspect of the invention provides a computer-readable storage medium.
A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps in the optimization method of S-box circuits based on process libraries as described above.
A fourth aspect of the invention provides a computer apparatus.
A computer apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program implementing the steps in the process library-based S-box circuit optimization method as described above.
Compared with the prior art, the invention has the beneficial effects that:
the method comprises the steps of constructing a search tree construction module, taking root nodes as initial circuits, performing single gate expansion on each target node by a source node to construct a search tree layer by layer, wherein the circuit areas of the same layer of nodes of the search tree are the same, the difference between the areas of two adjacent layers of nodes is the greatest common divisor of the areas of all standard unit gate circuits in a set process library, and finally stopping constructing the search tree by taking the circuit with the node appearing for the first time meeting a given Boolean function F as a condition to obtain the circuit with the Boolean function F with the smallest area, so that an S-box circuit is quickly and accurately optimized.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention.
FIG. 1 (a) is a three-input circuit depicting the definition of a signal sequence and a gate sequence;
FIG. 1 (b) is a four-input circuit depicting the definition of a signal sequence and a gate sequence;
FIG. 2 (a) is a representation of a circuit with various signal-gate sequences 1;
FIG. 2 (b) is a representation of a circuit with various signal-gate sequences 2;
FIG. 3 (a) is a simple circuit 1 illustrating a single gate extension;
FIG. 3 (b) is a simple circuit 2 illustrating a single gate extension;
FIG. 4 is a visualization of a search space of an embodiment of the present invention;
FIG. 5 is a process diagram of the optimization method of the S-box circuit based on the process library according to the embodiment of the invention;
FIG. 6 is a flowchart of a method for optimizing S-box circuitry based on a process library according to an embodiment of the present invention.
Detailed Description
The invention is further described with reference to the following figures and examples.
It is to be understood that the following detailed description is exemplary and is intended to provide further explanation of the invention as claimed. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
Example one
The minimization of Boolean expressions is well known
Figure BDA0003085554310000051
The completely difficult problem. Circuit minimization is a problem that has been studied in the art of circuit synthesis and circuit optimization in general, but introduces another level of complexity because process-independent representations (such as boolean expressions and truth tables) are eventually converted to netlists of target process library cells during synthesis. To address these complexities, the industry typically divides the integrated process into two steps: process independent optimization and process mapping. At each step, this method simply attempts to find the current best solution and relies heavily on heuristic methods rather than systematic searching. However, for small S-boxes, the present embodiment can search the design space more systematically. For global optimization, the method provided by the embodiment can directly synthesize the truth table of the small S box into the netlist of the target process library unit. The method of the present embodiment produces superior circuit implementation results for many S-boxes compared to existing state-of-the-art synthesis tools. In particular, by applying the method of the present embodiment to AESInvolving in S-box tower domain implementation
Figure BDA0003085554310000052
Inverter, the present embodiment can achieve the lightest circuit implementation of AES S-box at present.
The embodiment can find the optimized implementation of the small S box under a specific process library according to the logic unit gate in the process library. We propose a synthesis algorithm that can guarantee that the area of the synthesized 3 x 3S-boxes is optimal. The algorithm can also be applied to the optimization implementation of 4 x 4S boxes, and the optimization performance is improved compared with other optimization tools. For in AES S box tower domain
Figure BDA0003085554310000053
A subassembly that the tool can optimize and generate an AES S box minimum area implementation circuit.
Specifically, as shown in fig. 5 and fig. 6, the method for optimizing the S-box circuit based on the process library of the present embodiment includes:
step S101: taking the root node as an initial circuit, and performing single gate expansion on the source node according to each target node to build a search tree layer by layer; the circuit areas of the same layer of nodes of the search tree are the same, and the difference between the areas of the two adjacent layers of nodes is the greatest common divisor of the areas of all standard unit gate circuits in the set process library.
Step S102: and stopping constructing the search tree on the condition that the first-appearing node meets the circuit of the given Boolean function F to obtain the circuit of the Boolean function F with the minimum area.
Specifically, an ordered set of n elements is defined as
Figure BDA0003085554310000061
In this embodiment, there are no allowed duplicate elements, so all elements in the ordered set are different. When the order is not important, we use
Figure BDA0003085554310000062
To represent the set z 0 ,…,z n-1 }。For an ordered or unordered set->
Figure BDA0003085554310000063
Represents->
Figure BDA0003085554310000064
Is->
Figure BDA0003085554310000065
An ordered subset of (c). E.g. to make->
Figure BDA0003085554310000066
Then all binary ordered subsets are combined as:
Figure BDA0003085554310000067
logic gates and combinational circuits:
logic gates are the basic building blocks of combinational logic circuits. A logic gate corresponds to a boolean function of one or more inputs. Logic gates in a frequently used CMOS process library are listed in table 1. The number of input bits of gate β is defined as # β. From table 1, # NOT =1, # NAND =2, and # OAI21=3 are derived. For a logic gate β, β (x) of # β = l 0 ,…,x l-1 ) Expressed as a Boolean expression with l input variables (x) 0 ,…,x l-1 ) Beta of (c) is related. For example, MUX (x) 0 ,x 1 ,x 2 )=x 0 x 1 +x 0 x 2 +x 2 The order of the variables requires attention, MUX (x) 0 ,x 2 ,x 1 )=x 0 x 2 +x 0 x 1 +x 1 And MUX (x) 0 ,x 1 ,x 2 ) Different.
TABLE 1 logic gates commonly used in CMOS Process libraries
Figure BDA0003085554310000068
Figure BDA0003085554310000071
Logic synthesis is the process of combining a logic circuit that implements a given boolean function using a known set of basic logic gates. It is not hard to imagine that the design space of a moderately complex vector boolean function is very large, and how to determine the optimal implementation for a certain target is a fundamental problem in logic design. To facilitate our discussion, we introduce some definitions.
Definition of
Figure BDA0003085554310000072
Is a collection of logic gates, uses->
Figure BDA0003085554310000073
To construct a combined circuit, called->
Figure BDA0003085554310000074
An electrical circuit. With N-bit input (x) 0 ,…,x n-1 ) Is/are>
Figure BDA0003085554310000075
The electricity may be represented as a sequence of signals
Figure BDA0003085554310000076
A sequence of gate signal pairs:
Figure BDA0003085554310000077
Figure BDA0003085554310000078
thus, when 1. Ltoreq. I < t, the following expression x exists n+i-1 =β i-1 (x i-1 ). Symbol x j (n.ltoreq.j < n + t) represents a variable { x [) 0 ,x 1 ,…,x j-1 A Boolean function of, in fact, also can be viewed as a variable of { x } 0 ,x 1 ,…,x n-1 ) A boolean function of (a). Let us call x 0 ,…,x n-1 As an input signal, x n ,…,x n+t-1 Is the derivative signal. The signal sequence is
Figure BDA00030855543100000711
And a gate sequence of>
Figure BDA0003085554310000079
The corresponding circuit is defined as->
Figure BDA00030855543100000710
The detailed description is given by way of example. />
Example 1. Order
Figure BDA0003085554310000081
And is
Figure BDA0003085554310000082
Then
Figure BDA0003085554310000083
Circuit>
Figure BDA0003085554310000084
See fig. 1 (a), corresponding circuit in fig. 1 (b)
Figure BDA0003085554310000085
The expression of (c) is as follows:
Figure BDA0003085554310000086
it is noted that for a given circuitThe representation of the signal sequence and the gate sequence is not exclusive. Taking fig. 2 (a) and 2 (b) as an example, the circuit in the figure can be represented as
Figure BDA0003085554310000087
Or->
Figure BDA0003085554310000088
The specific expression mode is as follows:
Figure BDA0003085554310000089
or
Figure BDA00030855543100000810
Therefore, such repetitions need to be carefully excluded in the search algorithm.
Area:
given a set of doors
Figure BDA00030855543100000811
For each door>
Figure BDA00030855543100000812
The area of the gate is defined as beta, which is a positive value. E.g. to make->
Figure BDA00030855543100000813
Their absolute area is 0.532um 2 ,0.798um 2 ,1.064um 2 ,0.798um 2 And 2.394um 2 . Converted to equivalent Gate (GE) units, they correspond to 0.67GE, 1.00GE, 1.33GE, 1.00GE, and 3.00GE, respectively. The relative implementation cost is the most fundamental in the algorithm, and the area of the gate is set to be:
||NOT||=0.67×100=67,||NAND||=1.00×100=100,
OR | =1.33 × 100=133, | | NOR | =1.00 × 100=100, and | | XOR | =3.00 × 100=300.
The algorithm principle is as follows:
order to
Figure BDA0003085554310000091
Is a collection of logic gates, is asserted>
Figure BDA0003085554310000092
Is a kind of>
Figure BDA0003085554310000093
Circuit->
Figure BDA0003085554310000094
If and only if the following conditions are met:
Figure BDA0003085554310000095
Figure BDA00030855543100000932
the circuit implements a vector Boolean function
Figure BDA0003085554310000096
Will (x) 0 ,…,x n-1 ) Is converted into
(f 0 (x 0 ,…,x n-1 ),…,f m-1 (x 0 ,…,x n-1 ))。
The goal of the algorithm is to Boolean function for a given vector
Figure BDA0003085554310000097
Search for a minimum area>
Figure BDA0003085554310000098
An electrical circuit. Initial circuit of the algorithm>
Figure BDA0003085554310000099
Can be expressed as: />
Figure BDA00030855543100000910
And &>
Figure BDA00030855543100000911
Subsequent algorithms are processed using single gate expander circuits.
Definitions 1. Given one
Figure BDA00030855543100000912
Circuit->
Figure BDA00030855543100000913
Signal sequence input with n bits>
Figure BDA00030855543100000914
And-gate sequence->
Figure BDA00030855543100000915
To indicate. We pick up by means of a door>
Figure BDA00030855543100000916
To the extension circuit, and gate circuit beta t Associated is an ordered set>
Figure BDA00030855543100000917
Thus->
Figure BDA00030855543100000918
Generates a new circuit as an input>
Figure BDA00030855543100000919
Whose instruction sequence is->
Figure BDA00030855543100000920
The signal sequence is [ x ] 0 ,x 1 ,…,x n-1 ,x n ,…,x n+t-1 ,x n+t ]Are combined with each otherJ is more than or equal to 0 and less than or equal to n + t, and the following condition x is satisfied n+t ≠x j . Above slave->
Figure BDA00030855543100000921
Is derived to>
Figure BDA00030855543100000922
Is called using>
Figure BDA00030855543100000923
To circuit
Figure BDA00030855543100000924
The operation of single gate expansion is performed.
Use of
Figure BDA00030855543100000925
And &>
Figure BDA00030855543100000926
To mark the signal sequence->
Figure BDA00030855543100000927
And the instruction sequence->
Figure BDA00030855543100000928
The dependency of (2). For example, the following expression is found in definition 1:
Figure BDA00030855543100000929
and
Figure BDA00030855543100000930
FIG. 3 (a) shows a circuit
Figure BDA00030855543100000931
Can be expressed as:
Figure BDA0003085554310000101
FIG. 3 (b) shows a circuit
Figure BDA0003085554310000102
Can be expressed as:
Figure BDA0003085554310000103
a simple theory is given when introducing the following algorithmic framework.
Theory 1. Order
Figure BDA0003085554310000104
Is a set of gates and->
Figure BDA0003085554310000105
Is one>
Figure BDA0003085554310000106
-an electrical circuit. Then->
Figure BDA0003085554310000107
Is that
Figure BDA0003085554310000108
Multiples of (a). Therefore, for any->
Figure BDA0003085554310000109
A circuit, some non-negative integer k being present, so that the equation
Figure BDA00030855543100001010
This is true. Where gcd denotes the greatest common divisor.
For non-negative integer k, let
Figure BDA00030855543100001011
Is that all areas are->
Figure BDA00030855543100001012
Is/are>
Figure BDA00030855543100001013
-a set of circuits, wherein there is not one area less than ≧>
Figure BDA00030855543100001014
The circuit of (2). For a +>
Figure BDA00030855543100001015
By means of a single-gate expansion systematically generates ++>
Figure BDA00030855543100001016
In (a) all +>
Figure BDA00030855543100001017
-an electrical circuit. With k =1,2, \ 8230, increasing, our algorithm generates each layer of circuitry until the boolean function F is satisfied, which is the desired circuit.
The algorithm corresponding to the optimization method of the S-box circuit based on the process library in this embodiment is described by "algorithm 1" in the following table:
Figure BDA0003085554310000111
the "shape" of the search space, as shown in FIG. 4, invokes a circuit that explores the accesses during the search space nodes. For an n-bit input circuit, the search space of this embodiment is a tree structure with a circuit representation of the root node of the tree
Figure BDA0003085554310000112
And &>
Figure BDA0003085554310000113
The nodes are distributed in different layers, and the nodes in the same layer are respectively pairedThe area of the corresponding circuit is the same. Two nodes are connected directly by an edge, which means that the destination node is a single gate extension of the source node.
Algorithm 1 lines 1 through 5, a root node is created and placed in the list
Figure BDA0003085554310000114
In (1). Lines 9 through 19, the algorithm creates a list of nodes ≧ which>
Figure BDA0003085554310000115
So as to->
Figure BDA0003085554310000116
Each circuit in (a)>
Figure BDA0003085554310000117
All have>
Figure BDA0003085554310000118
And expanded by a single door, and>
Figure BDA0003085554310000119
is determined by>
Figure BDA00030855543100001110
Is formed by a number of nodes. This process is described in more detail below.
By selecting one of the satisfies
Figure BDA0003085554310000121
Conditional (see row 10) logic gates to create a ∑ or @>
Figure BDA0003085554310000122
And (c) a node of (c). Here ω ≧ 0 is required because ≧ 0>
Figure BDA0003085554310000123
New node on is->
Figure BDA0003085554310000124
A single gate extension of the upper node, whose area satisfies ^ or ^>
Figure BDA0003085554310000125
Then for +>
Figure BDA0003085554310000126
Each node in (see line 13), an ordered subset of the signal set for that node is selected->
Figure BDA0003085554310000127
And will>
Figure BDA0003085554310000128
Is connected to the input pin of the beta logic gate. And then adds the new node to the list->
Figure BDA0003085554310000129
In, this corresponds to &>
Figure BDA00030855543100001210
One single gate extension (see line 19). />
Due to the fact that
Figure BDA00030855543100001211
The logic gates in (1) are arranged from small to large in area, so that when the areas of the two logic gates are the same, their order is arbitrary. Let the set of ordered logic gates be [ beta ] 0 ,β 1 ,…,β s-1 When selecting β j If it is->
Figure BDA00030855543100001212
The remaining logic gates may be stopped from checking because, for any t > 0, there is a check in the order in which the logic gates are arranged
Figure BDA00030855543100001213
If->
Figure BDA00030855543100001214
And/or>
Figure BDA00030855543100001215
Instead of an empty set, logic gate β is used j Make->
Figure BDA00030855543100001216
All possible single gate extension circuits are layered. All of these circuits have an area which is->
Figure BDA00030855543100001217
And will be stored in +>
Figure BDA00030855543100001218
In (1). In this process, the algorithm will return each time a circuit implementing the boolean function F is encountered (see lines 20 and 21).
With the ordered increase of k, the method of this embodiment systematically searches for an area of
Figure BDA00030855543100001219
The circuit space of (a). Thus, the first time a circuit meeting a given Boolean function F is encountered in the search is the circuit implementation of the Boolean function F of minimum area.
The rules that generate the search space may ensure that the in-degree of each node is one (except for the root node, which is zero). Furthermore, each node corresponds to a vector function, and a vector function has at most one node corresponding to it. For each node, there is a unique directional path from the root node to the node, from which we can obtain the circuit implementation of the minimum area of the node.
Any new node is obtained by performing a single gate expansion on the previous node. A new signal derived by using the single gate expansion is added to the signal sequence of the source node, thereby obtaining a signal sequence of the newly created node. The method retains all information of the intermediate signal of the building circuit in the whole searching process.
Example two
The embodiment provides an optimization system of an S-box circuit based on a process library, which specifically includes:
the search tree construction module is used for constructing a search tree layer by taking the root node as an initial circuit and performing single gate expansion on the source node according to each target node; the circuit areas of the nodes on the same layer of the search tree are the same, and the difference of the areas of the nodes on the two adjacent layers is the greatest common divisor of the areas of all standard unit gate circuits in the set process library;
and the minimum area circuit searching module is used for stopping building the search tree under the condition that the first occurrence node meets the circuit of the given Boolean function F to obtain the circuit of the Boolean function F with the minimum area.
It should be noted that, each module in the optimization system of the S-box circuit based on the process library in this embodiment corresponds to each step in the optimization method of the S-box circuit based on the process library in the first embodiment one by one, and the specific implementation process thereof is the same, and the description thereof is not repeated here.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the optimization method of the S-box circuit based on the process library as described in the first embodiment above.
Example four
The embodiment provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to realize the steps in the optimization method of the S-box circuit based on the process library as described in the first embodiment.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A process library-based S-box circuit optimization method is characterized by comprising the following steps:
taking the root node as an initial circuit, and performing single gate expansion on the source node according to each target node to build a search tree layer by layer; the circuit areas of the nodes on the same layer of the search tree are the same, and the difference between the areas of the nodes on the two adjacent layers is the greatest common divisor of the areas of all standard unit gate circuits in the set process library;
and stopping building the search tree on the condition that the first node is generated and meets the circuit of the given Boolean function F, so as to obtain the circuit of the Boolean function F with the minimum area.
2. The method of claim 1, wherein the search tree has a node with an entry degree of one except for a root node.
3. The method for optimizing a S-box circuit based on a process library of claim 1, wherein each of the nodes from the root node to the search tree has a unique directional path.
4. The method for optimizing S-box circuits based on process libraries of claim 1, wherein each target node is single-gated by the source node using gates that are all standard cell gates in a given process library.
5. The method of claim 4, wherein all standard cell gates in the process library are configured as an ordered set of logic gates.
6. The process library-based S-box circuit optimization method of claim 5, wherein the standard cell gate circuits in the ordered set of logic gates are arranged from small to large in area.
7. The method of claim 5, wherein the order of two logic gates in the ordered set of logic gates is arbitrary when their areas are the same.
8. A process library-based S-box circuit optimization system, comprising:
the search tree construction module is used for constructing a search tree layer by taking the root node as an initial circuit and performing single gate expansion on the source node according to each target node; the circuit areas of the nodes on the same layer of the search tree are the same, and the difference between the areas of the nodes on the two adjacent layers is the greatest common divisor of the areas of all standard unit gate circuits in the set process library;
and the minimum area circuit searching module is used for stopping building the search tree on the condition that the first occurrence node meets the circuit of the given Boolean function F to obtain the circuit of the Boolean function F with the minimum area.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the method for optimization of a library-based S-box circuit according to any one of claims 1 to 7.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the steps in the method for optimization of a library-based S-box circuit according to any one of claims 1-7.
CN202110579580.4A 2021-05-26 2021-05-26 S box circuit optimization method and system based on process library Active CN113255257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110579580.4A CN113255257B (en) 2021-05-26 2021-05-26 S box circuit optimization method and system based on process library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110579580.4A CN113255257B (en) 2021-05-26 2021-05-26 S box circuit optimization method and system based on process library

Publications (2)

Publication Number Publication Date
CN113255257A CN113255257A (en) 2021-08-13
CN113255257B true CN113255257B (en) 2023-04-07

Family

ID=77184558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110579580.4A Active CN113255257B (en) 2021-05-26 2021-05-26 S box circuit optimization method and system based on process library

Country Status (1)

Country Link
CN (1) CN113255257B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5737233A (en) * 1996-01-05 1998-04-07 Nec Research Institute, Inc. VLSI circuit layout method based on spreading functions and simulated annealing heuristics to minimize area
GB201121216D0 (en) * 2011-12-09 2012-01-18 Isis Innovation Methods and apparatus for utilising solutions to sat problems
CN102799806B (en) * 2012-06-14 2015-02-25 中国人民解放军信息工程大学 Tree structure-based cryptographic algorithm logical expression identification method
CN109571466B (en) * 2018-11-22 2021-01-26 浙江大学 Seven-degree-of-freedom redundant mechanical arm dynamic obstacle avoidance path planning method based on rapid random search tree
CN110022202B (en) * 2019-03-12 2020-10-27 中国科学院软件研究所 Method for searching minimum hardware realization gate number of S box and S box circuit structure
CN111585579B (en) * 2020-04-13 2023-08-18 三未信安科技股份有限公司 Block cipher S-box quick implementation method and device based on Boolean function
CN112462785B (en) * 2020-12-04 2022-06-03 厦门大学 Mobile robot path planning method and device and storage medium

Also Published As

Publication number Publication date
CN113255257A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
US10089426B2 (en) Logic circuit generation device and method
Fried et al. BDD-based Boolean functional synthesis
US10394988B2 (en) Majority logic synthesis
Possani et al. Optimizing transistor networks using a graph-based technique
CN113255257B (en) S box circuit optimization method and system based on process library
Held et al. Fast prefix adders for non-uniform input arrival times
Ding et al. Generating multiple correlated probabilities for MUX-based stochastic computing architecture
Schmitt et al. Scaling-up ESOP synthesis for quantum compilation
Callegaro et al. Bottom-up disjoint-support decomposition based on cofactor and boolean difference analysis
Miragaia et al. Cgp4matlab-a cartesian genetic programming matlab toolbox for audio and image processing
Lin et al. In&Out: Restructuring for threshold logic network optimization
US6848094B2 (en) Netlist redundancy detection and global simplification
Czerwinski et al. State assignment and optimization of ultra-high-speed FSMs utilizing tristate buffers
Verma et al. Challenges in automatic optimization of arithmetic circuits
Wanna et al. Multiplier Optimization via E-Graph Rewriting
Malhotra et al. FPGA Accelerated Parallel HsClone GA for Digital Circuit Configuration in CGP Format
US6691283B1 (en) Optimization of comparator architecture
Lin et al. Don’t care computation and De Morgan transformation for threshold logic network optimization
JP5741705B2 (en) Optimal region extraction method and apparatus
Coimbra et al. Design and optimization of digital circuits by artificial evolution using hybrid multi chromosome cartesian genetic programming
Choudhury et al. Timing-driven optimization using lookahead logic circuits
Li et al. BoolGebra: Attributed Graph-learning for Boolean Algebraic Manipulation
Stempkovsky et al. Espresso-like Iterative Algorithm for Three-Level Logic Minimization
Keren et al. Linearization of multi-output logic functions by ordering of the autocorrelation values
JPH04124775A (en) Method for generating logic circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant