Skip to content

Instantly share code, notes, and snippets.

@monkey265
monkey265 / VHDL_readmemh.vhd
Created August 13, 2025 08:52
VHDL version of readmemh, will need some edits to use.
PROCEDURE READ_FROM_FILE (
file_name : string;
signal Memory : out memory_array -- Need to pass memory as parameter
) IS
file input_file : text; -- Declare file variable (not with open mode here)
variable input_line : line;
variable hex_value : std_logic_vector(63 downto 0);
variable addr : integer := 0;
BEGIN
-- Open the file using the parameter