This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fiscarelli
committed
Apr 9, 2020
1 parent
e04524d
commit 32d9a03
Showing
161 changed files
with
131,126 additions
and
1,544 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
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,30 @@ | ||
#//************************************************************************ | ||
#// Copyright (C) 2020 Massachusetts Institute of Technology | ||
#// | ||
#// File Name: | ||
#// Program: Common Evaluation Platform (CEP) | ||
#// Description: | ||
#// Notes: | ||
#// | ||
#//************************************************************************ | ||
# | ||
# | ||
# | ||
COSIM_NAME = $(shell cd ../..; basename `pwd`) | ||
DUT_TOP_DIR = $(shell cd ../../..; pwd | ./${COSIM_NAME}/bin/strip_net.pl ) | ||
BLD_DIR = $(shell cd ..; pwd | ../bin/strip_net.pl ) | ||
TEST_SUITE = $(shell basename ${BLD_DIR}) | ||
TEST_DIR = $(shell cd .; pwd | ../../bin/strip_net.pl ) | ||
TEST_NAME = $(shell basename `pwd`) | ||
SIM_DIR = ${DUT_TOP_DIR}/${COSIM_NAME} | ||
|
||
# | ||
# Top target!!! | ||
# | ||
all: .vrun_flag | ||
|
||
# | ||
# override anything here before calling the common file | ||
# | ||
include ${BLD_DIR}/common.make | ||
|
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,104 @@ | ||
//************************************************************************ | ||
// Copyright (C) 2020 Massachusetts Institute of Technology | ||
// | ||
// File Name: | ||
// Program: Common Evaluation Platform (CEP) | ||
// Description: | ||
// Notes: | ||
// | ||
//************************************************************************ | ||
#include <unistd.h> | ||
#include "v2c_cmds.h" | ||
#include "access.h" | ||
#include "c_dispatch.h" | ||
#include "c_module.h" | ||
#include "cep_apis.h" | ||
#include "cep_adrMap.h" | ||
#include "simPio.h" | ||
/* | ||
* main | ||
*/ | ||
int main(int argc, char *argv[]) | ||
{ | ||
|
||
/* ===================================== */ | ||
/* SETUP SECTION FOR SIMULATION */ | ||
/* ===================================== */ | ||
unsigned long seed; | ||
sscanf(argv[1],"0x%x",&seed); | ||
printf("Seed = 0x%x\n",seed); | ||
int errCnt = 0; | ||
int verbose = 0x1f; | ||
|
||
/* ===================================== */ | ||
/* spawn all the paralle threads */ | ||
/* ===================================== */ | ||
int activeSlot=0; // only 1 board | ||
// | ||
// ============================ | ||
// fork all the tests here | ||
// ============================ | ||
// | ||
shPthread thr; | ||
// | ||
// max number of cores not include the system thread | ||
// | ||
int maxHost = MAX_CORES; // number of cores/threads | ||
// | ||
// each bit is to turn on the given core (bit0 = core0, bit1=core1, etc..) | ||
// | ||
long unsigned int mask = 1 << (seed & 0x3); | ||
// | ||
// Set the active CPU mask before spawn the threads... | ||
// | ||
thr.SetActiveMask(mask); | ||
// | ||
// c_module is the threead to run | ||
// | ||
for (int i=0;i<maxHost;i++) { | ||
if ((long unsigned int)(1 << i) & mask) { | ||
thr.ForkAThread(activeSlot,i,verbose, seed * (1+i), c_module); | ||
} | ||
} | ||
// | ||
// lastly: Added system thread always | ||
// | ||
thr.AddSysThread(SYSTEM_SLOT_ID,SYSTEM_CPU_ID); | ||
// | ||
// Enable vector capture-ing | ||
DUT_WRITE_DVT(DVTF_AES_CAPTURE_EN_BIT,DVTF_AES_CAPTURE_EN_BIT,1); | ||
// ============================ | ||
// Turn on the wave here | ||
// ============================ | ||
// | ||
int cycle2start=0; | ||
int cycle2capture=-1; // til end | ||
int wave_enable=1; | ||
#ifndef NOWAVE | ||
dump_wave(cycle2start, cycle2capture, wave_enable); | ||
#endif | ||
// | ||
// ============================ | ||
// wait until all the threads are done | ||
// ============================ | ||
// | ||
int Done = 0; | ||
while (!Done) { | ||
Done = thr.AllThreadDone(); | ||
sleep(2); | ||
} | ||
/* ===================================== */ | ||
/* END-OF-TEST CHECKING */ | ||
/* ===================================== */ | ||
errCnt += thr.GetErrorCount(); | ||
if (errCnt != 0) { | ||
LOGE("======== TEST FAIL ========== %x\n",errCnt); | ||
} else { | ||
LOGI("%s ======== TEST PASS ========== \n",__FUNCTION__); | ||
} | ||
// | ||
// shutdown HW side | ||
// | ||
thr.Shutdown(); | ||
return(errCnt); | ||
} |
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,22 @@ | ||
//************************************************************************ | ||
// Copyright (C) 2020 Massachusetts Institute of Technology | ||
// | ||
// File Name: | ||
// Program: Common Evaluation Platform (CEP) | ||
// Description: | ||
// Notes: | ||
// | ||
//************************************************************************ | ||
#ifndef __C_DISPATCH_H | ||
#define __C_DISPATCH_H | ||
|
||
|
||
// Dispatch setup | ||
#ifdef LONGTEST | ||
#define MAX_LOOP 50 | ||
#else | ||
#define MAX_LOOP 5 | ||
#endif | ||
|
||
#endif | ||
|
Oops, something went wrong.