]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/blobdiff - pmsm-control/qcounter.vhdl
Usleep replaced by clock_nasosleep.
[fpga/rpi-motor-control.git] / pmsm-control / qcounter.vhdl
index f1378dce3baa4fa3a88136f12e7d915f09526262..92d4963b9e68945809d6cbb444000ffeb12b60cc 100644 (file)
@@ -1,9 +1,16 @@
+--
+-- * Quadrature Signal Decoder *
+-- Used for IRC sensor interfacing
+--
+-- (c) 2010 Marek Peca <hefaistos@gmail.com>
+--
+-- license: GNU LGPL and GPLv3+
+--
 library ieee;
 use ieee.std_logic_1164.all;
 use ieee.std_logic_arith.all;
 use ieee.std_logic_unsigned.all;
 use ieee.numeric_std.all;
-use work.dff.all;
 
 entity qcounter is
 port (
@@ -76,7 +83,7 @@ begin
        end process;
 
        --prechod do 3. radu (binarne)
-       comb_count: process (a_prev, b_prev, a, b, count) --proc jsou v sensitivity prev stavy?
+       comb_count: process (a_prev, b_prev, a, b, count,count_prev) --proc jsou v sensitivity prev stavy?
        begin
                if (a_prev = '0') and (b_prev = '1') and (a = '0') and (b = '0') then --posun dopredu 
                        count <= count_prev + 1;