blob: 6968e254dce16a24e79da4bb443381978e2d4513 (
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
29
|
library ieee;
use ieee.std_logic_1164.all;
entity repro2 is
port (
clk_i : in std_logic;
rst_n_i : in std_logic;
vec_i : in std_logic_vector(0 to 0)
);
end repro2;
architecture rtl of repro2 is
signal s_sel : natural range vec_i'range;
signal s_true : std_logic;
begin
s_true <= '1';
process (clk_i)
begin
if rising_edge(clk_i) then
for i in vec_i'range loop
if s_true = '1' then
s_sel <= i;
exit;
end if;
end loop;
end if;
end process;
end rtl;
|