--
LIBRARY IEEE;
USE IEEE.std_logic_1164.ALL;
--
LIBRARY work;
USE WORK.synthesis_utilities.ALL;
USE WORK.synthesis_parameters.ALL;
--
PACKAGE global_environment IS
FUNCTION zero_12_f RETURN twelve_node_ptr;
SHARED VARIABLE zero_12 : twelve_node_ptr := zero_12_f; --("000000000000",NU
LL);
FUNCTION zero_8_f RETURN byte_node_ptr;
SHARED VARIABLE zero_8 : byte_node_ptr := zero_8_f; --std_logic_vector (7 D
OWNTO 0) := "00000000";
FUNCTION zero_4_f RETURN nibble_node_ptr;
SHARED VARIABLE zero_4 : nibble_node_ptr := zero_4_f;
SIGNAL cck : std_ulogic := '0';
SIGNAL halt : std_logic := '0';
SHARED VARIABLE ac_out, ir_out, alu_out, obus : byte_node_ptr:= zero_8;
SHARED VARIABLE pc_out : twelve_node_ptr := zero_12;
SHARED VARIABLE mar_page_out : nibble_node_ptr := zero_4;
SHARED VARIABLE mar_offset_out : byte_node_ptr := zero_8;
SHARED VARIABLE dbus : byte_node_ptr := zero_8;
SHARED VARIABLE alu_flags, shu_flags, sr_out : nibble_node_ptr := zero_4;
SHARED VARIABLE mar_page_bus : nibble_node_ptr := zero_4;
SHARED VARIABLE mar_offset_bus : byte_node_ptr := zero_8;
SHARED VARIABLE databus : byte_node_ptr := zero_8;
SHARED VARIABLE adbus : twelve_node_ptr := zero_12;
PROCEDURE test;
END global_environment;
PACKAGE BODY global_environment IS
--------------------- just for initial value
FUNCTION zero_12_f RETURN twelve_node_ptr IS
VARIABLE temp : twelve_node_ptr;
BEGIN
temp := NEW twelve_node;
temp.val := "000000000000";
temp.link := NULL;
RETURN temp;
END zero_12_f;
FUNCTION zero_8_f RETURN byte_node_ptr IS
VARIABLE temp : byte_node_ptr;
BEGIN
temp := NEW byte_node;
temp.val := "00000000";
temp.link := NULL;
RETURN temp;
END zero_8_f;
FUNCTION zero_4_f RETURN nibble_node_ptr IS
VARIABLE temp : nibble_node_ptr;
BEGIN
temp := NEW nibble_node;
temp.val := "0000";
temp.link := NULL;
RETURN temp;
END zero_4_f;
-------------------------
PROCEDURE test IS
VARIABLE t : INTEGER;
BEGIN
t:=1;
END test;
END global_environment;