##// END OF EJS Templates
the TC_ENTER_MODE time parameter is taken into account...
the TC_ENTER_MODE time parameter is taken into account time < localTime time > locaTime + 3 the behaviour in case of a default has to be refined

File last commit:

r110:321cef60967c VHDLib206
r111:169204beff11 VHDLib206
Show More
wf_handler.c
1356 lines | 54.1 KiB | text/x-c | CLexer
paul
Header files inclusion reworked...
r40 /** Functions and tasks related to waveform packet generation.
*
* @file
* @author P. LEROY
*
* A group of functions to handle waveforms, in snapshot or continuous format.\n
*
*/
#include "wf_handler.h"
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul
First version of the rings for the waveform picker.
r87 //*****************
// waveform headers
paul
Commit before working on the ERR 4 due to message queue...
r34 // SWF
Header_TM_LFR_SCIENCE_SWF_t headerSWF_F0[7];
Header_TM_LFR_SCIENCE_SWF_t headerSWF_F1[7];
Header_TM_LFR_SCIENCE_SWF_t headerSWF_F2[7];
// CWF
paul
rev 1.0.0.1
r98 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F1[ NB_PACKETS_PER_GROUP_OF_CWF ];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_BURST[ NB_PACKETS_PER_GROUP_OF_CWF ];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F2_SBM2[ NB_PACKETS_PER_GROUP_OF_CWF ];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3[ NB_PACKETS_PER_GROUP_OF_CWF ];
Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3_light[ NB_PACKETS_PER_GROUP_OF_CWF_LIGHT ];
paul
packet emission task added...
r33
paul
First version of the rings for the waveform picker.
r87 //**************
// waveform ring
paul
ICD 2.0...
r92 ring_node waveform_ring_f0[NB_RING_NODES_F0];
paul
First version of the rings for the waveform picker.
r87 ring_node waveform_ring_f1[NB_RING_NODES_F1];
ring_node waveform_ring_f2[NB_RING_NODES_F2];
paul
ICD 2.0...
r92 ring_node *current_ring_node_f0;
ring_node *ring_node_to_send_swf_f0;
paul
First version of the rings for the waveform picker.
r87 ring_node *current_ring_node_f1;
ring_node *ring_node_to_send_swf_f1;
ring_node *ring_node_to_send_cwf_f1;
ring_node *current_ring_node_f2;
ring_node *ring_node_to_send_swf_f2;
ring_node *ring_node_to_send_cwf_f2;
paul
snapshot extraction for the waveform ring is operational...
r105 bool extractSWF = false;
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 bool swf_f0_ready = false;
bool swf_f1_ready = false;
bool swf_f2_ready = false;
paul
snapshot extraction for the waveform ring is operational...
r105
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 int wf_snap_extracted[ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET ];
//*********************
// Interrupt SubRoutine
void reset_extractSWF( void )
{
extractSWF = false;
swf_f0_ready = false;
swf_f1_ready = false;
swf_f2_ready = false;
}
paul
snapshot extraction for the waveform ring is operational...
r105
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 rtems_isr waveforms_isr( rtems_vector_number vector )
{
paul
Minor changes in .h inclusion
r45 /** This is the interrupt sub routine called by the waveform picker core.
*
* This ISR launch different actions depending mainly on two pieces of information:
* 1. the values read in the registers of the waveform picker.
* 2. the current LFR mode.
*
*/
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 rtems_status_code status;
paul
Sync
r95 static unsigned char nb_swf = 0;
paul
packet emission task added...
r33 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
|| (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) )
paul
sy_lfr_n_swf_p implemented...
r32 { // in modes other than STANDBY and BURST, send the CWF_F3 data
paul
packet emission task added...
r33 if ((waveform_picker_regs->status & 0x08) == 0x08){ // [1000] f3 is full
paul
sy_lfr_n_swf_p implemented...
r32 // (1) change the receiving buffer for the waveform picker
paul
Integration of the VHDL_DEV option...
r90 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3_a) {
waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_b);
paul
sy_lfr_n_swf_p implemented...
r32 }
else {
paul
Integration of the VHDL_DEV option...
r90 waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_a);
paul
sy_lfr_n_swf_p implemented...
r32 }
// (2) send an event for the waveforms transmission
paul
packet emission task added...
r33 if (rtems_event_send( Task_id[TASKID_CWF3], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) {
paul
sy_lfr_n_swf_p implemented...
r32 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
paul
packet emission task added...
r33 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff777; // reset f3 bits to 0, [1111 0111 0111 0111]
paul
sy_lfr_n_swf_p implemented...
r32 }
}
paul
packet emission task added...
r33 switch(lfrCurrentMode)
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 {
//********
// STANDBY
case(LFR_MODE_STANDBY):
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21
//******
// NORMAL
case(LFR_MODE_NORMAL):
paul
Minor changes
r94 if ( (waveform_picker_regs->status & 0xff8) != 0x00) // [1000] check the error bits
{
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
if ( (waveform_picker_regs->status & 0x07) == 0x07) // [0111] check the f2, f1, f0 full bits
{
paul
ICD 2.0...
r92 // change F0 ring node
ring_node_to_send_swf_f0 = current_ring_node_f0;
current_ring_node_f0 = current_ring_node_f0->next;
waveform_picker_regs->addr_data_f0 = current_ring_node_f0->buffer_address;
paul
Integration of the VHDL_DEV option...
r90 // change F1 ring node
ring_node_to_send_swf_f1 = current_ring_node_f1;
current_ring_node_f1 = current_ring_node_f1->next;
waveform_picker_regs->addr_data_f1 = current_ring_node_f1->buffer_address;
// change F2 ring node
ring_node_to_send_swf_f2 = current_ring_node_f2;
current_ring_node_f2 = current_ring_node_f2->next;
waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address;
paul
Minor changes
r94 //
paul
Sync
r97 // if (nb_swf < 2)
if (true)
paul
Sync
r95 {
if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888; // [1000 1000 1000]
nb_swf = nb_swf + 1;
}
else
{
reset_wfp_burst_enable();
nb_swf = 0;
}
}
break;
//******
// BURST
case(LFR_MODE_BURST):
if ( (waveform_picker_regs->status & 0x04) == 0x04 ){ // [0100] check the f2 full bit
// (1) change the receiving buffer for the waveform picker
ring_node_to_send_cwf_f2 = current_ring_node_f2;
current_ring_node_f2 = current_ring_node_f2->next;
waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address;
// (2) send an event for the waveforms transmission
if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) {
rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
}
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
}
break;
//*****
// SBM1
case(LFR_MODE_SBM1):
if ( (waveform_picker_regs->status & 0x02) == 0x02 ) { // [0010] check the f1 full bit
paul
snapshot extraction for the waveform ring is operational...
r105 // (0) launch snapshot extraction if needed
if (extractSWF == true)
{
ring_node_to_send_swf_f1 = current_ring_node_f1;
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 // extract the snapshot
status = rtems_event_send( Task_id[TASKID_SWBD], RTEMS_EVENT_MODE_SBM1 );
paul
snapshot extraction for the waveform ring is operational...
r105 extractSWF = false;
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f1_ready = true;
paul
snapshot extraction for the waveform ring is operational...
r105 }
paul
Sync
r95 // (1) change the receiving buffer for the waveform picker
ring_node_to_send_cwf_f1 = current_ring_node_f1;
current_ring_node_f1 = current_ring_node_f1->next;
waveform_picker_regs->addr_data_f1 = current_ring_node_f1->buffer_address;
paul
snapshot extraction for the waveform ring is operational...
r105 // (2) send an event for the the CWF1 task for transmission
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 status = rtems_event_send( Task_id[TASKID_CWF1], RTEMS_EVENT_MODE_SBM1 );
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1 bits = 0
if (swf_f0_ready == true)
{
extractSWF = true;
swf_f0_ready = false;
paul
Sync
r95 }
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 if ((swf_f1_ready == true) && (swf_f2_ready == true))
{
status = rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM1 );
swf_f1_ready = false;
swf_f2_ready = false;
}
paul
Sync
r95 }
if ( (waveform_picker_regs->status & 0x01) == 0x01 ) { // [0001] check the f0 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f0_ready = true;
paul
snapshot extraction for the waveform ring is operational...
r105 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffeee; // [1111 1110 1110 1110] f0 bits = 0
paul
Sync
r95 }
paul
snapshot extraction for the waveform ring is operational...
r105 if ( (waveform_picker_regs->status & 0x04) == 0x04 ) { // [0100] check the f2 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f2_ready = true;
paul
snapshot extraction for the waveform ring is operational...
r105 waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bits = 0
paul
packet emission task added...
r33 }
break;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
//*****
// SBM2
case(LFR_MODE_SBM2):
paul
First version of the rings for the waveform picker.
r87 if ( (waveform_picker_regs->status & 0x04) == 0x04 ){ // [0100] check the f2 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 // (0) launch snapshot extraction if needed
if (extractSWF == true)
{
ring_node_to_send_swf_f2 = current_ring_node_f2;
// extract the snapshot
status = rtems_event_send( Task_id[TASKID_SWBD], RTEMS_EVENT_MODE_SBM2 );
// send the snapshot when build, SWBD priority < WFRM priority
status = rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_SBM2 );
extractSWF = false;
}
paul
packet emission task added...
r33 // (1) change the receiving buffer for the waveform picker
paul
First version of the rings for the waveform picker.
r87 ring_node_to_send_cwf_f2 = current_ring_node_f2;
current_ring_node_f2 = current_ring_node_f2->next;
waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address;
paul
packet emission task added...
r33 // (2) send an event for the waveforms transmission
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 status = rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 );
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0
// (3) check whether swf_fo and swf_f& are ready or not
if (swf_f0_ready && swf_f1_ready)
{
extractSWF = true;
swf_f0_ready = false;
swf_f1_ready = false;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23 }
paul
packet emission task added...
r33 }
paul
Integration of the VHDL_DEV option...
r90 if ( (waveform_picker_regs->status & 0x01) == 0x01 ) { // [0001] check the f0 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f0_ready = true;
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffeee; // [1111 1110 1110 1110] f0 bits = 0
paul
Integration of the VHDL_DEV option...
r90 }
if ( (waveform_picker_regs->status & 0x02) == 0x02 ) { // [0010] check the f1 full bit
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 swf_f1_ready = true;
waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffddd; // [1111 1101 1101 1101] f1, f0 bits = 0
paul
Integration of the VHDL_DEV option...
r90 }
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
All modes implemented for the waveforms...
r23
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 //********
// DEFAULT
default:
paul
packet emission task added...
r33 break;
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 }
}
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 //************
// RTEMS TASKS
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18 rtems_task wfrm_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
{
paul
Minor changes in .h inclusion
r45 /** This RTEMS task is dedicated to the transmission of snapshots of the NORMAL mode.
*
* @param unused is the starting argument of the RTEMS task
*
* The following data packets are sent by this task:
* - TM_LFR_SCIENCE_NORMAL_SWF_F0
* - TM_LFR_SCIENCE_NORMAL_SWF_F1
* - TM_LFR_SCIENCE_NORMAL_SWF_F2
*
*/
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 rtems_event_set event_out;
paul
Last commit before release 0-13...
r35 rtems_id queue_id;
paul
fsw-1-0...
r82 rtems_status_code status;
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5
paul
Commit before working on the ERR 4 due to message queue...
r34 init_header_snapshot_wf_table( SID_NORM_SWF_F0, headerSWF_F0 );
init_header_snapshot_wf_table( SID_NORM_SWF_F1, headerSWF_F1 );
init_header_snapshot_wf_table( SID_NORM_SWF_F2, headerSWF_F2 );
paul@pc-solar1.lab-lpp.local
Several TC actions added...
r11
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18 init_waveforms();
paul
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_id );
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in WFRM *** ERR get_message_queue_id_send %d\n", status)
}
paul
Last commit before release 0-13...
r35
BOOT_PRINTF("in WFRM ***\n")
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18
while(1){
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 // wait for an RTEMS_EVENT
paul
Commit before working on the ERR 4 due to message queue...
r34 rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1
paul
snapshot extraction for the waveform ring is operational...
r105 | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM,
paul@pc-solar1.lab-lpp.local
Current version with modes NORMAL and SBM1 operational
r21 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
paul
Last commit before release 0-13...
r35 if (event_out == RTEMS_EVENT_MODE_NORMAL)
{
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 DEBUG_PRINTF("WFRM received RTEMS_EVENT_MODE_NORMAL\n")
paul
ICD 2.0...
r92 send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
paul
First version of the rings for the waveform picker.
r87 send_waveform_SWF((volatile int*) ring_node_to_send_swf_f1->buffer_address, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
send_waveform_SWF((volatile int*) ring_node_to_send_swf_f2->buffer_address, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
paul
Minor changes
r94 }
paul
snapshot extraction for the waveform ring is operational...
r105 if (event_out == RTEMS_EVENT_MODE_SBM1)
paul
Minor changes
r94 {
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 DEBUG_PRINTF("WFRM received RTEMS_EVENT_MODE_SBM1\n")
paul
Minor changes
r94 send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 send_waveform_SWF((volatile int*) wf_snap_extracted , SID_NORM_SWF_F1, headerSWF_F1, queue_id);
paul
Minor changes
r94 send_waveform_SWF((volatile int*) ring_node_to_send_swf_f2->buffer_address, SID_NORM_SWF_F2, headerSWF_F2, queue_id);
paul
Last commit before release 0-13...
r35 }
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 if (event_out == RTEMS_EVENT_MODE_SBM2)
{
DEBUG_PRINTF("WFRM received RTEMS_EVENT_MODE_SBM2\n")
send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id);
send_waveform_SWF((volatile int*) ring_node_to_send_swf_f1->buffer_address, SID_NORM_SWF_F1, headerSWF_F1, queue_id);
send_waveform_SWF((volatile int*) wf_snap_extracted , SID_NORM_SWF_F2, headerSWF_F2, queue_id);
}
paul@pc-solar1.lab-lpp.local
Naming convention changed...
r5 }
}
paul@pc-solar1.lab-lpp.local
automatic reconnexion of the spacewire link...
r17
paul
sy_lfr_n_swf_p implemented...
r32 rtems_task cwf3_task(rtems_task_argument argument) //used with the waveform picker VHDL IP
{
paul
Minor changes in .h inclusion
r45 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f3.
*
* @param unused is the starting argument of the RTEMS task
*
* The following data packet is sent by this task:
* - TM_LFR_SCIENCE_NORMAL_CWF_F3
*
*/
paul
sy_lfr_n_swf_p implemented...
r32 rtems_event_set event_out;
paul
Last commit before release 0-13...
r35 rtems_id queue_id;
paul
fsw-1-0...
r82 rtems_status_code status;
paul
sy_lfr_n_swf_p implemented...
r32
paul
ICD 2.0...
r92 init_header_continuous_wf_table( SID_NORM_CWF_LONG_F3, headerCWF_F3 );
init_header_continuous_cwf3_light_table( headerCWF_F3_light );
paul
sy_lfr_n_swf_p implemented...
r32
paul
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_id );
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in CWF3 *** ERR get_message_queue_id_send %d\n", status)
}
paul
Last commit before release 0-13...
r35
BOOT_PRINTF("in CWF3 ***\n")
paul
sy_lfr_n_swf_p implemented...
r32
while(1){
// wait for an RTEMS_EVENT
paul
packet emission task added...
r33 rtems_event_receive( RTEMS_EVENT_0,
paul
sy_lfr_n_swf_p implemented...
r32 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
paul
rev 1.0.0.1
r98 if ( (parameter_dump_packet.sy_lfr_n_cwf_long_f3 & 0x01) == 0x01)
{
PRINTF("send CWF_LONG_F3\n")
}
else
{
PRINTF("send CWF_F3 (light)\n")
}
paul
Integration of the VHDL_DEV option...
r90 if (waveform_picker_regs->addr_data_f3 == (int) wf_cont_f3_a) {
paul
ICD 2.0...
r92 if ( (parameter_dump_packet.sy_lfr_n_cwf_long_f3 & 0x01) == 0x01)
{
send_waveform_CWF( wf_cont_f3_b, SID_NORM_CWF_LONG_F3, headerCWF_F3, queue_id );
}
else
{
send_waveform_CWF3_light( wf_cont_f3_b, headerCWF_F3_light, queue_id );
}
paul
packet emission task added...
r33 }
paul
ICD 2.0...
r92 else
{
paul
rev 1.0.0.1
r98 if ( (parameter_dump_packet.sy_lfr_n_cwf_long_f3 & 0x01) == 0x01)
paul
ICD 2.0...
r92 {
send_waveform_CWF( wf_cont_f3_a, SID_NORM_CWF_LONG_F3, headerCWF_F3, queue_id );
}
else
{
send_waveform_CWF3_light( wf_cont_f3_a, headerCWF_F3_light, queue_id );
}
paul
packet emission task added...
r33 }
}
}
rtems_task cwf2_task(rtems_task_argument argument) // ONLY USED IN BURST AND SBM2
{
paul
Minor changes in .h inclusion
r45 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f2.
*
* @param unused is the starting argument of the RTEMS task
*
* The following data packet is sent by this function:
* - TM_LFR_SCIENCE_BURST_CWF_F2
* - TM_LFR_SCIENCE_SBM2_CWF_F2
*
*/
paul
packet emission task added...
r33 rtems_event_set event_out;
paul
Last commit before release 0-13...
r35 rtems_id queue_id;
paul
fsw-1-0...
r82 rtems_status_code status;
paul
packet emission task added...
r33
init_header_continuous_wf_table( SID_BURST_CWF_F2, headerCWF_F2_BURST );
paul
Commit before working on the ERR 4 due to message queue...
r34 init_header_continuous_wf_table( SID_SBM2_CWF_F2, headerCWF_F2_SBM2 );
paul
packet emission task added...
r33
paul
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_id );
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in CWF2 *** ERR get_message_queue_id_send %d\n", status)
}
paul
Last commit before release 0-13...
r35
BOOT_PRINTF("in CWF2 ***\n")
paul
packet emission task added...
r33
while(1){
// wait for an RTEMS_EVENT
rtems_event_receive( RTEMS_EVENT_MODE_BURST | RTEMS_EVENT_MODE_SBM2,
RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
if (event_out == RTEMS_EVENT_MODE_BURST)
{
paul
VHDL_DEV implemented. The code is compatible with:...
r91 send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2->buffer_address, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id );
paul
packet emission task added...
r33 }
paul
First version of the rings for the waveform picker.
r87 if (event_out == RTEMS_EVENT_MODE_SBM2)
paul
packet emission task added...
r33 {
paul
VHDL_DEV implemented. The code is compatible with:...
r91 send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2->buffer_address, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id );
paul
packet emission task added...
r33 }
}
}
rtems_task cwf1_task(rtems_task_argument argument) // ONLY USED IN SBM1
{
paul
Minor changes in .h inclusion
r45 /** This RTEMS task is dedicated to the transmission of continuous waveforms at f1.
*
* @param unused is the starting argument of the RTEMS task
*
* The following data packet is sent by this function:
* - TM_LFR_SCIENCE_SBM1_CWF_F1
*
*/
paul
packet emission task added...
r33 rtems_event_set event_out;
paul
Last commit before release 0-13...
r35 rtems_id queue_id;
paul
fsw-1-0...
r82 rtems_status_code status;
paul
packet emission task added...
r33
init_header_continuous_wf_table( SID_SBM1_CWF_F1, headerCWF_F1 );
paul
fsw-1-0...
r82 status = get_message_queue_id_send( &queue_id );
if (status != RTEMS_SUCCESSFUL)
{
PRINTF1("in CWF1 *** ERR get_message_queue_id_send %d\n", status)
}
paul
Last commit before release 0-13...
r35
BOOT_PRINTF("in CWF1 ***\n")
paul
packet emission task added...
r33
while(1){
// wait for an RTEMS_EVENT
rtems_event_receive( RTEMS_EVENT_MODE_SBM1,
RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
paul
VHDL_DEV implemented. The code is compatible with:...
r91 send_waveform_CWF( (volatile int*) ring_node_to_send_cwf_f1->buffer_address, SID_SBM1_CWF_F1, headerCWF_F1, queue_id );
paul
sy_lfr_n_swf_p implemented...
r32 }
}
paul
snapshot extraction for the waveform ring is operational...
r105 rtems_task swbd_task(rtems_task_argument argument)
{
/** This RTEMS task is dedicated to the building of snapshots from different continuous waveforms buffers.
*
* @param unused is the starting argument of the RTEMS task
*
*/
rtems_event_set event_out;
BOOT_PRINTF("in SWBD ***\n")
while(1){
// wait for an RTEMS_EVENT
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 rtems_event_receive( RTEMS_EVENT_MODE_SBM1 | RTEMS_EVENT_MODE_SBM2,
paul
snapshot extraction for the waveform ring is operational...
r105 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
paul
snapshots extraction fully functionnal in SBM1 and SBM2
r106 if (event_out == RTEMS_EVENT_MODE_SBM1)
{
build_snapshot_from_ring( ring_node_to_send_swf_f1, 1 );
}
else if (event_out == RTEMS_EVENT_MODE_SBM2)
{
build_snapshot_from_ring( ring_node_to_send_swf_f2, 2 );
}
else
{
PRINTF1("in SWBD *** unexpected rtems event received %x\n", (int) event_out)
}
paul
snapshot extraction for the waveform ring is operational...
r105 }
}
paul@pc-solar1.lab-lpp.local
automatic reconnexion of the spacewire link...
r17 //******************
// general functions
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18 void init_waveforms( void )
{
int i = 0;
for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++)
{
//***
// F0
paul
ICD 2.0...
r92 // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; //
// wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; //
// wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; //
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18
//***
// F1
paul
First version of the rings for the waveform picker.
r87 // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111;
// wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333;
// wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18
//***
// F2
paul
First version of the rings for the waveform picker.
r87 // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333;
// wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111;
// wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000;
paul@pc-solar1.lab-lpp.local
Updates of the ICD taken into account...
r18
//***
// F3
paul
First version of the rings for the waveform picker.
r87 // wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 0 ] = val1;
// wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 1 ] = val2;
// wf_cont_f3[ (i* NB_WORDS_SWF_BLK) + 2 ] = 0xaaaa0000;
}
}
void init_waveform_rings( void )
{
unsigned char i;
paul
ICD 2.0...
r92 // F0 RING
waveform_ring_f0[0].next = (ring_node*) &waveform_ring_f0[1];
waveform_ring_f0[0].previous = (ring_node*) &waveform_ring_f0[NB_RING_NODES_F0-1];
waveform_ring_f0[0].buffer_address = (int) &wf_snap_f0[0][0];
waveform_ring_f0[NB_RING_NODES_F0-1].next = (ring_node*) &waveform_ring_f0[0];
waveform_ring_f0[NB_RING_NODES_F0-1].previous = (ring_node*) &waveform_ring_f0[NB_RING_NODES_F0-2];
waveform_ring_f0[NB_RING_NODES_F0-1].buffer_address = (int) &wf_snap_f0[NB_RING_NODES_F0-1][0];
for(i=1; i<NB_RING_NODES_F0-1; i++)
{
waveform_ring_f0[i].next = (ring_node*) &waveform_ring_f0[i+1];
waveform_ring_f0[i].previous = (ring_node*) &waveform_ring_f0[i-1];
waveform_ring_f0[i].buffer_address = (int) &wf_snap_f0[i][0];
}