Forum Discussion
Altera_Forum
Honored Contributor
16 years agoLUT help!!!
I have wrote this code for implementing a neural network.What it does is to take some values(inputs) and some weights and computes the SUM(values*weigths).What i want to do is to check if the total s...
Altera_Forum
Honored Contributor
16 years agoyes, have 4 inputs, and sum them
process(clk)
variable sum : integer range 0 to 1023;
begin
if rising_edge(clk) then
if load = '1' then
sum := X1 + X2;
sum := sum + X3;
sum := sum + X4;
output <= sum;
end if;
end if;
end process;