Home > other >  VIVADO HLS write a shift register with the read?
VIVADO HLS write a shift register with the read?

Time:09-17

With the read:
The static ap_shift_reg & lt; Int, 4 & gt; Sreg;
Int var1.
//Read the location of 2 Sreg into var1
Var1=Sreg. Read (2);

Don't:
The static ap_shift_reg & lt; Int, 4 & gt; Sreg;
Int var1.
Var1=Sreg. Shift (In1, 3);//Read the location of 3 Sreg into var1; THEN shift all values up one, and the load In1 into the location 0
Because the official manual has given the Sreg. Shift (In1, 3) is the ability to read, don't use the read only to avoid the output of four is 0? But I think even if the output is 0 if there's nothing wrong?
  • Related