7. One or more non-transitory computer readable media storing instructions executable by a processor, the media storing one or more instructions for: generating an intermediate representation of a state diagram, the intermediate representation being generated based on syntax and semantics of the state diagram, the intermediate representation representing semantics of the state diagram; mapping the semantics represented by the intermediate representation to semantics of a hardware description language; and generating code in the hardware description language based on the mapping of the semantics represented by the intermediate representation to semantics of the hardware description language.
7. One or more non-transitory computer readable media storing instructions executable by a processor, the media storing one or more instructions for: generating an intermediate representation of a state diagram, the intermediate representation being generated based on syntax and semantics of the state diagram, the intermediate representation representing semantics of the state diagram; mapping the semantics represented by the intermediate representation to semantics of a hardware description language; and generating code in the hardware description language based on the mapping of the semantics represented by the intermediate representation to semantics of the hardware description language. 8. The medium of claim 7 , further storing one or more instructions for: running one or more transforms on the intermediate representation to optimize the intermediate representation.