aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue2231/areset.vhdl
blob: fb20e2a3131abc196b46c459dc16c5380037e9e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
library ieee;
use ieee.std_logic_1164.all;

entity areset is
	port (
		clk_sys : in std_logic;
		reset_n : in std_logic;
		d : in std_logic;
		q : out std_logic_vector(1 downto 0)
	);
end entity;

architecture rtl of areset is
	signal q_i : std_logic_vector(1 downto 0);
begin

	process(clk_sys,reset_n) begin
		if reset_n='0' then
			q_i(0)<='0';
		elsif rising_edge(clk_sys) then
			q_i(1)<=d;
			q_i(0)<='1';
		end if;
	end process;

	q<=q_i;

end architecture;