A bit more text
This commit is contained in:
parent
0f04918c33
commit
d21ab27062
3 changed files with 151 additions and 4 deletions
|
@ -18,6 +18,7 @@
|
|||
\usepackage{my_listings}
|
||||
\usepackage{my_hyperref}
|
||||
\usepackage{../common/internship}
|
||||
\usepackage{../common/math}
|
||||
|
||||
\bibliography{../common/refs}
|
||||
|
||||
|
@ -95,9 +96,11 @@ functions for this task.
|
|||
|
||||
\todo{Rename this section}
|
||||
|
||||
\subsection{Circuit description}
|
||||
|
||||
\begin{figure}[!h]
|
||||
\begin{align*}
|
||||
\textbf{Integer constant } n, m, \ldots \qquad& \\
|
||||
\textbf{Integer constant } n, m, p, q, \ldots \qquad& \\
|
||||
\\
|
||||
\textbf{Wire } in0, out0, ctl0, \ldots \qquad& \\
|
||||
\\
|
||||
|
@ -109,9 +112,9 @@ functions for this task.
|
|||
&\textit{(three-state gate)} \\
|
||||
\vert~&\text{comb} (\evec{in0}{n}, \evec{out0}{m}, \evec{e}{m})
|
||||
&\textit{(combinatorial gate)} \\
|
||||
\vert~&\text{assert} (\evec{in0}{n}, \evec{e}{m)}
|
||||
\vert~&\text{assert} (\evec{in0}{n}, \evec{e}{m})
|
||||
&\textit{(assertion gate)} \\
|
||||
\vert~&\text{group} (\evec{c}{n})
|
||||
\vert~&\text{group} (\evec{in0}{n}, \evec{out0}{m}, \evec{c}{p})
|
||||
&\textit{(circuit hierarchical group)} \\
|
||||
\\
|
||||
\textbf{Binary operator } \otimes ::=~
|
||||
|
@ -147,10 +150,64 @@ functions for this task.
|
|||
\caption{AST of circuits used}\label{fig:ast}
|
||||
\end{figure}
|
||||
|
||||
The circuits on which \emph{isomatch} is working are described, and internally
|
||||
represented, by the AST in Figure~\ref{fig:ast}.
|
||||
|
||||
The most important thing in the description of circuits here, is that those
|
||||
circuits are organized as a hierarchy of \emph{circuit groups}. This hierarchy
|
||||
can be seen as the construction of a circuit by assembling smaller integrated
|
||||
circuits (ICs), themselves built the same way, etc. A group is composed of
|
||||
sub-circuits, input pins and output pins. Each level can of course contain
|
||||
``leaf'' gates, like \textit{and} or \textit{delay} gates. This is important,
|
||||
because it allows the program to work on smaller areas the circuit (\eg{}
|
||||
loading in memory only a part of the circuit, etc.).
|
||||
|
||||
\subsection{Sought efficiency}
|
||||
|
||||
The goal of \textit{isomatch} is to be applied to large circuits on-the-fly,
|
||||
during their conception. Those circuits can (and will probably) be as large as
|
||||
a full processor, and the software will be operated by a human, working on
|
||||
their circuit. Thus, \textit{isomatch} must be as fast as possible, since
|
||||
matching operation will be executed often, and often multiple times in a row.
|
||||
It must then remain fast enough for the human not to lose too much time, and
|
||||
eventually lose patience.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\section{General approach}
|
||||
|
||||
\todo{}
|
||||
More precisely, the problems that \emph{isomatch} must solve are the following.
|
||||
|
||||
\begin{enumerate}
|
||||
\item\label{prob:equal} Given two circuit groups, are they structurally
|
||||
equivalent? That is, are they the same circuit, arranged in a different
|
||||
way, with possibly different names, etc.?
|
||||
|
||||
\item\label{prob:match} Given two circuits, \emph{needle} and
|
||||
\emph{haystack}, find every (non-overlapping) occurrence of \emph{needle} in
|
||||
\emph{haystack}. An occurrence is a set $S$ of sub-circuits of
|
||||
\emph{haystack} such that there is a one-to-one mapping of structurally
|
||||
equivalent circuits of $S$ with circuits of \emph{needle}, and those
|
||||
circuits are connected the same way in both circuits.
|
||||
\end{enumerate}
|
||||
|
||||
Both problems are hard. The first one is an instance of graph isomorphism, as
|
||||
the actual question is whether there exists a one-to-one mapping between
|
||||
sub-circuits of the two groups, such that every mapped circuit is equal to the
|
||||
other (either directly if it is a leaf gate, or recursively with the same
|
||||
procedure); and whether this mapping respects connections (edges) between those
|
||||
circuits. Graph isomorphism is known to be in NP (given a permutation of the
|
||||
first graph, it is polynomial to check whether the first is equal to the second
|
||||
\wrt{} the permutation), but not known to be in either P or NP-complete. Thus,
|
||||
since Babai's work on graph isomorphism~\cite{babai2016graph} is only of
|
||||
theoretical interest, the known algorithms remain in worst-case exponential
|
||||
time, and require ad-hoc heuristics for specific kind of graphs to get maximum
|
||||
efficiency.
|
||||
|
||||
The second one is an instance of subgraph isomorphism problem, which is known
|
||||
to be NP-complete~\cite{cook1971complexity}. Even though a few algorithms
|
||||
(discussed later) are known to be efficient in most cases for this problem, it
|
||||
is nevertheless necessary to implement them the right way, and with the right
|
||||
heuristics, to get the desired efficiency for the given problem.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\section{Signatures}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue