Skip to content

Commit 76bc1c9

Browse files
authored
Add files via upload
1 parent ef517e3 commit 76bc1c9

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Project/Code/F_reg.vhd

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
end if ;
30+
end process ;
31+
32+
33+
end Behavioral;

0 commit comments

Comments
 (0)