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.
This commit is contained in:
2025-04-21 08:48:06 +00:00
parent daa1abf477
commit 032960103c

21
libs/OPCodes.vhd Normal file
View File

@@ -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;