Hi I'm a bit confused about the implementation of Mealy state machine using VHDL. My current work is like this:

```
process(clk, rst)
begin
    if rst = '1' then
        state <= s1;
    elsif (clk'event and clk = '1') then
        state <= next_state;
    end if;
end process;

```

and another process like this:

```
process(state, op)
begin
    case state is
    when s1 =>
    ...some implementation
end process;

```

And now the problem is: I need to detect the press of the button from the user, but I'm not sure where to put it. Should it be inside the first process or the second process? Besides, I also looked through the following guide: [implement state machine in FPGA](http://www.rs-online.com/designspark/electronics/knowledge-item/how-to-implement-state-machines-in-your-fpga), is it okay to use just one process for the Mealy machine as shown on the webpage? If it is so then I think the work will be easier. Thanks!