---------------------------------------------------------------------------- -- icsp_pkg.vhd -- ICSP related Records, Types and Functions -- Version 1.0 -- -- Copyright (C) 2015 H.Poetzl -- -- This program is free software: you can redistribute it and/or -- modify it under the terms of the GNU General Public License -- as published by the Free Software Foundation, either version -- 2 of the License, or (at your option) any later version. ---------------------------------------------------------------------------- library IEEE; use IEEE.std_logic_1164.all; package icsp_pkg is subtype icsp_cmd_t is std_logic_vector(3 downto 0); constant ICSP_CMD_NOP : icsp_cmd_t := "0000"; constant ICSP_CMD_LVP : icsp_cmd_t := "0001"; -- enter LVP mode constant ICSP_CMD_W4 : icsp_cmd_t := "0010"; -- write 4bit data constant ICSP_CMD_W6 : icsp_cmd_t := "0011"; -- write 6bit data constant ICSP_CMD_W8 : icsp_cmd_t := "0100"; -- write 8bit data constant ICSP_CMD_W16 : icsp_cmd_t := "0101"; -- write 16bit constant ICSP_CMD_R16 : icsp_cmd_t := "0111"; -- read 16bit constant ICSP_CMD_ML : icsp_cmd_t := "1000"; -- set nMCLR low constant ICSP_CMD_MH : icsp_cmd_t := "1001"; -- set nMCLR high constant ICSP_CMD_MZ : icsp_cmd_t := "1010"; -- tristate nMCLR constant ICSP_CMD_SEL : icsp_cmd_t := "1110"; -- select interface constant ICSP_CMD_DLY : icsp_cmd_t := "1111"; -- delay clk cycles constant ICSP_LVP_KEY : std_logic_vector(31 downto 0) := x"4D434850"; subtype icsp_value_t is std_logic_vector(15 downto 0); type icsp_value_a is array (natural range <>) of icsp_value_t; end; package body icsp_pkg is end package body;