J
J.Ram
Guest
Hi all,
my objective is to get outpn value when rising_edge of clk and low
reset.
when i written code , and in simulation result outpn value is comes
after one clk
cycle after reset goes to low, but my need is to get outpn at the
moment reset goes low.
here is my code.
entity pn is
port(
clk,reset : in std_logic;
outpn : std_logic);
end pn;
architecture test of pn is
type data is array(1 to 6) of std_logic;
signal buff : data;
begin
process(clk,reset)
variable input : std_logic;
begin
if reset = '1' then
outpn <= 'X';
elsif clk'event and clk ='1' then
input := buff(1) xor buff(6);
buff(1) <= input;
buff(2) <= buff(1);
buff(3) <= buff(2);
buff(4) <= buff(3);
buff(5) <= buff(4);
buff(6) <= buff(5);
end if;
outpn <= buff(6);]
end process;
end test;
my objective is to get outpn value when rising_edge of clk and low
reset.
when i written code , and in simulation result outpn value is comes
after one clk
cycle after reset goes to low, but my need is to get outpn at the
moment reset goes low.
here is my code.
entity pn is
port(
clk,reset : in std_logic;
outpn : std_logic);
end pn;
architecture test of pn is
type data is array(1 to 6) of std_logic;
signal buff : data;
begin
process(clk,reset)
variable input : std_logic;
begin
if reset = '1' then
outpn <= 'X';
elsif clk'event and clk ='1' then
input := buff(1) xor buff(6);
buff(1) <= input;
buff(2) <= buff(1);
buff(3) <= buff(2);
buff(4) <= buff(3);
buff(5) <= buff(4);
buff(6) <= buff(5);
end if;
outpn <= buff(6);]
end process;
end test;