2024-01-30 23:00:38 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "templateFSM.h"
|
|
|
|
#include "FSM_public.h"
|
|
|
|
|
|
|
|
TemplateFSM *pFSM;
|
|
|
|
|
|
|
|
int main(){
|
|
|
|
|
|
|
|
pFSM = createTemplateFSM();
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 15; i++)
|
|
|
|
{
|
|
|
|
TemplateFSM_Input(pFSM)->arrindex = i;
|
2024-01-30 23:07:08 +08:00
|
|
|
PreloaderGetReady(pFSM);
|
2024-04-19 13:07:09 +08:00
|
|
|
|
|
|
|
const TemplateFSMData* data = GetData(pFSM);
|
|
|
|
|
|
|
|
int ovflag = GetPreloaderOverFlag(pFSM);
|
2024-01-30 23:00:38 +08:00
|
|
|
|
2024-04-19 15:58:28 +08:00
|
|
|
if(i == 10){
|
|
|
|
TemplateFSM_Signals(pFSM)->signalA = 1;
|
|
|
|
}
|
2024-04-19 16:11:24 +08:00
|
|
|
if(i == 11){
|
2024-04-19 15:58:28 +08:00
|
|
|
TemplateFSM_Signals(pFSM)->signalB = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
printf("%d, " ,i);
|
2024-01-30 23:00:38 +08:00
|
|
|
|
|
|
|
Step(pFSM);
|
|
|
|
printf("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|