##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, see <http://www.gnu.org/licenses/>.
##

#This ends up as description when selecting a decoder in "Decoder Selector"

'''
This protocol decoder is intended to capture communication to/from memory
chips with parallel buses, like EPROM, ROM or RAM. Typically there are one or
more enable pins that need to be in the right state to define that data
is valid. 
Actual data may not be immediately available when the enable pins are set so there 
is a parameter to indicate how many samples the enable pins must stay in the defined
state before data is considered valid.
In addition to the enable state being set valid, it is also possible that the 
data/address bus changes state during enable state being valid. This would then
be considered as new data. In the same manner as enable state must be valid for 
a certain amount of samples, the data/address bus must be stable for a certain
number of samples before data is considered to have changed.

The number of pins for data/address and enable can be selected in the code. It is
also possible to omit assigning pins if fewer are needed. If so, all of the pins
up to the highest that is assigned will be accounted for. If any pin in the middle
of the data/address set is not assigned, it will be considered to be 0.

If multiple sets of data are needed to form a complete word, it is possible to specify
a word size. This will accumulate several data sets and present this as a complete
word. Endianness can be selected. 

In order to decode both Address and Data buses, two separate decoders should be used.

Last, but not least, it is possible to enable a debug output in order to get information
on what is happening within the decoder. This is for experiment only and not expected
to provide any specific information regarding the data that is decoded.
 

'''

from .pd import Decoder
