This commit is contained in:
TXuian 2022-12-12 11:11:23 +08:00
parent e769dbbdd3
commit 9f8e599e0c
29 changed files with 254 additions and 61 deletions

View File

@ -1,16 +0,0 @@
# Board configuration for generic ARC
#
# Copyright (C) 2019 Embecosm Limited
#
# Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
#
# This file is part of Embench.
#
# SPDX-License-Identifier: GPL-3.0-or-later
# This is a python setting of parameters for the board. See the online
# documenation for details of the contents of this file.
# For generic ARC, we mark a clock rate of 1MHz
cpu_mhz = 1

View File

@ -1,29 +0,0 @@
/* Board support for generic ARC board
Copyright (C) 2019 Embecosm Limited
Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
This file is part of Embench.
SPDX-License-Identifier: GPL-3.0-or-later */
#include <support.h>
void
initialise_board ()
{
__asm__ volatile ("nop" : : : "memory");
}
void __attribute__ ((noinline)) __attribute__ ((externally_visible))
start_trigger ()
{
__asm__ volatile ("nop" : : : "memory");
}
void __attribute__ ((noinline)) __attribute__ ((externally_visible))
stop_trigger ()
{
__asm__ volatile ("nop" : : : "memory");
}

View File

@ -1,13 +0,0 @@
/* Board support header for generic ARC board
Copyright (C) 2019 Embecosm Limited
Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
This file is part of Embench.
SPDX-License-Identifier: GPL-3.0-or-later */
/* Should match board.cfg (and why have to specify it again). */
#define CPU_MHZ 1

View File

@ -0,0 +1,15 @@
import os
Import('RTT_ROOT')
from building import *
cwd = GetCurrentDir()
objs = []
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(path, 'SConscript'))
Return('objs')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMAKR'], CPPPATH=path)
Return('group')

View File

@ -0,0 +1,10 @@
import os
from building import *
cwd = GetCurrentDir()
src = Glob('*.c')
path = [cwd]
group = DefineGroup('benchmark', src, depend=['USING_BENCHMARK'], CPPPATH=path)
Return('group')

View File

@ -75,8 +75,14 @@ extern void add_benchmark_handle(benchmark_handle *, benchmark_handle *);
clock_t tmp_diff = 0.0;
clock_t global_diff = 0.0;
void start_trigger(clock_t *start_time) { *start_time = PrivGetTickTime(); }
void stop_trigger(clock_t *end_time) { *end_time = PrivGetTickTime(); }
void start_trigger(clock_t *start_time) {
// *start_time = PrivGetTickTime();
*start_time = read_cycle();
}
void stop_trigger(clock_t *end_time) {
*end_time = PrivGetTickTime();
*end_time = read_cycle();
}
void init_benchmark_runset(benchmark_handle *head) {
int i = 0;

View File

@ -3,7 +3,7 @@ import rtconfig
from building import *
cwd = GetCurrentDir()
drv_path = cwd+"/../../../rt-thread/bsp/k210/driver/"
drv_path = cwd + "/../../../aiit_board/k210/kendryte-sdk/kendryte-sdk-source/lib/drivers/include"
src = [
'board.c',
'heap.c',