]> rtime.felk.cvut.cz Git - fpga/uart.git/commitdiff
Clear of FIFO overflow flag capability added.
authorVladimir Burian <buriavl2@fel.cvut.cz>
Sat, 22 Jan 2011 22:41:13 +0000 (23:41 +0100)
committerVladimir Burian <buriavl2@fel.cvut.cz>
Sat, 22 Jan 2011 22:41:13 +0000 (23:41 +0100)
fifo.vhd
uart.vhd

index 99abce7a8b9431b74304904556058300fcd07acd..04213f1c71a33da631a42a79805da454dd9102a0 100644 (file)
--- a/fifo.vhd
+++ b/fifo.vhd
@@ -12,6 +12,7 @@ entity fifo is
     reset    : in  std_logic;
     we       : in  std_logic;
     re       : in  std_logic;
+    clear_ow : in  std_logic;
     d_in     : in  std_logic_vector (7 downto 0);
     d_out    : out std_logic_vector (7 downto 0);
     full     : out std_logic;
@@ -57,6 +58,10 @@ begin
           length <= length + 1;
         end if;
       end if;
+      
+      if (clear_ow = '1') then
+        overflow <= '0';
+      end if;
     end if;
   end process;
 
index fe5714f31833c5d9917e7b056c34c823d009067f..a5999089a11135173158276724b9db9ee5b7e5f8 100644 (file)
--- a/uart.vhd
+++ b/uart.vhd
@@ -75,6 +75,7 @@ architecture dataflow of uart is
       reset    : in  std_logic;
       we       : in  std_logic;
       re       : in  std_logic;
+      clear_ow : in  std_logic;
       d_in     : in  std_logic_vector (7 downto 0);
       d_out    : out std_logic_vector (7 downto 0);
       full     : out std_logic;
@@ -160,6 +161,7 @@ begin
     reset    => puc,
     we       => tx_fifo_we,
     re       => tx_fifo_re,
+    clear_ow => '0',
     d_in     => per_din (7 downto 0),
     d_out    => tx_data,
     full     => open,