allgemein: konstanten verwenden
[hwmod.git] / src / gen_pkg.vhd
index 216d9f0e9962259e3f9cf7d578897a588a582069..dfe664c1fb05b077a27ef2e4ae84de0cf9bb117c 100644 (file)
@@ -18,16 +18,20 @@ package gen_pkg is
        -- integer ist 32bit (31bit + sign)
        subtype cinteger is integer;
 
-       -- 50 zeilen * 71 zeichen * 2 (berechnung + ergebnis) = 7100 bytes
-       constant hspalte_max : integer := 71;
-       constant hzeile_max : integer := 100;
-       constant H_RAM_SIZE : integer := 7100;
-       constant H_RAM_WIDTH : integer := log2c(H_RAM_SIZE);
+
+       constant HSPALTE_MAX : integer := 71;
        subtype hspalte is std_logic_vector(6 downto 0);
+
+       constant HZEILE_MAX : integer := 100;
        subtype hzeile is std_logic_vector(6 downto 0);
+
+       -- 50 zeilen * 71 zeichen * 2 (berechnung + ergebnis) = 7100 bytes
+       constant H_RAM_SIZE : integer := HZEILE_MAX * HSPALTE_MAX;
+       constant H_RAM_WIDTH : integer := log2c(H_RAM_SIZE);
+
        subtype hbyte is std_logic_vector(7 downto 0);
-       subtype hstring is string(1 to 72);
-       subtype hstr_int is integer range 0 to 72;
+       subtype hstring is string(1 to HSPALTE_MAX+1);
+       subtype hstr_int is integer range 0 to HSPALTE_MAX+1;
 
        procedure icwait(signal clk_i : IN std_logic; cycles: natural);