From d9c3fba928162e7a89349f8b160eb479ad41cbea Mon Sep 17 00:00:00 2001 From: Nathaniel Graff Date: Thu, 7 Mar 2019 09:29:05 -0800 Subject: Remove legacy examples Signed-off-by: Nathaniel Graff --- software/clic_vectored/Makefile | 10 -- software/clic_vectored/clic_vectored.c | 197 --------------------------------- 2 files changed, 207 deletions(-) delete mode 100644 software/clic_vectored/Makefile delete mode 100644 software/clic_vectored/clic_vectored.c (limited to 'software/clic_vectored') diff --git a/software/clic_vectored/Makefile b/software/clic_vectored/Makefile deleted file mode 100644 index d6e2342..0000000 --- a/software/clic_vectored/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -TARGET = clic_vectored -CFLAGS += -Og -fno-builtin-printf - -BSP_BASE = ../../bsp - -C_SRCS += clic_vectored.c - -C_SRCS += $(BSP_BASE)/drivers/clic/clic_driver.c - -include $(BSP_BASE)/env/common.mk diff --git a/software/clic_vectored/clic_vectored.c b/software/clic_vectored/clic_vectored.c deleted file mode 100644 index 37ea723..0000000 --- a/software/clic_vectored/clic_vectored.c +++ /dev/null @@ -1,197 +0,0 @@ -// See LICENSE for license details. -#include -#include -#include "platform.h" -#include -#include "encoding.h" -#include -#include "sifive/devices/clic.h" -#include "clic/clic_driver.h" -#include "sifive/devices/clint.h" - -#ifndef _SIFIVE_COREPLEXIP_ARTY_H -#error 'local_interrupts' demo only supported for Core IP Eval Kits -#endif - -// Global Variable used to show -// software interrupts. -volatile uint32_t g_debouncing; - -// vector table defined in init.c -typedef void (*interrupt_function_ptr_t) (void); -extern interrupt_function_ptr_t localISR[CLIC_NUM_INTERRUPTS]; -extern void default_handler(void); - -//clic data structure -clic_instance_t clic; - -const char * instructions_msg = " \ -\n\ - SiFive, Inc\n\ -\n\ - 5555555555555555555555555\n\ - 5555 5555\n\ - 5555 5555\n\ - 5555 5555\n\ - 5555 5555555555555555555555\n\ - 5555 555555555555555555555555\n\ - 5555 5555\n\ - 5555 5555\n\ - 5555 5555\n\ -5555555555555555555555555555 55555\n\ - 55555 555555555 55555\n\ - 55555 55555 55555\n\ - 55555 5 55555\n\ - 55555 55555\n\ - 55555 55555\n\ - 55555 55555\n\ - 55555 55555\n\ - 55555 55555\n\ - 555555555\n\ - 55555\n\ - 5\n\ -\n\ -E2 Core IP Eval Kit 'clic_vectored' demo.\n\ -This demo uses buttons 0, 1, and 2 on the\n\ -Arty board to trigger vectored clic interrupts.\n\ -The higher the button number, the higher the\n\ -interupt priority. Button 0's handler runs for\n\ -10 seconds, button 1's for 5, and button 2's for 1.\n\ -Preemption is enabled so that higher priority\n\ -interrupts can be triggered while in low priority\n\ -handlers. The demo also uses the CLIC's software\n\ -interrupt to pend a lower priority interrupt from\n\ -button 2's handler.\n\ -\n\ -Note the buttons are wired directly into the local\n\ -interrupts, so a given interrupt will stay asserted\n\ -as long as the button is being pushed.\n\ -\n\ -This demo works for both the E20 and E21 FPGA\n\ -as long as CLIC_CONFIG_BITS matches the desired\n\ -core.\n\ -\n"; - -void print_instructions() { - write (STDERR_FILENO, instructions_msg, strlen(instructions_msg)); -} - - -//busy wait for the specified time -void wait_ms(uint64_t ms) { - static const uint64_t ms_tick = RTC_FREQ/1000; - volatile uint64_t * mtime = (uint64_t*) (CLINT_CTRL_ADDR + CLINT_MTIME); - uint64_t then = (ms_tick * ms) + *mtime; - while(*mtime