I have a state machine that uses a component that is a state machine by itself. To implement the state machine I’m using a new type:
type state_machine is
(
st_idle,
st_cycle_1,
...
st_cycle_17
);
that is defined inside the architecture of the inner state machine. Can I also define a type state_machine that will have other states in the architecture of the outside component without them clashing?
Yes you can. A type definition within an architecture is a local definition and can not be seen outside of that particular architecture.
Thus it is possible to use the same type name over and over again in all of your architectures, e.g. as FSM type. If this is reasonable is another question and can not be answered generally. I personally prefer to use self-documenting names for FSMs, because this can be a great help for others(and myself after a few weeks) looking at your code; for small FSMs or if there is only one FSM in the module(which itself is well documented) this is not as big a problem.
It is however possible that a type definition within an architecture collides with the type definition of an imported library. Just to mention it.