From b5f83a89d41dc2bd0307694ffca4cb4136f32f86 Mon Sep 17 00:00:00 2001 From: Drew Barbier Date: Thu, 5 Jul 2018 22:32:36 -0500 Subject: preemption support, csipid from button 2 --- software/clic_vectored/clic_vectored.c | 65 ++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 14 deletions(-) (limited to 'software/clic_vectored') diff --git a/software/clic_vectored/clic_vectored.c b/software/clic_vectored/clic_vectored.c index 6f19fa3..37ea723 100644 --- a/software/clic_vectored/clic_vectored.c +++ b/software/clic_vectored/clic_vectored.c @@ -28,13 +28,48 @@ clic_instance_t clic; const char * instructions_msg = " \ \n\ SiFive, Inc\n\ - E21 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. Hold two buttons down at\n\ - the same time to see priorities in action.\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() { @@ -50,13 +85,13 @@ void wait_ms(uint64_t ms) { while(*mtime