PPT ½½¶óÀ̵å
Enumerated types offer perhaps the most flexibility in abstract hardware models. User defined enumerated types allow values that are immediately recognizable and intuitively relevant to the operation of the model. This capability makes our code more readable when describing state machines and complex systems. FPGA Express can encode enumerated types in either binary or ¡°OHE¡±.
type My_State is ( RST, LOAD, FETCH, WAIT, SHIFT ) ;. . .signal STATE, NEXT_STATE : My_State ;. . .
Case STATE iswhen LOAD => . . .if COND_A and COND_B thenNEXT_STATE <= FETCH ;else NEXT_STATE <= WAIT ;. . .