Forum Discussion
Altera_Forum
Honored Contributor
12 years agoHello dear,
I took an example from a book (commented in code) and I made some modifications. The code (attached) model a layer with three neurons in which I am intending to make a component and create a neural network from it later. The code was compiled and is syntactically correct. My doubt is about this piece of code, where there is a shift register operation: -- shift register inference. if(clk'event and clk='1') then weight:= w & weight(1 to n*m-1); end if; That logical AND operation between the input vector of bits 'w' (assuming that it is considered to be a vector of bits) and the 'weight' array of type 'w', is to be considered occurring between 'w' and all elements of 'weight' inside the 'if' statement? Or just between the first elemente of 'weight'? Sorry if this doubt could seem simple, I am comming from languages like C/java. I am looking for a intuitive explanation about this shifting register operation. It seems to differ from the logical n-bits shifting which I know. thanks,