Signal Processing and Data Transmission Using A Fpga
Signal Processing and Data Transmission Using A Fpga
Jorge Cervera
ABSTRACT:
This thesis work has three main parts: the first one is to implement the hardware design
of a FPGA capable of reading in parallel 64 digital signals and process them. The
second part is about implementing a component that allows a PC machine to interact
with a FPGA. In the third part, both components will be assembled in the final design.
First of all, an overview of the FPGA technologies, and its main developers and
suppliers is given to provide a major understanding of how this technology works. Then
the two main HDL languages and their characteristics are explained. The design tools
used to develop the project are then showed before the explanation of the development
of this first part of the project;
After that, in the first part of the project a suitable design to process a digital signal
generated by a square array of 88 ITO electrodes photo lithographically defined in a
0.5_m thick photoresist layer previously filtered amplified and converted to digital
electronically is going to be implemented step by step.
In the second part is about an attempt to create an interface between the FPGA and a PC
machine. This interface should be able to order the FPGA to record data and then
send them to the PC.
As a final part, those two components will be assembled and tested to give the final
design, a design capable of reading, processing and sending the signals received from
the electrodes to a PC machine. Once this design is finished and tested, the
characteristics that the FPGA needs to have to perform all the needed functions will be
known.
The main purpose is to find a FPGA that can manage to process 64 signals in parallel so
all the tests and results can be taken in the same time lapse. Rather than focusing on
hardware programming, finding a FPGA fast enough and with the required amount of
memory and pins is the aim of the document. The results of a simple test run and
simulated in each device is shown, besides of the description of the implementation of
the interface.
Jorge Cervera
Acknowledgements:
First acknowledgements are for all my family, specially to my mother M Dolores,
because thanks to you and to your effort I am where I am and I am what I am. To my
sister Mar you made my childhood a wonderful time and for being my best friend now.
To my sisters Nuria and Idoya, mothers and sisters at one time, thank you for your
patience. To my niece Sara, because with less than one year you have taught me to
fight. To Nadia and Sheila, my crazy nieces. And to my father, because you tried to
show me what I didnt want to see, thank you for teaching me what is the bad way,
although you are not here.
I dont want to forget my friends: All my friends from La Salle, someday we will pass
through the adolescence and well be adults. To the people from the Ludoteque that
taught me that Sparta does not retreat. And to all my friends in Sweden, the love
brigade, the fellowship of the ring, the north troglodytes, the troll women and the girls
from Madrid, rebro, Vsters or Ibarrekolanda.
Thanks to all of you for supporting me and being there.
Agradecimientos:
Primero quiero agradecrselo a toda mi familia, en especial a mi madre, M Dolores,
porque gracias a ti y a tu esfuerzo estoy donde estoy y soy quien soy. A mi hermana
Mara por hacer de mi infancia una poca maravillosa y por ser ahora mi mejor amiga.
A mis hermanas Nuria e Idoya, que fuisteis madres y hermanas a un tiempo, gracias por
vuestra paciencia. A mi sobrina Sara, porque con menos de un ao tu me has enseado
lo que es luchar. A Nadia y Sheila, mis sobrinas que estn aun mas locas que yo.Y a mi
padre, por intentar hacerme ver lo que yo no quera, gracias por ensearme cual es el
mal camino, aunque ya no ests.
Tampoco quiero olvidar a mis amigos: todos los del colegio la Salle, algn da
superaremos la pubertad y nos haremos adultos. A la gente de la Ludoteque, que me
ense que Esparta no se retira. Y a todos mis amigos en Suecia, la brigada del amor, la
comunidad del Anillo, los trogloditas del norte, las mujeres troll y sin olvidarme de las
chicas de Madrid, rebro, Vsteras o Ibarrekolanda.
Gracias a todos por apoyarme y estar ah.
Jorge Cervera
Index
1. Background ...8
2. FPGAS ......8
2.1. Historical Overview ...8
2.2. Basic Functioning ......9
2.3. Developers ...10
2.3.1. Altera .....10
2.3.2 Xilinx .....11
3. Hardware Description Languages ......11
3.1. VHDL ......12
3.1.1.Program Structure ......13
3.2. Verilog .....14
4. VHDL/Verilog Compared & Contrasted ....15
5. Hardware Design and Simulating Tools .....15
5.1. Alteras Quartus II 7.2sp3 Web Edition ......15
5.2. Xilinxs ISE Design Suite 10.1. ...16
5.3. ModelSim PE Student Edition 6.3.c ....16
5.4. Choosing a Design Tool ..16
6. Developing of the design ....16
6.1. First Part: Design of a system capable of receiving, processing and sending
signals in a FPGA ...17
6.1.1. First Design ...17
6.1.2. Second Design ......19
6.1.3. Third Design .21
6.1.4. Fourth Design 23
6.1.5. Fifth Design ......27
6.2. Second Part: Design of a system capable of interact with a PC machine29
4
Jorge Cervera
Jorge Cervera
List of Figures
Figure 1: Basic Overview .................................................................................................8
Figure 2: Top FPGA 2007 suppliers ................................................................................9
Figure 3: Logic Cell .........................................................................................................9
Figure 4: Interconnection of Logic Blocks .....................................................................10
Figure 5: VHDL entities and architectures ....................................................................13
Figure 6: Verilog modules ..............................................................................................14
Figure 7: First Design ....................................................................................................18
Figure 8: First Design Code ..........................................................................................18
Figure 9: First Design Test ............................................................................................19
Figure 10: Second Design ..............................................................................................19
Figure 11: Second Design Code 1st Part .......................................................................20
Figure 12: Second Design Code 2nd Part ......................................................................20
Figure 13: Second Design Test ......................................................................................21
Figure 14: Third Design .................................................................................................22
Figure 15: Third Design Code .......................................................................................22
Figure 16: Third Design Test .........................................................................................23
Figure 17: Fourth Design................................................................................................23
Figure 18: Fourth Design Code Part 1...........................................................................24
Figure 19: Fourth Design Table of Signals ...................................................................24
Figure 20: Fourth Design Code Part 2 ..........................................................................25
Figure 21: Fourth Design Code Part 3 ..........................................................................26
Figure 22: Fourth Design Test .......................................................................................26
Figure 23: Fifth Design ..................................................................................................27
Figure 24: Fifth Design Code Part 1 .............................................................................27
Figure 25: Fifth Design Code Part 2 .............................................................................28
Figure 26: Fifth Design Test ..........................................................................................29
Figure 27: Male RS-232 plug .........................................................................................30
Figure 28: Female to Female DB-9 Cable .....................................................................30
Figure 29: Transmitter entity .........................................................................................31
Figure 30: Transmitter entity, constants and signals .....................................................32
Figure 31: Transmitter Table of Signals ........................................................................32
Figure 32: Transmitter Baud Generator ........................................................................33
Figure 33: Serializer State Machine ..............................................................................34
Figure 34: Multiplexor ...................................................................................................35
Figure 35: Transmitter Test ...........................................................................................36
Figure 36: Receiver Entity .............................................................................................37
Figure 37: Receiver Entity, Constants and Signals ........................................................37
Figure 38: Receiver Table of Signals .............................................................................37
Figure 39: Receiver Baud Generator .............................................................................38
Figure 40: D-Flip-Flop ..................................................................................................39
Figure 41: Received Data Filter ....................................................................................40
Figure 42: Receiver State Machine ................................................................................40
Figure 43: Receiver Shift Register .................................................................................40
Figure 44: Receiver Test ................................................................................................41
Figure 45: Final Design .................................................................................................42
Figure 46: Processor Entity ...........................................................................................42
Figure 47: Component Transmitter ................................................................................43
6
Jorge Cervera
Jorge Cervera
1. BACKGROUND:
Reading signals from neural cultures is a very complicated and delicate work. The
signals that must be analyzed are really small, and the time that these signals can be
recorded is really small if it is compared with the time that takes to prepare the culture.
It takes about 6 months to prepare the culture and it can be analyzed during less than 5
minutes before the culture becomes useless. So a really accurate and fast prototype
needs to be developed to perform all the analysis required in the minimum amount of
time possible. Some other devices are being used to perform this tests, but they are quite
expensive and they dont perform all the required tests, wasting a lot of time in further
analysis than has to be done to achieve the desired results.
With this thesis work, the aim is to give the basics to develop a new prototype based on
the FPGA technology that can perform all the required tests and can be easily controlled
by a simple PC machine. These basic functions are as simpe as receiving one signal and
evaluate the time that it lasts, and if it is a valid signal, convert and send it to the PC
machine to perform further analysis.
FPGA
PC
2. FPGAs:
2.1. Historical Overview:
The FPGA are the result of the convergence of two different technologies, the logical
programmable devices (PLDs [Programmable Logic Devices]) and the integrated
circuits of specific application (ASIC). The history of the PLDs began with the first
devices PROM (Programmable Read-Only Memory) and they versatility was added by
the PAL (Programmable Array Logic) that allowed a major number of income and the
incorporation of records. These devices have continued growing in size and power
while, the ASIC always have been powerful devices, but its use has needed traditionally
8
Jorge Cervera
a considerable investment of time and money. Attempts of reducing this load have come
from the modularization of the elements of the circuits, as the ASIC based on cells, and
from the standardization of the masks, as Ferranti was pioneering with the ULA
(Uncommitted Logic Array). The final step was to combine both strategies with a
mechanism of interconnection that could be programmed using fuses, antifuses or RAM
cells, as the innovative devices Xilinx of middle of the 80. The resultant circuits are
similar in capacity and applications to the biggest PLDs, though there are punctual
differences that aim to different origins. Besides computation reconfigurable, the
FPGAs are in use in controllers, coders/decoders, VLSI circuits prototyping.
The first manufacturer of these devices was Xilinx and Xilinx's devices are still the
most popular devices. Other FPGA suppliers are Atmel, Actel, Altera and Lattice
Semiconductor.
Jorge Cervera
A recent trend has been to combine the logical blocks and interconnections of the FPGA
with microprocessors and peripheral related to form a programmable System in a chip
". Example of such hybrid technologies they can be found in the devices Virtex-II PRO
and Virtex-4 of Xilinx, which include one or more processors PowerPC absorbed
together with the logic of the FPGA. Atmel's FPSLIC is another similar device, which
uses a processor AVR in combination with Atmel's logical programmable architecture.
Another alternative is use cores of implemented processors using the logic of the FPGA.
These cores include the processors MicroBlaze and PicoBlaze de Xlinx, Nios and Nios
II of Altera, and the processors of opened code LatticeMicro32 and LatticeMicro8.
Many modern FPGA support the partial reconfiguration of the system, allowing a part
of the design to be rescheduled, while other parts continue working. This one is the
principle of the computation reconfigurable computation idea.
2.3. Developers:
2.3.1. Altera:
Altera Corporation is the pioneer of programmable logic solutions. Today, Altera offers
FPGAs, CPLDs, and structured ASICs in combination with software tools, intellectual
property, and customer support to provide high-value programmable solutions. Altera
is headquartered in San Jose, California, USA.
10
Jorge Cervera
Alteras devices can be divided in two main families: The Cyclone family and the
Stratix family. The main difference between these two families is that Stratix FPGAs
uses ALUTs instead of normal LUTs. Altera estimates than an ALUT to be equivalent
to 2.5 LUTs. This makes Stratix FPGAs much better but more expensive that Cyclone
ones.
2.3.2. Xilinx:
One of the worlds largest developers of FPGAs is Xilinx, Inc. It was founded in 1984
and was based in Silicon Valley. Today, their HQ resides in San Jose, California (U.S.);
the European HQ is based in Dublin (Ireland) and the Asia Pacific/Japan HQ is based in
Singapore.
Xilinx FPGAs can be divided in two main families: The Virtex family and the Spartan 3
family. The Virtex family targets high performance applications that require higher
clock rates, extensive math operations, or significant use of single cycle timed loops.
The Spartan 3 family is intended for higher volume applications and as such has some
tradeoffs when it comes to the number of resources available on the chip as well as
over-all performance. The Spartan 3 resource mix works well for applications that
require more logic operations and rely less heavily on specialty resources
Jorge Cervera
The idea of being able to simulate this documentation was so obviously attractive that
logic simulators were developed that could read the VHDL files. The next step was the
development of logic synthesis tools that read the VHDL, and output a definition of the
physical implementation of the circuit. Modern synthesis tools can extract RAM,
counter, and arithmetic blocks out of the code, and implement them according to what
the user specifies. Thus, the same VHDL code could be synthesized differently for
lowest cost, highest power efficiency, highest speed, or other requirements.
VHDL borrows heavily from the Ada programming language in both concepts (for
example, the slice notation for indexing part of a one-dimensional array) and syntax.
VHDL has constructs to handle the parallelism inherent in hardware designs, but these
processes differ in syntax from the parallel tasks in Ada. Like Ada, VHDL is stronglytyped and is case insensitive. There are many features of VHDL which are not found in
Ada, such as an extended set of Boolean operators including nand and nor, in order to
represent directly operations which are common in hardware. VHDL also allows arrays
to be indexed in either direction (ascending or descending) because both conventions
are used in hardware, whereas Ada (like most programming languages) provides
ascending indexing only. The reason for the similarity between the two languages is that
the Department of Defense required as much as possible of the syntax to be based on
Ada, in order to avoid re-inventing concepts that had already been thoroughly tested in
the development of Ada.
VHDL is a fairly general-purpose language, although it requires a simulator on which to
run the code. It can read and write files on the host computer, so a VHDL program can
be written that generates another VHDL program to be incorporated in the design being
developed. Because of this general-purpose nature, it is possible to use VHDL to write a
testbench that verifies the functionality of the design using files on the host computer to
define stimuli, interacts with the user, and compares results with those expected. The
key advantage of VHDL when used for systems design is that it allows the behavior of
the required system to be described and simulated before synthesis tools translates the
design into real hardware.
Another benefit is that VHDL allows the description of a concurrent system (many
parts, each with its own sub-behavior, working together at the same time). VHDL is a
dataflow language, unlike procedural computing languages such as BASIC, C, and
assembly code, which all run sequentially, one instruction at a time.
A final point is that when a VHDL model is translated into the "gates and wires" that
are mapped onto a programmable logic device such as a CPLD or FPGA, and then it is
the actual hardware being configured, rather than the VHDL code being "executed" as if
on some form of a processor chip.
Jorge Cervera
13
Jorge Cervera
The language differs from a conventional programming language in that the execution
of statements is not strictly sequential. A Verilog design consists of a hierarchy of
modules. Modules are defined with a set of input, output, and bidirectional ports.
Internally, a module contains a list of wires and registers. Concurrent and sequential
statements define the behavior of the module by defining the relationships between the
ports, wires, and registers. Sequential statements are placed inside a begin/end block
and executed in sequential order within the block. But all concurrent statements and all
begin/end blocks in the design are executed in parallel, qualifying Verilog as a Dataflow
language. A module can also contain one or more instances of another module to define
sub-behavior.
A subset of statements in the language is synthesizable. If the modules in a design
contain only synthesizable statements, software can be used to transform or synthesize
the design into a netlist that describes the basic components and connections to be
implemented in hardware. The netlist may then be transformed into, for example, a form
describing the standard cells of an integrated circuit (e.g. an ASIC) or a bitstream for a
programmable logic device (e.g. a FPGA).
3.2.1 Program Structure:
The basic unit of design and programming in Verilog is a module a text file containing
declarations and statements. A typical Verilog module corresponds to a single piece of
hardware, in much the same sense as a module in traditional hardware design. A
Verilog module has declarations that describe the names and types of the modules
inputs and outputs, as well as local signals, variables, constants, and functions that are
used strictly internally to the module, and are not visible outside. The rest of the module
contains statements that specify the operation of the modules outputs and internal
signals.
Jorge Cervera
15
Jorge Cervera
Jorge Cervera
6.1. First Part: Designing of a system capable of receiving, processing and sending
signals in a FPGA
Requirements:
The FPGA must be able to perform the following actions:
Receiving 64 digital signals (1 bit) in parallel
Process this signal in parallel:
1. The signals must have a duration of at least 100 s
2. The signals must be received in a maximum time of 3.2 ms
The components must be implemented in the best way to make the physical
components as cheap as possible
This is a first prototype, so all the implementation is aim to develop all the previous
functions but only receiving one digital signal.
Real Design:
It has not been possible for me to test the system connecting it to the real signal
generator system. Thus, the system is implemented with only two input ports, hoping
that in the future real tests can be made. However the system is easily implemented and
it is easy to understand and to implement all the capabilities to fulfill the project
requirements.
Design:
The first thing that I was thinking about was about the needed of storing data in the
FPGA device. As the device is connected to a PC machine that has in comparison a
huge storing capacity, I resolved that it was much better if the data were evaluated in the
FPGA device and then sent to the PC to be stored. But this drives to another problem:
Working with high values inside a FPGA machine in parallel requires a lot of the FPGA
pins, and this take me to have to choose really expensive devices to develop a simple
design. But after many tests and designs I found the solution to the problem as it is
going to be explained.
6.1.1. First Design
As a first approach to the design I thought that the easiest way to develop the project
was to implement a system with the desired number of bit input ports and the same
number of 32 bits output ports that could send the signal to the PC machine, plus
another input port for the clock signal that was set in 100s. This output port contained
two important data: the position inside the array aimed to the time, and the value of each
position showed the value of the signals. A process activated by the clock signal record
the value of the signal in the array.
17
Jorge Cervera
1in0
Recorder
32out0
Clk
FPGA
Process clk_counter: stores the value of the input signal received through the in0
port, and increases the value of the counter signal with each clock tick.
However, two problems come with this design: Some valid signals were missed as it is
showed in Fig.9, and the number of pins that should be used for the final
implementation were too high; one port for the clock signal, 64 bit ports that use 64 pins
18
Jorge Cervera
and 64 output ports that use 32 pins each one, giving a final number of pins equal to
2113, a very complex hardware design for such a simple operation.
1in032init
recorder
1clk32fin
Jorge Cervera
20
Jorge Cervera
21
Jorge Cervera
1in012init
Recorder
1clk12fin
FPGA
Jorge Cervera
1in0
Recorder
12out0
1clock
FPGA
Jorge Cervera
This is an optimal design, and besides it makes easier to develop the second part of the
project as sending one bit with each clock tick is much easier than sending an array of
bits.
Type
Purpose
Counter
Integer
Recording Boolean
Clk_init
Integer
Jorge Cervera
Aux
Matrix
Saves the value of the initial and ending times of a valid signal.
The value of the rows indicates the number of the port.
Column
Integer
Aux1
Bit
vector
Saves the value of the bit vector that is being sent to the PC
machine
Row
Integer
25
Jorge Cervera
Jorge Cervera
1in1
12out0
Recorder
1clock
FPGA
27
Jorge Cervera
28
Jorge Cervera
In this second part of the project, a design capable of interact with a PC machine is
developed. The system is based on a interface through the RS-232 port of the PC and
the machine. This part is also divided into three sub-parts, to make the developing
process easier and more understandable. First, a brief explanation of the hardware
needed will be given. In the second part, a transmitter design will be explained
implemented and tested. The device is capable of sending data bit by bit. In the third
part, a design capable of receiving data from the pc is implemented. This device is
needed because the PC must be able to give some simple orders to the FPGA, such
start-record, or stop-record. Both devices use an "asynchronous" protocol. That means
that no clock signal is transmitted along the data. The receiver has to have a way to
"time" itself to the incoming data bits. In the case of RS-232, that's done this way:
1. Both side of the cable agree in advance on the communication parameters
(speed, format...). That's done manually before communication starts.
2. The transmitter sends a "1" when and as long as the line is idle.
3. The transmitter sends a "start" (a "0") before each byte transmitted, so that the
receiver can figure out that data is coming.
4. After the "start", data comes in the agreed speed and format, so the receiver can
interpret it.
5. The transmitter sends a "stop" (a "1") after each data byte.
29
Jorge Cervera
6.2.1. Hardware:
RS-232 (Recommended Standard 232) is a standard for serial binary data signals
connecting between a DTE (Data terminal equipment) and a DCE (Data Circuitterminating Equipment). It is commonly used in computer serial ports.
An RS-232 interface has the following characteristics:
Jorge Cervera
TxD
Se
12TxD_data1
ria
1TxD_start1busy
liz
er
clk
FPGA
31
Jorge Cervera
Name
Type
Purpose
BaudGeneratorACC
Std_logic_vector
State
Std_logic_vector
TxD_ready
Std_logic
TxD_dataReg
Std_logic_vector
BaudTick
Std_logic
Muxbit
Std_logic
Jorge Cervera
busy
200 bauds.
9600 bauds.
38400 bauds.
115200 bauds.
The device must be as fast as possible, and as RS-232 are not very fast actually, for
instance, at 115200 bauds, each bit lasts (1/115200) = 8.7s. If you transmit 12-bits
data, that lasts 12 x 8.7s = 104.4s. But each byte requires an extra start and stop bit,
so you actually need 14 x 8.7s = 121.8s. So the highest value for the speed is selected
to provide an acceptable time transfer value.
Here's a design with a 25MHz clock and a 16 bits accumulator. The design is
parameterized, so easy to customize.
33
Jorge Cervera
34
Jorge Cervera
35
Jorge Cervera
36
Jorge Cervera
RxD
De
se
data
ria
li
clk1data_ready
zer
FPGA
Name
Type
Purpose
Jorge Cervera
RxD_cnt_inv
RxD_bit_inv
State
Bit_spacing
Next_bit
Std_logic
RxD_data_error
Std_logic
RxD_d
Index
Integer
38
Jorge Cervera
State machine: The state machine goes through different states to point to the position
of the array signal where the data must be writen, once a start is detected. Notice that a
"next_bit" signal is used to go from bit to bit.
39
Jorge Cervera
40
Jorge Cervera
With all these parts the transmitter device is completed, and as it can be seen in the
simulation it should possible to receive 8 bit chunks from a PC machine.
41
Jorge Cervera
RxD
In01
Receiver
18data12data1TxD
Transmitter
Processor
1ready1start1busy
Clkclk
Clk
FPGA
Jorge Cervera
as input ports for the processor and the opposite for the other two. In the case of
PC_TxD_data, the processor sends the data corresponding to the processed signals
through this port to the transmitter to be sent to the PC. In the case of the other two, the
transmitter activates a signal in this port to indicate that a chunk of information has been
sent, and that another one can be sent. So it is an output port for the transmitter, and an
input port for the processor.
Jorge Cervera
10000001 Record.
10000010 Stop recording.
When the system receives the Record signal sequence, it begins to receive the signals
and processing them. The counter signal is initialized and the process that measures the
timing of the signals begins to work.
44
Jorge Cervera
When the system receives the Stop recording signal sequence, it stops recording and
sends all the information to the PC, the same action that the system takes when a
complete recording sequence has been complete.
45
Jorge Cervera
The number of pins is still very low, for a 64 input port device we will need 92 pins, a
really small number. The device needs 3444 logic elements. More logic elements will
be used with a more complex device, however it is not a really high number for the
FPGA devices that can be found in the market. For instance, a Cyclone device from
Altera has about 250 pins and 4.000 logic elements, and this is the most cheap and
simple device from Altera.
In Fig.54, we can see how an impulse has been received in the in0 port, but as it lasts
less than 100 s, it is rejected and the values of the initial and the final time of the signal
are not recorded in aux(0,0) and aux(0,1).
46
Jorge Cervera
47
Jorge Cervera
Now in case of another valid signal, the values of the initial and final time of the signal
would be recorded in aux (0,2) and aux (0,3). The same process using the same
algorithm is used for the signals that come from the input port in1, so no further tests
are going to be done of this algorithm because it is clear that it is working.
Now the stop record signal is given, so the system must start to transmit the recorded
data. As it can be seen in Fig.56, as soon as the complete code for the order Stop
recording is received, the counter signal stops, the port pc_txd_start is activated and the
transmission starts. The complete sequence of transmitted bits can be seen in the pc_txd
port and in the pc_txd_data port.
7. Conclusions
Finally a system capable of processing signals coming from an external source,
receiving simple orders from a PC machine and transmit the processed data has been
developed. The purpose of this work is to serve as a prototype for future development
and improvements. As a first approach it has some advantages and many drawbacks.
48
Jorge Cervera
7.1. Advantages:
All the project requirements are fulfilled. The system is capable of receiving a digital
signal and processing it, finding if it is a valid signal or not. The algorithms used to
implement the processing function are quite easy to understand, and they can be easily
improved to receive as many signals as desired.
The receiver and transmitter components provide serial asynchronous transmission of
data from and to a PC machine.
7.2. Drawbacks:
The algorithm used to process the signal works and can be used to process more signals
simply doing some copy-paste job and adjusting three parameters. However this is not a
good way of programming, as it takes to a lot of rubbish code and to the consumption
of many unneeded resources.
The major drawback of this system comes with the transmiting and receiving modules.
Looking at Figures 53 and 56 we can see why. One of the main reasons to choose the
FPGA technology to develop the project was that FPGAs are capable of working in
parallel, one of the first requirements of the project. This capability makes FPGAs very
fast devices, another requirement of the project, as timing is really important. Looking
at Fig. 53 we can see that it takes approximately 525 s to receive and process the code
to start recording from the PC. If a valid signal has to last a minimum of 100s, that
result on the possible loose of 6 valid signals. Besides if more orders were sent from the
PC, with 6 signals sent no record would be possible. One similar thing happens with the
transmitter device. Looking at Fig. 56 we see that it takes approximately 450s to
transmit one integer value. In the worst case analysis:
64ports x 64values = 4096 values must be sent
4096values x 450s = 1843200 s = 1.843200 s
4096values x 12bits = 49152 bits
This value could not be seen as a very high value, but a transmition that last seconds for
this relatively small amount of data is unacceptable with the actual technology.
The time delays must be avoided in the measure of possible for this project. Besides not
real tests have been made, and with them probably some offsets due to interferences and
noise will increase time delays. So, these two drawbacks make the interface created to
interact with the PC machine totally useless with our system.
49
Jorge Cervera
8. References
1. http://en.wikipedia.org/wiki/FPGA, last access 4th April 2008
2. http://en.wikipedia.org/wiki/VHDL, last access 7th April 2008
3. http://en.wikipedia.org/wiki/Verilog, last access 7th April 2008
4. http://www.altera.com, last access 15th April 2008
5. http://www.xilinx.com, last access 10th April 2008
6. http://www.fpga4fun.com last access 28th May 2008
7. http://www.model.com, last access 12th April 2008
8. Digital Design Principles and Practices4th Edition, John F. Wakerly, Prentice
Hall.
9. VHDL 3rd Edition, Douglas Perry, McGraw-Hill.
50
Jorge Cervera
10. John V. Oldfield and Richard C. Dorf Field Programmable Gate ArraysReconfigurable Logic for Rapid Prototyping and Implementation of Digital
Systems, Wiley Interscience, 1995.
11. Lennart Lindh, Tommy Klevin. Progammerbara kretsar, Utveckling av
inbyggda system.
12. Richard A. Blum, An Electronic System For Extracellular Neural Stimulation
And Recording, Georgia Institute of Technology August 2007.
13. Tobias Nyberg, Akiyoshi Shimada, Keiichi Torimitsu, Ion conducting polymer
microelectrodes for interfacing with neural networks, NTT Basic Research
Laboratories, NTT Corporation, Atsugi, Kanagawa 243-0198, Japan, 9 August
2006.
14. Yasuhiko Jimbo, Nahoko Kasai, Keiichi Torimitsu, Takashi Tateno, and Hugh
P. C. Robinson, A System for MEA-Based Multisite Stimulation, IEEE
Transactions on Biomedical Engineering, Vol.50, No.2, February 2003.
15. Douglas E. Ott and Thomas J. Wilderotter, "A Designer's Guide to VHDL
Synthesis", Kluwer Academic Publishers.
16.
17.
David Pellerin and Douglas Taylor, "VHDL Made Easy", Prentice Hall.
Charles E. Roth, Jr., "Digital System Design Using VHDL" , PWS Publishing
Company.
51
Jorge Cervera
Type
Bus_2
Bus_6
matrix
52
Jorge Cervera
53
Jorge Cervera
54