diff --git a/README.md b/README.md index 149747d..b301820 100755 --- a/README.md +++ b/README.md @@ -62,4 +62,7 @@ The uart can be selected for the printf with this option: The baudrate can also be specified with: - $ make all run io=uart CONFIG_IO_UART_BAUDRATE=9600 \ No newline at end of file + $ make all run io=uart CONFIG_IO_UART_BAUDRATE=9600 + +It is possible to generate code that can be executed on a standalone PULP cluster by appending the `CONFIG_NO_FC` define when compiling the code: + $ make all CONFIG_NO_FC=1 \ No newline at end of file diff --git a/include/archi/chips/pulp/properties.h b/include/archi/chips/pulp/properties.h index 3a19560..75538a7 100644 --- a/include/archi/chips/pulp/properties.h +++ b/include/archi/chips/pulp/properties.h @@ -1,43 +1,3 @@ -/* - * Copyright (C) 2018 ETH Zurich, University of Bologna - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef __ARCHI_CHIPS_PULP_PROPERTIES_H__ -#define __ARCHI_CHIPS_PULP_PROPERTIES_H__ - -/* - * FPGA - */ - -#ifndef ARCHI_FPGA_PER_FREQUENCY -#define ARCHI_FPGA_PER_FREQUENCY 5000000 -#endif - -#ifndef ARCHI_FPGA_SOC_FREQUENCY -#define ARCHI_FPGA_SOC_FREQUENCY 5000000 -#endif - -#ifndef ARCHI_FPGA_CL_FREQUENCY -#define ARCHI_FPGA_CL_FREQUENCY 5000000 -#endif - -/* - * MEMORIES - */ - #define ARCHI_HAS_L2 1 #define ARCHI_HAS_L2_MULTI 1 #define ARCHI_HAS_L1 1 @@ -285,6 +245,3 @@ #define ARCHI_FC_EVT_SCU_OK 25 #define ARCHI_FC_EVT_SOC_EVT 26 #define ARCHI_FC_EVT_QUEUE_ERROR 29 - - -#endif diff --git a/kernel/bench.c b/kernel/bench.c index d51fed8..b83bb38 100644 --- a/kernel/bench.c +++ b/kernel/bench.c @@ -131,7 +131,8 @@ int run_suite(testcase_t *tests) errors += result.errors; } - print_summary(errors); + if (rt_core_id() == 0) + print_summary(errors); return errors; } diff --git a/kernel/chips/pulp/link.ld b/kernel/chips/pulp/link.ld index 27c2397..534bb11 100644 --- a/kernel/chips/pulp/link.ld +++ b/kernel/chips/pulp/link.ld @@ -3,8 +3,8 @@ OUTPUT_ARCH(riscv) ENTRY( _start ) MEMORY { - L2 : ORIGIN = 0x1c000004, LENGTH = 0x0007fffc - L1 : ORIGIN = 0x10000004, LENGTH = 0x0000fffc + L2 : ORIGIN = 0x1c000000, LENGTH = 0x0007fffc + L1 : ORIGIN = 0x10000000, LENGTH = 0x0000fffc } /* diff --git a/kernel/chips/pulp/soc.c b/kernel/chips/pulp/soc.c index 25af3b9..5650f0c 100644 --- a/kernel/chips/pulp/soc.c +++ b/kernel/chips/pulp/soc.c @@ -19,15 +19,16 @@ void pos_soc_init() { #if __PLATFORM__ != ARCHI_PLATFORM_FPGA - - pos_fll_constructor(); - - pos_freq_domains[PI_FREQ_DOMAIN_FC] = pos_fll_init(POS_FLL_FC); - - pos_freq_domains[PI_FREQ_DOMAIN_PERIPH] = pos_fll_init(POS_FLL_PERIPH); - - - pos_freq_domains[PI_FREQ_DOMAIN_CL] = pos_fll_init(POS_FLL_CL); + + #ifndef ARCHI_NO_FC + pos_fll_constructor(); + + pos_freq_domains[PI_FREQ_DOMAIN_FC] = pos_fll_init(POS_FLL_FC); + + pos_freq_domains[PI_FREQ_DOMAIN_PERIPH] = pos_fll_init(POS_FLL_PERIPH); + + pos_freq_domains[PI_FREQ_DOMAIN_CL] = pos_fll_init(POS_FLL_CL); + #endif #else @@ -39,4 +40,3 @@ void pos_soc_init() #endif } - diff --git a/kernel/cluster.c b/kernel/cluster.c index 872eab9..d572e1d 100644 --- a/kernel/cluster.c +++ b/kernel/cluster.c @@ -18,14 +18,18 @@ #include #include +#ifndef ARCHI_NO_FC +#include "init.c" +#endif + volatile void *cluster_entry; L1_DATA char *cluster_stacks; - static volatile int cluster_running; static volatile int cluster_retval; +extern int main(int argc, const char * const argv[]); static void pos_wait_forever() { @@ -43,10 +47,21 @@ static void cluster_core_init() eu_bar_setup(eu_bar_addr(0), (1<