I'm implementing a tetris game using basys 3 on 8x8 led matrix.
reg [7:0]redBlock;
reg [7:0]backupRed= 8'b00011000;
reg [7:0]temp;
assign redBlock=(toRight& oe) ? backupRed>> 1 : backupRed;
This code is working the redblock on led matrix goes right when I push button toRight but of couse it goes back to it's initial position since the condition 0 is equal to backupRed
What I really want is
reg [7:0]redBlock = 8'b00011000;;
reg [7:0]backupRed;
reg [7:0]temp;
assign redBlock=(toRight& oe) ? redBlock>> 1 : redBlock;
which should update the previous location of redBlock but it gives error
Variable redBlcok is written by both continuous and procedural assigments
I'm using Vivado for implemantion
Here is 10sec video of what I meant