moved constants to generic package
[hwmod.git] / src / pc_communication.vhd
index 4e2cc41a0de87b4291976f85c8b4da5b91d24d6f..dea269b6d13b4c8cd4f3b3205b86ea4839ef8f97 100644 (file)
@@ -17,7 +17,7 @@ entity pc_communication is
                tx_done : in std_logic;
 
                --uart_rx
-               rx_data : in std_logic_vector(7 downto 0); --not really required
+               rx_data : in std_logic_vector(7 downto 0);
                rx_new : in std_logic;
 
                -- History
@@ -32,8 +32,8 @@ end entity pc_communication;
 architecture beh of pc_communication is
        signal push_history, push_history_next : std_logic;
 
-       signal spalte, spalte_next : integer range 1 to 73;
-       signal zeile , zeile_next : integer range 1 to 73;
+       signal spalte, spalte_next : integer range 1 to hspalte_max + 1;
+       signal zeile , zeile_next : integer range 1 to hzeile_max + 1;
        signal spalte_up, spalte_up_next : std_logic;
        signal get, get_next : std_logic;
        signal new_i, new_i_next : std_logic;
@@ -111,13 +111,12 @@ begin
                spalte_next <= spalte;
                zeile_next <= zeile;
 
-               if (spalte_up = '1') then
-                       if (spalte > 72) then
-                               if zeile + 1 > 50 then 
+               if spalte_up = '1' then
+                       if spalte = hspalte_max  then
+                               if zeile = hzeile_max then
                                        spalte_next <= 1;
                                        zeile_next <= 1;
-                                       s_done_next <= '1'; --lets assume this false
-                                       --assert false severity failure;
+                                       s_done_next <= '1';
                                else
                                        spalte_next <= 1;
                                        zeile_next <= zeile + 1;