Download Design Creation Tutorial for a Prototyping System

Transcript
Printed Documentation
Figure 9: Synchronizing FSMs
Clocked Magic-C Loops
A basic loop structure where the enclosed statements, if any, are executed at each clockcycle, is referred to as a ‘clocked loop’.
This section describes how to create standard clocked loops in MAGIC-C of the following
kinds:
1.
Do-While / Repeat-Until Clocked Loop
2.
Clocked WHILE Loop
3.
C-Style Clocked FOR Loop
Do-While / Repeat-Until Clocked Loop
A clocked do-while loop (or repeat-until loop in some languages) is shown below:
<statement1>; // not part of do-while loop
do {
<statement2>;
} while <cond>;
60