There was an error while loading. Please reload this page.
1 parent ef517e3 commit 76bc1c9Copy full SHA for 76bc1c9
Project/Code/F_reg.vhd
@@ -0,0 +1,33 @@
1
+library IEEE;
2
+use IEEE.STD_LOGIC_1164.ALL;
3
+use Ieee.numeric_std.all;
4
+
5
+entity F_reg is
6
+ Port ( clk : in std_logic;
7
+ set : in std_logic;
8
+ reset : in std_logic;
9
+ output : out std_logic
10
+ );
11
+end F_reg;
12
13
+architecture Behavioral of F_reg is
14
15
+signal temp : std_logic ;
16
17
+begin
18
+ output <= temp ;
19
+ process ( clk )
20
+ begin
21
+ if clk'event and clk = '1' then
22
+ if set = '1' then
23
+ temp <= '1' ;
24
+ elsif ( reset ='1' ) then
25
+ temp <= '0';
26
+ else
27
+ temp <= temp;
28
+ end if ;
29
30
+ end process ;
31
32
33
+end Behavioral;
0 commit comments