Skip to content

Commit

Permalink
Get key not setting Vx
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrie committed Jan 13, 2019
1 parent 86b1f06 commit 92f7421
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpu.v
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,10 @@ module cpu(input wire clk,
pc <= pc;
else begin
for (i = 15; i >= 0; i--)
if (keys[i])
vx <= i[7:0];
if (keys[i]) begin
new_vx <= i[7:0];
state <= STATE_STORE_VX;
end
end
end
8'h15: begin
Expand Down

0 comments on commit 92f7421

Please sign in to comment.