-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix traffic monitor in VHDL, improvements in script and makefiles
- Loading branch information
Showing
22 changed files
with
331 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
|
||
#include "syn_std.h" | ||
|
||
Message msg; | ||
//MEMPHIS message structure | ||
Message msg1; | ||
Message msg2; | ||
|
||
int main() | ||
void main() | ||
{ | ||
|
||
int i, j,t; | ||
|
||
Echo("synthetic task A started."); | ||
Echo("Task A started at time "); | ||
Echo(itoa(GetTick())); | ||
|
||
for(i=0;i<SYNTHETIC_ITERATIONS;i++){ | ||
for(t=0;t<1000;t++){ | ||
for(int i=0;i<SYNTHETIC_ITERATIONS;i++) | ||
{ | ||
//Compute and send something | ||
compute(&msg1.msg); | ||
msg1.length = 128; | ||
Send(&msg1,taskB); | ||
|
||
//Compute and send something | ||
compute(&msg2.msg); | ||
msg2.length = 128; | ||
Send(&msg2,taskC); | ||
} | ||
msg.length = 30; | ||
for(j=0;j<30;j++) msg.msg[j]=i; | ||
|
||
Send(&msg,taskC); | ||
} | ||
|
||
Echo("Task A finished at time"); | ||
Echo(itoa(GetTick())); | ||
Echo("synthetic task A finished."); | ||
exit(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
|
||
#include "syn_std.h" | ||
|
||
//MEMPHIS message structure | ||
Message msg; | ||
|
||
int main() | ||
void main() | ||
{ | ||
|
||
int i, j,t; | ||
|
||
Echo("synthetic task B started."); | ||
Echo("Task B started at time "); | ||
Echo(itoa(GetTick())); | ||
|
||
for(i=0;i<SYNTHETIC_ITERATIONS;i++){ | ||
for(t=0;t<1000;t++){ | ||
} | ||
msg.length = 30; | ||
for(j=0;j<30;j++) msg.msg[j]=i; | ||
|
||
Send(&msg,taskC); | ||
} | ||
|
||
for(int i=0;i<SYNTHETIC_ITERATIONS;i++) | ||
{ | ||
|
||
Receive(&msg, taskA); | ||
|
||
compute(&msg.msg); | ||
|
||
Send(&msg,taskD); | ||
} | ||
|
||
Echo("Task B finished at time"); | ||
Echo(itoa(GetTick())); | ||
Echo("synthetic task B finished."); | ||
exit(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,27 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
|
||
#include "syn_std.h" | ||
|
||
//MEMPHIS message structure | ||
Message msg; | ||
|
||
int main() | ||
void main() | ||
{ | ||
|
||
int i, j,t; | ||
|
||
Echo("synthetic task C started."); | ||
Echo("Task C started at time "); | ||
Echo(itoa(GetTick())); | ||
|
||
for(i=0;i<SYNTHETIC_ITERATIONS;i++){ | ||
|
||
msg.length = 30; | ||
for(j=0;j<30;j++) msg.msg[j]=i; | ||
for(int i=0;i<SYNTHETIC_ITERATIONS;i++) | ||
{ | ||
|
||
Receive(&msg,taskA); | ||
|
||
for(t=0;t<1000;t++){ | ||
} | ||
|
||
Send(&msg,taskD); | ||
|
||
Receive(&msg,taskB); | ||
|
||
for(t=0;t<1000;t++){ | ||
Receive(&msg, taskA); | ||
|
||
compute(&msg.msg); | ||
|
||
Send(&msg,taskD); | ||
} | ||
|
||
Send(&msg,taskE); | ||
|
||
} | ||
Echo("Task C finished at time"); | ||
Echo(itoa(GetTick())); | ||
Echo("synthetic task C finished."); | ||
|
||
exit(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
|
||
#include "syn_std.h" | ||
|
||
//Message structure of MEMPHIS, provided by api.h | ||
Message msg; | ||
|
||
int main() | ||
void main() | ||
{ | ||
Echo("Task D started at time "); | ||
Echo(itoa(GetTick())); | ||
|
||
int i, j,t; | ||
for(int i=0;i<SYNTHETIC_ITERATIONS;i++) | ||
{ | ||
|
||
Echo("synthetic task D started."); | ||
Echo(itoa(GetTick())); | ||
Receive(&msg, taskB); | ||
Receive(&msg, taskC); | ||
|
||
for(i=0;i<SYNTHETIC_ITERATIONS;i++){ | ||
msg.length = 30; | ||
for(j=0;j<30;j++) msg.msg[j]=i; | ||
|
||
Receive(&msg,taskC); | ||
for(t=0;t<1000;t++){ | ||
} | ||
Send(&msg,taskF); | ||
} | ||
|
||
Echo("Final message"); | ||
for(int j=0; j<msg.length; j++){ | ||
Echo(itoa(msg.msg[j])); | ||
} | ||
|
||
Echo(itoa(GetTick())); | ||
Echo("synthetic task D finished."); | ||
|
||
Echo("Task D finished at time"); | ||
Echo(itoa(GetTick())); | ||
exit(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* syn_std.h | ||
* | ||
* Created on: 09/07/2016 | ||
* Author: ruaro | ||
*/ | ||
|
||
#ifndef SYN_STD_H_ | ||
#define SYN_STD_H_ | ||
|
||
|
||
#define SYNTHETIC_ITERATIONS 10 | ||
|
||
|
||
#endif /* SYN_STD_H_ */ |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
|
||
#include "../synthetic1/syn_std.h" | ||
|
||
Message msg; | ||
|
||
int main() | ||
{ | ||
|
||
int i, j; | ||
volatile int t; | ||
|
||
Echo("Synthetic task A started."); | ||
Echo(itoa(GetTick())); | ||
|
||
for(i=0;i<SYNTHETIC_ITERATIONS;i++) | ||
{ | ||
for(t=0;t<1000;t++); | ||
|
||
msg.length = 30; | ||
for(j=0;j<30;j++) | ||
{ | ||
msg.msg[j]=i; | ||
} | ||
Send(&msg,taskC); | ||
} | ||
|
||
Echo(itoa(GetTick())); | ||
Echo("Synthetic task A finished."); | ||
exit(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
|
||
#include "../synthetic1/syn_std.h" | ||
|
||
Message msg; | ||
|
||
int main() | ||
{ | ||
|
||
int i, j,t; | ||
|
||
Echo("synthetic task B started."); | ||
Echo(itoa(GetTick())); | ||
|
||
for(i=0;i<SYNTHETIC_ITERATIONS;i++){ | ||
for(t=0;t<1000;t++){ | ||
} | ||
msg.length = 30; | ||
for(j=0;j<30;j++) msg.msg[j]=i; | ||
|
||
Send(&msg,taskC); | ||
} | ||
|
||
Echo(itoa(GetTick())); | ||
Echo("synthetic task B finished."); | ||
exit(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
|
||
#include "../synthetic1/syn_std.h" | ||
|
||
Message msg; | ||
|
||
int main() | ||
{ | ||
|
||
int i, j,t; | ||
|
||
Echo("synthetic task C started."); | ||
Echo(itoa(GetTick())); | ||
|
||
for(i=0;i<SYNTHETIC_ITERATIONS;i++){ | ||
|
||
msg.length = 30; | ||
for(j=0;j<30;j++) msg.msg[j]=i; | ||
|
||
Receive(&msg,taskA); | ||
|
||
for(t=0;t<1000;t++){ | ||
} | ||
|
||
Send(&msg,taskD); | ||
|
||
Receive(&msg,taskB); | ||
|
||
for(t=0;t<1000;t++){ | ||
} | ||
|
||
Send(&msg,taskE); | ||
|
||
} | ||
Echo(itoa(GetTick())); | ||
Echo("synthetic task C finished."); | ||
|
||
exit(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
|
||
#include "../synthetic1/syn_std.h" | ||
|
||
Message msg; | ||
|
||
int main() | ||
{ | ||
|
||
int i, j,t; | ||
|
||
Echo("synthetic task D started."); | ||
Echo(itoa(GetTick())); | ||
|
||
for(i=0;i<SYNTHETIC_ITERATIONS;i++){ | ||
msg.length = 30; | ||
for(j=0;j<30;j++) msg.msg[j]=i; | ||
|
||
Receive(&msg,taskC); | ||
for(t=0;t<1000;t++){ | ||
} | ||
Send(&msg,taskF); | ||
|
||
} | ||
|
||
Echo(itoa(GetTick())); | ||
Echo("synthetic task D finished."); | ||
|
||
exit(); | ||
|
||
} |
3 changes: 2 additions & 1 deletion
3
applications/synthetic/taskE.c → applications/synthetic1/taskE.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
#include "syn_std.h" | ||
|
||
#include "../synthetic1/syn_std.h" | ||
|
||
Message msg; | ||
|
||
|
3 changes: 2 additions & 1 deletion
3
applications/synthetic/taskF.c → applications/synthetic1/taskF.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#include <api.h> | ||
#include <stdlib.h> | ||
#include "syn_std.h" | ||
|
||
#include "../synthetic1/syn_std.h" | ||
|
||
Message msg; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.