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

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I would like to know what is difference between LAbview FPGA (it seems alos generate the code in altera) simulation and Altera simulations in Verilog or VHDL?

    I have the diagram in Simulink so I have relating question --what is the most actual forums and discussion board on Simulink and especially Micro-cap, as the last one is very seldom in internet. And concerning the Microcap--could I use some conveter to or from Micro-cap to another environments such as Altera, Simulink and so on?