/* * Copyright (C) 2019 ETH Zurich and 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 __PULP_H__ #define __PULP_H__ #ifndef CLUSTER_STACK_SIZE #define CLUSTER_STACK_SIZE 0x800 #endif #ifndef LANGUAGE_ASSEMBLY #include #include #include #include typedef enum { PI_FREQ_DOMAIN_FC = 0, PI_FREQ_DOMAIN_CL = 1, PI_FREQ_DOMAIN_PERIPH = 2 } pi_freq_domain_e; void cluster_start(int cid, int (*entry)()); int cluster_wait(int cid); void _start(); #include #define get_core_id hal_core_id #define rt_core_id hal_core_id #define rt_cluster_id hal_cluster_id #define get_cluster_id hal_cluster_id #ifdef ARCHI_CLUSTER_NB_PE static inline int get_core_num() { return ARCHI_CLUSTER_NB_PE; } #endif int uart_open(int uart_id, int baudrate); void uart_close(int uart_id); int uart_write(int uart_id, void *buffer, uint32_t size); int uart_read(int uart_id, void *buffer, uint32_t size); void synch_barrier(); #endif #endif