AR# 3228: 4.2i Foundation State Editor - "Logical Error 1002: Source line length exceeds 150 characters"
AR# 3228
|
4.2i Foundation State Editor - "Logical Error 1002: Source line length exceeds 150 characters"
描述
Keywords: Foundation, State Editor, line length, ABEL, blif
Urgency: Standard
General Description: My state machine has a large number of states; when I generate a symbolic state machine in ABEL, the following error is reported:
"Logical Error 1002: Source line length exceeds 150 characters."
解决方案
1
The State Editor creates ABEL code for the design. In the ABEL code, the STATE_REGISTER is declared, followed by all of the states in the state machine, listed on one line. If there are a large number of states, this line will be quite long.
No checking is performed during the HDL code generation to ensure that all lines produced are of a suitable length for the ABEL tools; therefore, it is possible that HDL code that violates the line-length limit set by the ABEL compiler will be generated.
The problem manifests itself when you draw the state machine and select "Synthesize"; the process will fail with the above error.
Solution 1:
If the State Editor does not fully synthesize the design, select Synthesis -> HDL Code Generation instead. When you are prompted to view the code, select "Yes". Then, select the HDL Editor and un-check "Read Only" under the Edit menu. Then, find the line that causes the problem and shorten it.
For example, if the state names end in a number:
ER1, ER2, ER3, ER4, ER5, ER6, START STATE;
becomes:
ER1..ER6, START STATE;
Save the edited file, then synthesize from the HDL editor.
2
As in Solution 1, use the State Editor for HDL code generation and modify the code in the HDL editor; the difference, however, is that you will split the long STATE line in to several smaller ones.
For example:
ER1, ER2, ER3, ER4, ER5, ER6, START STATE;
becomes:
ER1, ER2, ER3, ER4 STATE; ER5, ER6, START STATE;
Save the new HDL code, then use the HDL Editor to perform the synthesis.
3
Change the method of state encoding from symbolic to binary.
- Select FSM -> Machines -> "Machine Name" (where "Machine Name" is the state machine for which you wish to change the encoding style). This opens the Machine Properties dialog box. - On the General tab, select the "Encoded Radio Button" under encoding. In the list box, change the style to Binary. - Select "OK", then use Synthesis -> Synthesize as usual to create the state machine.