From 3d6a5eaa3ea7e23f3ee8612286f0c1cdc4f7f7cd Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 4 Jan 2022 10:29:11 +0100 Subject: [PATCH] fixes --- sources_snake/RAMController.vhd | 1 + sources_snake/updateSnake.vhd | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sources_snake/RAMController.vhd b/sources_snake/RAMController.vhd index 69bdd08..bbf3a3d 100644 --- a/sources_snake/RAMController.vhd +++ b/sources_snake/RAMController.vhd @@ -111,6 +111,7 @@ end process; RAMClk <= clk; output <= to_pos(snakeOut); +listRefs <= matAddresses; GENERATEDX : for dx in -1 to 1 generate GENERATEDY : for dy in -1 to 1 generate diff --git a/sources_snake/updateSnake.vhd b/sources_snake/updateSnake.vhd index 5fc762b..1d383be 100644 --- a/sources_snake/updateSnake.vhd +++ b/sources_snake/updateSnake.vhd @@ -84,11 +84,11 @@ begin -- when others => currentSnake.isDefined <= '0'; --end case; - if(index < 12) then + if(index < 13) then currentSnake.X <= to_unsigned(8+to_integer(index)*16,10); currentSnake.Y <= to_unsigned(8,9); - currentSnake.dirX <= to_signed(0,2); - currentSnake.dirY <= to_signed(1,2); + currentSnake.dirX <= to_signed(-1,2); + currentSnake.dirY <= to_signed(0,2); currentSnake.isDefined <= '1'; else currentSnake.X <= to_unsigned(8,10);