Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

[vhdl] artificial neural network

Hello,

I'm interested in neural networks currently :)

I've written some basic ANN implementation in java with ADELINE neurons. (Actually, this is only the background of the problem)

I'd like to write a simple neuron in vhdl.

input vector is multiplied by weigths, result is sum. If result is > 0 then output = -1 else output = 1

And here comes the problem,

I have to multiply input values by weights which are real values.

I know that vhdl supports real variables but how should I use it?:confused:

I tried like that but it isn't correct code

--- Quote Start ---

variable weigth:real;

variable tmp:real;

weight:=0.1;

for i in 0 to inputvector'length - 1 loop

tmp:=tmp+(weigth*inputvector(i));

end loop;

--- Quote End ---

I'd be very gradefull for any help!

12 Replies