OpenCores
URL https://opencores.org/ocsvn/present/present/trunk

Subversion Repositories present

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /present/trunk/Decode
    from Rev 16 to Rev 20
    Reverse comparison

Rev 16 → Rev 20

/doc/src/present_decode.tex
7,7 → 7,7
%%%%%%%%%%%%%%%%%
\docDate{ \today }
\docID{Present Decoder}
\docRevision{0.1}
\docRevision{0.2}
\docStatus{Draft}
\docTitle{\mbox{Present Decoder}}
\authorName{\mbox{Krzysztof Gajewski} \\ and opencores.org}
17,6 → 17,7
 
\revisionList{
0.1 & all & 2014/05/25 & First draft & K. Gajewski \\
0.2 & all & 2014/09/16 & Some small corrections with the text, typos, etc. & K. Gajewski \\
}
 
\begin{document}
52,18 → 53,18
\label{pAlgorithm}
\end{center}
\end{figure}
In subprojects \texttt{Pure} and \texttt{PureTesting} Present coder components was presented. In this project Present decoder was presented. Decoding key is firstly generated, basing on the key used for data coding. Next, input data are decoded (taking into account "inverse" direction to the presented in Fig. \ref{pAlgorithm}), and at last feeds the output. This core works with 80 bit key. Target was Xilinx\textsuperscript{\textregistered} Spartan 3E XC3S500E \cite{Spartan} on Spartan 3E Starter Board \cite{Digilent} made by Digilent\textsuperscript{\textregistered}.
In subprojects \texttt{Pure} and \texttt{PureTesting} Present encoder components was presented. In this subproject Present decoder was presented. Decoding key is firstly generated, basing on the key used for data coding. Next, input data are decoded (taking into account "inverse" direction to the presented in Fig. \ref{pAlgorithm}), and at last feeds the output. This core works with 80 bit key. Target was Xilinx\textsuperscript{\textregistered} Spartan 3E XC3S500E \cite{Spartan} on Spartan 3E Starter Board \cite{Digilent} made by Digilent\textsuperscript{\textregistered}.
 
\newpage
 
\section{Interface}
 
Top level component of Present decoder was shown in Fig. \ref{pfdec}. All inputs and outputs are synchronous except \texttt{reset} signal and sampled at rising edge of the clock. Type for all signals is \texttt{STD\_LOGIC} or \texttt{STD\_LOGIC\_VECTOR}.
Top level component of the Present decoder was shown in Fig. \ref{pfdec}. All inputs and outputs are synchronous except \texttt{reset} signal and sampled at rising edge of the clock. Type for all signals is \texttt{STD\_LOGIC} or \texttt{STD\_LOGIC\_VECTOR}.
\begin{figure}[!ht]%
\begin{center}
\includegraphics[width=0.5\textwidth]{img/PresentFullDecoder.png}
\caption{%
Top level component of Present decoder
Top level component of the Present decoder
}%
\label{pfdec}
\end{center}
74,13 → 75,13
\hline \texttt{ciphertext} & 64 & in & input data which have to be decoded. \\
\hline \texttt{key} & 80 & in & secret key used for input data decoding (the same which was used for data encoding). \\
\hline \texttt{clk} & 1 & in & clock signal for the component\\
\hline \texttt{reset} & 1 & in & \emph{Asynchronous} reset signal. \\
\hline \texttt{reset} & 1 & in & \emph{asynchronous} reset signal. \\
\hline \texttt{start} & 1 & in & signal which starts decoding process. \\
\hline \texttt{plaintext} & 64 & out & decoded text output. \\
\hline \texttt{ready} & 1 & out & signal informing about end of decoding process. \newline "0" - wait until end of data decoding. \newline "1" - data at the \texttt{ciphertext} output are valid, you can read them. \\
\hline
\end{tabularx}
\captionof{table}{Input/Output signals of Present Decoder component}
\captionof{table}{Input/Output signals of the Present Decoder component}
 
\newpage
 
90,7 → 91,7
\begin{center}
\includegraphics[width=0.8\textwidth]{img/internalStructure.png}
\caption{%
Internal datapath between main components in Present decoder.
Internal datapath between main components in the Present decoder.
}%
\label{internalStructure}
\end{center}
116,7 → 117,7
\end{center}
\end{figure}
 
State machine of the \texttt{PresentDec} component was shown in Fig. \ref{presentDecSM}. It consist of three states \texttt{NOP}, \texttt{SM\_START} and \texttt{READY}. The way of work of this state machine is the same as in the \texttt{Present} subproject, but the counter is counting down instead of counting up.
State machine of the \texttt{PresentDec} component was shown in Fig. \ref{presentDecSM}. It consists of three states \texttt{NOP}, \texttt{SM\_START} and \texttt{READY}. The way of work of this state machine is the same as in the \texttt{Present} subproject, but the counter is counting down instead of counting up.
 
\begin{figure}[!ht]%
\begin{center}
128,13 → 129,13
\end{center}
\end{figure}
 
State machine of the \texttt{FullDecoderSM} component was shown in Fig. \ref{presentFullDecSM}. It consist of four states \texttt{NOP}, \texttt{KG\_START}, \texttt{DEC\_START} and \texttt{READY}. \texttt{NOP} is default state after resetting the core. This state is active as long as \texttt{full\_decoder\_start} = '0'.
State machine of the \texttt{FullDecoderSM} component was shown in Fig. \ref{presentFullDecSM}. It consists of four states \texttt{NOP}, \texttt{KG\_START}, \texttt{DEC\_START} and \texttt{READY}. \texttt{NOP} is the default state after resetting the core. This state is active as long as \texttt{full\_decoder\_start} = '0'.
 
When \texttt{full\_decoder\_start} = '1' key generation for the decoding process starts. Proper \texttt{key} and \texttt{ciphertext} must feed the input before. \texttt{KG\_START} state is active as long \texttt{PresentEncKeyGen} is generating the key. Key generation ends, when \texttt{PresentEncKeyGen} sets the \texttt{ready} signal to '1'. When the \texttt{ready} signal is set to '1', the state is changing.
 
During \texttt{DEC\_START} state decoding process appears. State machine is in this state until \texttt{PresentDec} ends its works. The end of decoding is signalled by setting the \texttt{ready} signal to '1' by the \texttt{PresentDec} component. Then, the state is changing.
 
\texttt{READY} sets the \texttt{ready} signal of the \texttt{PresentFullDecoder} to '1'. It is idle-like state, when the user can reads the output of the Present decoder. The state machine is in this state until the user sets the \texttt{full\_decoder\_start} to '0'.
\texttt{READY} state sets the \texttt{ready} signal of the \texttt{PresentFullDecoder} to '1'. It is idle-like state, when user can read the output of the Present decoder. The state machine is in this state until user sets the \texttt{full\_decoder\_start} to '0'.
 
\newpage
 
164,12 → 165,12
Possible change in used FPGA device may be possible in steps given below\footnotemark[1]:
\begin{enumerate}
\item Copy \texttt{./Decode/syn/XC3ES500/} directory to another one like \texttt{./Decode/syn/YOUR\_FPGA\_SYMBOL/}
\item Go to \texttt{./Decode/syn/XC3ES500/} directory.
\item In \texttt{PresentEnc.xst} file modify the line \texttt{-p xc3s500e-5-fg320} to \texttt{-p YOUR\_FPGA\_SYMBOL}
\item In \texttt{Makefile} file modify the line \texttt{PLATFORM=xc3s500e-fg320-5} to \texttt{PLATFORM=YOUR\_FPGA\_SYMBOL}
\item Go to \texttt{./Decode/syn/YOUR\_FPGA\_SYMBOL/} directory.
\item In \texttt{PresentFullDecoder.xst} file modify the line \texttt{-p xc3s500e-5-fg320} to \texttt{-p YOUR\_FPGA\_CODE}
\item In \texttt{Makefile} file modify the line \texttt{PLATFORM=xc3s500e-fg320-5} to \texttt{PLATFORM=YOUR\_FPGA\_CODE}
\end{enumerate}
 
\footnotetext[1]{This solution was not tested and is based on my own observations. Additional care should be taken with *.UCF files. You can make this modifications on your own risk}
\footnotetext[1]{This solution was not tested and is based on my own observations.}
 
 
\newpage
176,7 → 177,7
 
\section{Simulation}
 
Self-checking test bench were provided to the components used for Present encoder. They are stored in \texttt{./Decode/bench/vhdl} directory. Suitable configuration files and Makefile used for running test bench was stored in
Self-checking test bench were provided to the components used for the Present encoder. They are stored in \texttt{./Decode/bench/vhdl} directory. Suitable configuration files and Makefile used for running test bench was stored in
\texttt{./Decode/sim/rtl\_sim/bin} directory. Appropriate test vectors was taken from \cite{PRESENT}.
 
Makefile was prepared to make "manual run" of tests. If You want to perform it without gui, remove \texttt{-gui} option in Makefaile.
/doc/present_decode.pdf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.