Newbie level 1
Hi. In vhdl, if a fsm needed to stay in a specific state for a specific number of clock cycles (for example, 1000), and you wanted to keep track of them using a counter, would you instantiate it within the fsm's architecture or somewhere else (e.g. the datapath) ? I ask because it doesn't feel right to put it along with the datapath stuff because the 'passing data' never interacts with the counter, but putting it along with the fsm code seems weird too. It almost seems that you need datapath, fsm, and a third conceptual placeholder for 'fsm peripherals'. What do you think?