FSM Editor F1.4: Vhdl code synthesis errors, Enum_encoding not declared
Keywords: Finite State Machine Editor, VHDL, FSM, Code generation, synthesis, Foundation, State Editor.
Definition: When using the FSM Editor to generate VHDL to synthesize into a macro or netlist, the synthesis tool may issue an error indicating that the 'enum_encoding' attribute has not been declared. The following is an example of code which may generate this error.
-- Binary Encoded state machine: Sreg0 type Sreg0_type is (S0,S1); attribute enum_encoding of Sreg0_type: type is "0" & --S0 "1" ; --S1
The problem is due to the fact that the Metamor library has not been declared in the VHDL file. The State Editor should, by default, add the appropriate libraries to the VHDL file. If for some reason, this did not happen, select Synthesis->Select Libraries... from the State Editor. Click on the "Default" button, and you should now see 3 libraries declared: IEEE, Metamor, Synopsys. Click OK, and re-compile the State Machine.