המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory...

24
תתתת תתתתתתת תתתתתתת תתתתתתh speed digital systems laboratory ת ןןןןןן תתתת- תתתתתתתת תתתתתת תתתתתתת ת ןןןןן ןןןןnion - Israel institute of technology rtment of Electrical Engineering Final presentation: Optical Stimulation System for Brain Waves Detection & Measurements Presenters: Alterman Igal : 306403650 Minkin Dmitry: 320576473 Supervised by: Broodney Hen. Winter Semester 2002 - 2003
  • date post

    20-Dec-2015
  • Category

    Documents

  • view

    244
  • download

    13

Transcript of המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory...

Page 1: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

- מכון טכנולוגי טכניוןהלישראל

הנדסת חשמלהפקולטה ל

Technion - Israel institute of technologydepartment of Electrical Engineering

Final presentation:

Optical Stimulation System for Brain Waves Detection & Measurements

Presenters:

Alterman Igal : 306403650Minkin Dmitry: 320576473

Supervised by: Broodney Hen.

Winter Semester 2002 - 2003

Page 2: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

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.

Page 3: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

SYNCHRONIZER

Page 4: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

SOLUTION

Softwareprototype.

Hardware prototype

OUR SYSTEM

• Video card with 2 outputs & a screen splitter

• VHDL code for controlling pulse width

• Editing software code

• IntegrationGUI and Software for controlling stimulation.

Pulse synchronizer

Page 5: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

Sampling system

Out 1

Video CardOut2

BLOCK DIAGRAM

Operator Display / Sampling card program.

step 1

pic 2

Stimulation

Pulse Sync.Multiplexer

Splitter

Page 6: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

•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?

Page 7: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

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).

Page 8: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

Hardware implementation

• Output signal through hardware, based on [R,G,B,Vsync] signals.

• Hardware consists of analog (comparators etc.) and digital (Altera) circuits.

Page 9: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

Integration• Before every set of steps we declare in VBasic:

• “Start program!”

• “Pulse length!”

• “Start flipping!”

• After every set of steps we declare:

• “Stop flipping!”

• During flipping:

•“Picture 1”

• “Picture 2”

Page 10: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

“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.

Page 11: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

“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.

Page 12: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

“Start flipping!” :

• Complementary of green line.

“Stop flipping!” :

• Green line.

All lines are being read by hardware and treated appropriately.

“Flipping!” :

• “Picture 1” + red line

• “Picture 2” + blue line

Page 13: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

SCHEME

CLK

Vccinput

Array ofComparators

ALTERAMAX7000s

BUFFER

Picture changed?

Set pulse width…

IBM 3174

Sampling Card

BNC

IBM PS/2

PC

RGBVs

0 – 1.4 V5V

Pulse length

3.3 V

Pulse length

5 V

Page 14: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

Altera simplified structure :

ALTERAMAX7000s

Picture changed?

Set pulse width…

To Sampling card

Pulse generator

Trigger

Pulse length [bits]

Shift reg.

(saving pulse length)

Bit

Insert

R

G

B

Vsync

FFXSignalshaper

State Machine

Page 15: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

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 flip-flops.

Page 16: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

Altera simplified structure :

ALTERAMAX7000s

Picture changed?

Set pulse width…

To Sampling card

Pulse generator

Trigger

Pulse length [bits]

Shift reg.

(saving pulse length)

Bit

Insert

R

G

B

Vsync

FFXSignalshaper

State Machine

Page 17: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

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, green or blue) is set to "1“

Sig. Sh.Red + Blue (0,0,0)

Sig. Sh.Red (1,0,0)

- Otherwise, all outputs are "0".

This component is implemented by a truth table.

Page 18: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

Altera simplified structure :

ALTERAMAX7000s

Picture changed?

Set pulse width…

To Sampling card

Pulse generator

Trigger

Pulse length [bits]

Shift reg.

(saving pulse length)

Bit

Insert

R

G

B

Vsync

FFXSignalshaper

State Machine

Page 19: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

State Machine

Idle

Reset

~Green – ~Red –WhiteReady to read pulse length

~RedBit<=0;

Insert = ‘1’; Bit<=0;Bit<=1;

Insert = ‘1’;

~Blue

Bit<=0;Start flipping

~Green

Red

Input: Red – R Green – G Blue – B Vsync ~Red – complimentary of R ~Green – complimentary of G ~Blue – complimentary of B

Output: Insert Trigger Bit

Bit<=0;

Got Blue

Trigger pulse

WhiteWhite

Bit<=0;

Got Red

Trigger pulse

Bit<=0;

Was VsyncBit<=0;

Was Vsync

Bit<=0;Got BlueBit<=0;

Got Red

Blue

Idle Idle

Finished to read pulse length

~Green

Vsync

VsyncRed

Blue

Vsync Blue

Red

Red Blue

GreenGreen

Page 20: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

Altera simplified structure :

ALTERAMAX7000s

Picture changed?

Set pulse width…

To Sampling card

Pulse generator

Trigger

Pulse length [bits]

Shift reg.

(saving pulse length)

Bit

Insert

R

G

B

Vsync

FFXSignalshaper

State Machine

Page 21: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

Shift register

• This unit stores and forms Pulse length

• Its inputs are given by the state machine

Pulse generator

• This unit outputs Pulse according to Pulse length data.

• Output occurs when triggered by the state machine.

0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

Pulse Length

Pulse generator

TriggerPulse length

Page 22: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

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.

Page 23: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

• 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.

Page 24: המעבדה למערכות ספרתיות מהירות High speed digital systems laboratory הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל

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.