Forum Discussion
Altera_Forum
Honored Contributor
8 years agoFPGA Development Board - strange shift operation behavior
My development board based on: Cyclone IV EP4CE10E22C8N Quartus: 17.0.0 Lite Edition top-level entity code:
module led4_reg(clk, led);
parameter BASE_LED_SEQUENCE = 12'b000011101101...
Altera_Forum
Honored Contributor
8 years agoYou should ideally, store the previous value or initial value of the led in a register/flop. Then have it shifted out in the case. The default case may not work, but worth a try. You will understand what I mentioned if you look at how an always block will be executed.
What you need to do is to latch in or register in the default value of the led (parameter) then use this value to shift left and get your corresponding outputs. For this to happen, the value of led register should be latched or stored, then used again in the case to update for the next case item.