SHORT DESCRIPTION - High Speed Digital Systems Laboratory
Download
Report
Transcript SHORT DESCRIPTION - High Speed Digital Systems Laboratory
Technion - Israel institute of technology
department of Electrical Engineering
מכון טכנולוגי לישראל- הטכניון
הפקולטה להנדסת חשמל
High speed digital systems laboratory
המעבדה למערכות ספרתיות מהירות
Final presentation:
Optical Stimulation System for Brain Waves
Detection & Measurements
Presenters:
Alterman Igal :
Minkin Dmitry:
306403650
320576473
Supervised by: Broodney Hen.
Winter Semester 2002 - 2003
SHORT DESCRIPTION
• Our project deals with measuring eye vision of the
patient without the necessity of his cooperation.
• A patient is receiving optical stimulation and his brain
waves are being collected by Sampling card (Brain wave
collector device).
• While stimulation, our system generates a signal to
synchronize between stimulation moment and Sampling
card.
SYNCHRONIZER
SOLUTION
• Video card with 2 outputs &
a screen splitter
Hardware
prototype
• VHDL code for controlling
pulse width
Software
prototype.
• Editing software code
• Integration
GUI and
Software for
controlling
stimulation.
Pulse
synchronizer
OUR SYSTEM
BLOCK DIAGRAM
Sampling
system
Multiplexer
Pulse Sync.
Stimulation
Out 1
Splitter
Video Card
Out2
pic 2
step 1
Operator
Display /
Sampling card
program.
•It was decided to use:
•Two-port Video Card: first port to
stimulation, and the second to splitter.
•Splitter:
- first output to patient display
- second output to the Pulse Sync.
Remark: why not to use 2 video cards?
Software implementation
• Graphical User Interface: using VB
- choose parameters and set pulse length
• Run-time module : drawing and flipping pictures through
DirectDraw (with normal priority).
Hardware implementation
•
Output signal through hardware, based on [R,G,B,Vsync]
signals.
• Hardware consists of analog (comparators etc.) and digital
(Altera) circuits.
Integration
•
Before every set of steps we declare in VBasic:
• “Start program!”
• “Pulse length!”
• “Start flipping!”
• During flipping:
•“Picture 1”
• “Picture 2”
• After every set of steps we declare:
• “Stop flipping!”
“Start program!” :
• A blank screen with 3 lines
- complementary of green (red+blue)
- complementary of red (green+blue)
- white.
Complementary colors were used in order to separate two
phases of the process:
• Program start and encoding pulse length
• Flipping pictures
White color was used in order to distinguish two
consecutive colors.
“Pulse length!” :
• Retrieving pulse length (integer) from the
user (GUI).
• Convert pulse length (in usec) to number of
clocks, and then translate into a set of bits.
• Sending each bit – lsb first:
“0” – complementary of red line.
“1” – complementary of blue line.
“Start flipping!” :
• Complementary of green line.
“Flipping!” :
• “Picture 1” + red line
• “Picture 2” + blue line
“Stop flipping!” :
• Green line.
All lines are being read by hardware
and treated appropriately.
SCHEME
Picture changed?
Vcc
input
R
G
B
Vs
0 – 1.4 V
Array of
Comparators
5V
Set pulse
width…
ALTERA
MAX7000s
Pulse length
3.3 V
Pulse length
CLK
BUFFER
5V
BNC
Sampling Card
IBM 3174
IBM PS/2
PC
Altera simplified structure :
Picture changed?
Set pulse
width…
ALTERA
MAX7000s
Bit
R
G
B
Vsync
FFX
Signal
shaper
Shift reg.
Pulse length
[bits]
(saving
pulse length)
Insert
State
Machine
Trigger
Pulse
generator
To
Sampling
card
FFX
• This unit is designed to solve the metastability
problem
• This problem occurs when introducing an
asynchronous signal into a digital (synchronized)
system, using Flip-Flops.
• The most common way to tolerate metastability is
to add one or more successive synchronizing flipflops.
Altera simplified structure :
Picture changed?
Set pulse
width…
ALTERA
MAX7000s
Bit
R
G
B
Vsync
FFX
Signal
shaper
Shift reg.
Pulse length
[bits]
(saving
pulse length)
Insert
State
Machine
Trigger
Pulse
generator
To
Sampling
card
Signal shaper
• The purpose of this unit is to distinguish "pure" (not
mixed) colors.
• Whenever a pure color (only red, green or blue) is given
– then the appropriate output
Red
(1,0,0)
Sig. Sh.
(red, green or blue) is set to "1“
- Otherwise, all outputs are
"0".
Red + Blue
This component is implemented by a truth table.
Sig. Sh.
(0,0,0)
Altera simplified structure :
Picture changed?
Set pulse
width…
ALTERA
MAX7000s
Bit
R
G
B
Vsync
FFX
Signal
shaper
Shift reg.
Pulse length
[bits]
(saving
pulse length)
Insert
State
Machine
Trigger
Pulse
generator
To
Sampling
card
State Machine
Reset
~Green – ~Red –White
Ready to read pulse length
Idle
White
White
~Green
Input:
Red – R
Green – G
Blue – B
Vsync
~Red – complimentary of R
~Green – complimentary of G
~Blue – complimentary of B
Output:
Insert
Trigger
Bit
~Blue
~Red
~Green
Finished
to read pulse length
Bit<=0;
Insert = ‘1’;
Bit<=1;
Bit<=0;
Insert = ‘1’;
Vsync
Start
Bit<=0;
flipping
Red
Blue
Got Red
Bit<=0;
Got Blue
Bit<=0;
Red
Red
IdleGreen
Blue
Vsync
Vsync
Was
Vsync
Bit<=0;
Got Blue
Bit<=0;
Trigger
Blue
pulse
Got Red
Bit<=0;
Trigger
pulse
Red
Was
Vsync
Bit<=0;
Blue
GreenIdle
Altera simplified structure :
Picture changed?
Set pulse
width…
ALTERA
MAX7000s
Bit
R
G
B
Vsync
FFX
Signal
shaper
Shift reg.
Pulse length
[bits]
(saving
pulse length)
Insert
State
Machine
Trigger
Pulse
generator
To
Sampling
card
Shift register
• This unit stores and
forms Pulse length
• Its inputs are given by
the state machine
Pulse Length
0 1 0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1
Pulse length
Pulse generator
Trigger
• This unit outputs Pulse
according to Pulse length data.
• Output occurs when triggered
by the state machine.
Pulse
generator
Integration problems
• Metastability, occurs when asynchronous inputs
are involved.
• Inputs that arrived exactly when the clock has
risen, cause the state machine to be in an
undefined state, and therefore to act unpredictably.
• The Altera interface (Max Plus II) declares
“success” even though the “burning” process
didn’t really take place.
• Vsync has opposite polarity at 2 outputs of the
video card.
• The same screen may be redrawn several times –
new Vsync edge ≠> new input signals.
• The state machine can’t distinguish 2 identical
consecutive lines.
• A malfunction of one of the components causes
push-back.
TECHNICAL
SPECIFICATIONS
•
•
•
•
21 inch monitor
Matrox Millennium Dual Head 550.
Video splitter.
Brain wave collector device with appropriate
pc-card.
• DirectX 8.x SDK installed on the computer.
• 5V DC Power Supply.