D
Dan
Guest
Hi,
I've created a FSM and, inside it, a counter to count the clock cycles
between transitions.
Maybe it's too simple but I don't see how can I reset the *counter* from
inside the state machine?
Example:
entity FSM is
Port ( Clk : in STD_LOGIC;
Reset : in STD_LOGIC;
...);
end FSM;
architecture Behavioral of FSM is
component Counter
port ( Clk : in STD_LOGIC;
Clear : in STD_LOGIC;
....);
end component;
.....
U1: Counter port map (<I don't know what signals include here>);
.....
when S2 =>
if .... then
Next_State <= S3;
Signal <= '1'; -- Reset the counter
end if;
.....
The "Reset" signal of the FSM returns to state S0, so that's not what I
want, I only want to reset the counter.
I'm stuck, any ideas?
I've created a FSM and, inside it, a counter to count the clock cycles
between transitions.
Maybe it's too simple but I don't see how can I reset the *counter* from
inside the state machine?
Example:
entity FSM is
Port ( Clk : in STD_LOGIC;
Reset : in STD_LOGIC;
...);
end FSM;
architecture Behavioral of FSM is
component Counter
port ( Clk : in STD_LOGIC;
Clear : in STD_LOGIC;
....);
end component;
.....
U1: Counter port map (<I don't know what signals include here>);
.....
when S2 =>
if .... then
Next_State <= S3;
Signal <= '1'; -- Reset the counter
end if;
.....
The "Reset" signal of the FSM returns to state S0, so that's not what I
want, I only want to reset the counter.
I'm stuck, any ideas?