From b2db83ef52aa6668193bdc71a88b81d3aefefea0 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 2 Jun 2010 11:34:53 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1983 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM8S-STM8S208-RC/ch.rapp | 74 +++++++++++++++++------------------------ demos/STM8S-STM8S208-RC/ch.rprj | 4 +-- docs/reports/STM8S208-16.txt | 24 ++++++------- os/ports/RC/STM8/chcore.c | 10 +++--- os/ports/RC/STM8/chcore.h | 24 +++++++++++++ 5 files changed, 74 insertions(+), 62 deletions(-) diff --git a/demos/STM8S-STM8S208-RC/ch.rapp b/demos/STM8S-STM8S208-RC/ch.rapp index 8378004bc..499f89206 100644 --- a/demos/STM8S-STM8S208-RC/ch.rapp +++ b/demos/STM8S-STM8S208-RC/ch.rapp @@ -1,5 +1,5 @@ - + @@ -10,15 +10,15 @@
- +
- +
- + - + - +
@@ -28,21 +28,9 @@ - - - - -
- - -
- -
- -
- -
- + + + @@ -53,17 +41,17 @@
- +
- +
- + - + - +
- +
@@ -78,13 +66,13 @@ - + - + - + @@ -97,11 +85,11 @@ - + - + @@ -109,21 +97,21 @@
- +
- +
- +
- +
@@ -134,33 +122,33 @@
- +
- +
- +
- +
- +
- +
- +
diff --git a/demos/STM8S-STM8S208-RC/ch.rprj b/demos/STM8S-STM8S208-RC/ch.rprj index dc557d7be..d066d7b79 100644 --- a/demos/STM8S-STM8S208-RC/ch.rprj +++ b/demos/STM8S-STM8S208-RC/ch.rprj @@ -1,4 +1,4 @@ - - + + \ No newline at end of file diff --git a/docs/reports/STM8S208-16.txt b/docs/reports/STM8S208-16.txt index 6cf66f335..0c6ddb59d 100644 --- a/docs/reports/STM8S208-16.txt +++ b/docs/reports/STM8S208-16.txt @@ -6,7 +6,7 @@ Compiler: Raisonance RKit-STM8_2.28.10.0092 *** ChibiOS/RT test suite *** -*** Kernel: 1.5.7unstable +*** Kernel: 1.5.9unstable *** Architecture: STM8 *** Platform: STM8x *** Test Board: Raisonance REva V3 + STM8S208RB @@ -67,31 +67,31 @@ Compiler: Raisonance RKit-STM8_2.28.10.0092 --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.1 (Benchmark, messages #1) ---- Score : 31156 msgs/S, 62312 ctxswc/S +--- Score : 31277 msgs/S, 62554 ctxswc/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.2 (Benchmark, messages #2) ---- Score : 24035 msgs/S, 48070 ctxswc/S +--- Score : 24107 msgs/S, 48214 ctxswc/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.3 (Benchmark, messages #3) ---- Score : 24035 msgs/S, 48070 ctxswc/S +--- Score : 24107 msgs/S, 48214 ctxswc/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.4 (Benchmark, context switch) ---- Score : 108456 ctxswc/S +--- Score : 108544 ctxswc/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.5 (Benchmark, threads, full cycle) ---- Score : 17186 threads/S +--- Score : 17261 threads/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.6 (Benchmark, threads, create only) ---- Score : 26073 threads/S +--- Score : 26116 threads/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.7 (Benchmark, mass reschedule, 5 threads) ---- Score : 6884 reschedules/S, 41304 ctxswc/S +--- Score : 6919 reschedules/S, 41514 ctxswc/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.8 (Benchmark, round robin context switching) @@ -99,19 +99,19 @@ Compiler: Raisonance RKit-STM8_2.28.10.0092 --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.9 (Benchmark, I/O Queues throughput) ---- Score : 65072 bytes/S +--- Score : 64416 bytes/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.10 (Benchmark, virtual timers set/reset) ---- Score : 55670 timers/S +--- Score : 55770 timers/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.11 (Benchmark, semaphores wait/signal) ---- Score : 220452 wait+signal/S +--- Score : 211692 wait+signal/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.12 (Benchmark, RAM footprint) ---- System: 179 bytes +--- System: 177 bytes --- Thread: 29 bytes --- Timer : 10 bytes --- Semaph: 6 bytes diff --git a/os/ports/RC/STM8/chcore.c b/os/ports/RC/STM8/chcore.c index af890f6b9..6aaa182af 100644 --- a/os/ports/RC/STM8/chcore.c +++ b/os/ports/RC/STM8/chcore.c @@ -28,6 +28,8 @@ #include "ch.h" +page0 ReadyList rlist; + /** * @brief Performs a context switch between two threads. * @@ -38,12 +40,10 @@ void _port_switch(Thread *otp) { (void)otp; /* Asm because unoptimal code would generated by using _getSP_().*/ #pragma ASM - EXTRN PAGE0(rlist) - LDW Y,SP ; old context pointer - LDW (005H,X),Y ; SP saved in otp->p_ctx.sp - LDW X,rlist + 0DH ; r_current (currp) field - LDW X,(005H,X) ; currp->p_ctx.sp + LDW (5,X),Y ; SP saved in otp->p_ctx.sp + LDW X,rlist + 5 ; r_current (currp) field + LDW X,(5,X) ; currp->p_ctx.sp LDW SP,X ; new context pointer #pragma ENDASM } diff --git a/os/ports/RC/STM8/chcore.h b/os/ports/RC/STM8/chcore.h index 6fa112346..c4f490edc 100644 --- a/os/ports/RC/STM8/chcore.h +++ b/os/ports/RC/STM8/chcore.h @@ -273,6 +273,30 @@ extern "C" { } #endif +/*===========================================================================*/ +/* Scheduler captured code. */ +/*===========================================================================*/ + +#define PORT_OPTIMIZED_RLIST_VAR +#define PORT_OPTIMIZED_RLIST_EXT +#define PORT_OPTIMIZED_READYLIST_STRUCT + +typedef struct { + ThreadsQueue r_queue; + tprio_t r_prio; + Thread *r_current; +#if CH_USE_REGISTRY + Thread *r_newer; + Thread *r_older; +#endif + /* End of the fields shared with the Thread structure.*/ +#if CH_TIME_QUANTUM > 0 + cnt_t r_preempt; +#endif +} ReadyList; + +extern page0 ReadyList rlist; + #endif /* _CHCORE_H_ */ /** @} */ -- cgit v1.2.3