From 032960103cc45a1e64dbf70e050f0d204809984a Mon Sep 17 00:00:00 2001 From: MaxP Date: Mon, 21 Apr 2025 08:48:06 +0000 Subject: [PATCH] Adds OPCodes package for sprite operations Defines constants for various sprite-related operations, including no-op, setting sprite ID, position, requesting row data, and clearing all. Provides a standardized set of codes for use in VHDL designs. --- libs/OPCodes.vhd | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 libs/OPCodes.vhd diff --git a/libs/OPCodes.vhd b/libs/OPCodes.vhd new file mode 100644 index 0000000..858ad3f --- /dev/null +++ b/libs/OPCodes.vhd @@ -0,0 +1,21 @@ +library ieee; +use ieee.std_logic_1164.all; + +package OPCodes is + + --@ No operation OP-Code + constant K_OP_NOP : std_logic_vector(3 downto 0) := "0000"; + --@ OP-Code for new line + constant K_OP_NEWLINE : std_logic_vector(3 downto 0) := "0001"; + --@ OP-Code for set sprite ID + constant K_OP_SET_ID : std_logic_vector(3 downto 0) := "0010"; + --@ OP-Code for set X position + constant K_OP_SET_X : std_logic_vector(3 downto 0) := "0011"; + --@ OP-Code for set Y position + constant K_OP_SET_Y : std_logic_vector(3 downto 0) := "0100"; + --@ OP-Code for request sprite data for row + constant K_OP_REQ_ROW_DATA : std_logic_vector(3 downto 0) := "0101"; + --@ OP-Code for clear all + constant K_OP_CLEAR_ALL : std_logic_vector(3 downto 0) := "1111"; + +end package OPCodes; \ No newline at end of file