X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/rpi-motor-control.git/blobdiff_plain/3195d1e08e675b2a7a5b70c8b276eb825abf77c8..b6df166687a18bf315da7f6ceca14f1aececd053:/pmsm-control/dff.vhdl diff --git a/pmsm-control/dff.vhdl b/pmsm-control/dff.vhdl new file mode 100644 index 0000000..c703058 --- /dev/null +++ b/pmsm-control/dff.vhdl @@ -0,0 +1,26 @@ +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; + +entity dff is + port ( + clock: in std_logic; + d: in std_logic; + q: out std_logic + ); +end dff; + +architecture behavioral of dff is + signal data: std_logic := '0'; +begin + q <= data; + + process + begin + wait until clock'event and clock = '1'; + data <= d; + end process; + +end behavioral;