@@ -1,6 +1,6 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw-vhdl-dev | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: Tu |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Jan 23 13:51:15 2014 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
@@ -87,9 +87,9 DIST = /usr/lib64/qt4/mkspecs/c | |||||
87 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
88 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
88 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
89 | fsw-qt.pro |
|
89 | fsw-qt.pro | |
90 | QMAKE_TARGET = fsw |
|
90 | QMAKE_TARGET = fsw-vhdl-dev | |
91 | DESTDIR = bin/ |
|
91 | DESTDIR = bin/ | |
92 | TARGET = bin/fsw |
|
92 | TARGET = bin/fsw-vhdl-dev | |
93 |
|
93 | |||
94 | first: all |
|
94 | first: all | |
95 | ####### Implicit rules |
|
95 | ####### Implicit rules | |
@@ -170,8 +170,8 qmake: FORCE | |||||
170 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
170 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
171 |
|
171 | |||
172 | dist: |
|
172 | dist: | |
173 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
|
173 | @$(CHK_DIR_EXISTS) obj/fsw-vhdl-dev1.0.0 || $(MKDIR) obj/fsw-vhdl-dev1.0.0 | |
174 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 |
|
174 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw-vhdl-dev1.0.0/ && (cd `dirname obj/fsw-vhdl-dev1.0.0` && $(TAR) fsw-vhdl-dev1.0.0.tar fsw-vhdl-dev1.0.0 && $(COMPRESS) fsw-vhdl-dev1.0.0.tar) && $(MOVE) `dirname obj/fsw-vhdl-dev1.0.0`/fsw-vhdl-dev1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw-vhdl-dev1.0.0 | |
175 |
|
175 | |||
176 |
|
176 | |||
177 | clean:compiler_clean |
|
177 | clean:compiler_clean |
@@ -46,7 +46,7 contains( CONFIG, gsa ) { | |||||
46 | TARGET = fsw |
|
46 | TARGET = fsw | |
47 | contains( CONFIG, vhdl_dev ) { |
|
47 | contains( CONFIG, vhdl_dev ) { | |
48 | DEFINES += VHDL_DEV |
|
48 | DEFINES += VHDL_DEV | |
49 | TARGET = fsw |
|
49 | TARGET = fsw-vhdl-dev | |
50 | } |
|
50 | } | |
51 |
|
51 | |||
52 | INCLUDEPATH += \ |
|
52 | INCLUDEPATH += \ |
@@ -1,6 +1,6 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 3.0.0, 2014-01-2 |
|
3 | <!-- Written by QtCreator 3.0.0, 2014-01-24T06:51:07. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -26,10 +26,9 extern int fdSPW; | |||||
26 | // waveform buffers |
|
26 | // waveform buffers | |
27 | // F0 |
|
27 | // F0 | |
28 | extern volatile int wf_snap_f0[ ]; |
|
28 | extern volatile int wf_snap_f0[ ]; | |
29 | // F1 |
|
29 | // F1 F2 | |
30 | extern volatile int wf_snap_f1[ ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
30 | extern volatile int wf_snap_f1[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 46 ]; | |
31 | // F2 |
|
31 | extern volatile int wf_snap_f2[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 46 ]; | |
32 | extern volatile int wf_snap_f2[ ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
|||
33 | // F3 |
|
32 | // F3 | |
34 | extern volatile int wf_cont_f3_a[ ]; |
|
33 | extern volatile int wf_cont_f3_a[ ]; | |
35 | extern volatile int wf_cont_f3_b[ ]; |
|
34 | extern volatile int wf_cont_f3_b[ ]; |
@@ -32,15 +32,15 int fdUART = 0; | |||||
32 | unsigned char lfrCurrentMode; |
|
32 | unsigned char lfrCurrentMode; | |
33 |
|
33 | |||
34 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes |
|
34 | // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes | |
35 | volatile int wf_snap_f0[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
35 | // F0 | |
36 | // |
|
36 | volatile int wf_snap_f0[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ] __attribute__((aligned(0x100))); | |
37 | volatile int wf_snap_f1[ NB_RING_NODES_F1 ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
37 | // F1 F2 | |
38 | // |
|
38 | volatile int wf_snap_f1[ NB_RING_NODES_F1 ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 46 ] __attribute__((aligned(0x100))); | |
39 | volatile int wf_snap_f2[ NB_RING_NODES_F2 ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
39 | volatile int wf_snap_f2[ NB_RING_NODES_F2 ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 46 ] __attribute__((aligned(0x100))); | |
40 | // |
|
40 | // F3 | |
41 | volatile int wf_cont_f3_a[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
41 | volatile int wf_cont_f3_a[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ] __attribute__((aligned(0x100))); | |
42 | volatile int wf_cont_f3_b[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ]; |
|
42 | volatile int wf_cont_f3_b[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ] __attribute__((aligned(0x100))); | |
43 |
char wf_cont_f3_light[ NB_SAMPLES_PER_SNAPSHOT * NB_BYTES_CWF3_LIGHT_BLK |
|
43 | char wf_cont_f3_light[ NB_SAMPLES_PER_SNAPSHOT * NB_BYTES_CWF3_LIGHT_BLK ] __attribute__((aligned(0x100))); | |
44 |
|
44 | |||
45 | // SPECTRAL MATRICES GLOBAL VARIABLES |
|
45 | // SPECTRAL MATRICES GLOBAL VARIABLES | |
46 | volatile int spec_mat_f0_0[ SM_HEADER + TOTAL_SIZE_SM ]; |
|
46 | volatile int spec_mat_f0_0[ SM_HEADER + TOTAL_SIZE_SM ]; |
@@ -78,6 +78,9 rtems_task Init( rtems_task_argument ign | |||||
78 | BOOT_PRINTF("\n\n\n\n\n") |
|
78 | BOOT_PRINTF("\n\n\n\n\n") | |
79 | BOOT_PRINTF("***************************\n") |
|
79 | BOOT_PRINTF("***************************\n") | |
80 | BOOT_PRINTF("** START Flight Software **\n") |
|
80 | BOOT_PRINTF("** START Flight Software **\n") | |
|
81 | #ifdef VHDL_DEV | |||
|
82 | PRINTF("/!\\ this is the VHDL_DEV flight software /!\\ \n") | |||
|
83 | #endif | |||
81 | BOOT_PRINTF("***************************\n") |
|
84 | BOOT_PRINTF("***************************\n") | |
82 | BOOT_PRINTF("\n\n") |
|
85 | BOOT_PRINTF("\n\n") | |
83 |
|
86 |
@@ -172,7 +172,7 int action_enter_mode(ccsdsTelecommandPa | |||||
172 | } |
|
172 | } | |
173 | else |
|
173 | else | |
174 | { |
|
174 | { | |
175 |
printf(" |
|
175 | printf("in action_enter_mode *** enter mode %d\n", requestedMode); | |
176 |
|
176 | |||
177 | #ifdef PRINT_TASK_STATISTICS |
|
177 | #ifdef PRINT_TASK_STATISTICS | |
178 | if (requestedMode != LFR_MODE_STANDBY) |
|
178 | if (requestedMode != LFR_MODE_STANDBY) | |
@@ -394,21 +394,15 int stop_current_mode() | |||||
394 |
|
394 | |||
395 | status = RTEMS_SUCCESSFUL; |
|
395 | status = RTEMS_SUCCESSFUL; | |
396 |
|
396 | |||
397 | #ifdef GSA |
|
|||
398 | LEON_Mask_interrupt( IRQ_WF ); // mask waveform interrupt (coming from the timer VHDL IP) |
|
|||
399 | LEON_Clear_interrupt( IRQ_WF ); // clear waveform interrupt (coming from the timer VHDL IP) |
|
|||
400 | timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR ); |
|
|||
401 | #else |
|
|||
402 | // mask interruptions |
|
397 | // mask interruptions | |
403 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt |
|
398 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt | |
404 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt |
|
399 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt | |
405 | // reset registers |
|
400 | // reset registers | |
406 | reset_wfp_burst_enable(); // reset burst and enable bits |
|
401 | reset_wfp_burst_enable(); // reset burst and enable bits | |
407 | reset_wfp_status(); // reset all the status bits |
|
402 | reset_wfp_status(); // reset all the status bits | |
408 |
// c |
|
403 | // clear interruptions | |
409 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt |
|
404 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt | |
410 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectarl matrix interrupt |
|
405 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectarl matrix interrupt | |
411 | #endif |
|
|||
412 | //********************** |
|
406 | //********************** | |
413 | // suspend several tasks |
|
407 | // suspend several tasks | |
414 | if (lfrCurrentMode != LFR_MODE_STANDBY) { |
|
408 | if (lfrCurrentMode != LFR_MODE_STANDBY) { | |
@@ -708,11 +702,18 int suspend_science_tasks() | |||||
708 |
|
702 | |||
709 | void launch_waveform_picker( unsigned char mode ) |
|
703 | void launch_waveform_picker( unsigned char mode ) | |
710 | { |
|
704 | { | |
|
705 | int startDate; | |||
|
706 | ||||
711 | reset_current_ring_nodes(); |
|
707 | reset_current_ring_nodes(); | |
712 | reset_waveform_picker_regs(); |
|
708 | reset_waveform_picker_regs(); | |
713 | set_wfp_burst_enable_register( mode ); |
|
709 | set_wfp_burst_enable_register( mode ); | |
714 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
710 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
715 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
711 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
|
712 | #ifdef VHDL_DEV | |||
|
713 | startDate = time_management_regs->coarse_time + 2; | |||
|
714 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x80; // [1000 0000] | |||
|
715 | waveform_picker_regs->start_date = startDate; | |||
|
716 | #endif | |||
716 | } |
|
717 | } | |
717 |
|
718 | |||
718 | //**************** |
|
719 | //**************** |
@@ -100,7 +100,7 rtems_isr waveforms_isr( rtems_vector_nu | |||||
100 | current_ring_node_f2 = current_ring_node_f2->next; |
|
100 | current_ring_node_f2 = current_ring_node_f2->next; | |
101 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; |
|
101 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; | |
102 | // (2) send an event for the waveforms transmission |
|
102 | // (2) send an event for the waveforms transmission | |
103 |
if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_ |
|
103 | if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) { | |
104 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
104 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
105 | } |
|
105 | } | |
106 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0 |
|
106 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffffbbb; // [1111 1011 1011 1011] f2 bit = 0 | |
@@ -289,11 +289,11 rtems_task cwf2_task(rtems_task_argument | |||||
289 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
289 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
290 | if (event_out == RTEMS_EVENT_MODE_BURST) |
|
290 | if (event_out == RTEMS_EVENT_MODE_BURST) | |
291 | { |
|
291 | { | |
292 | send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); |
|
292 | send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2->buffer_address, SID_BURST_CWF_F2, headerCWF_F2_BURST, queue_id ); | |
293 | } |
|
293 | } | |
294 | if (event_out == RTEMS_EVENT_MODE_SBM2) |
|
294 | if (event_out == RTEMS_EVENT_MODE_SBM2) | |
295 | { |
|
295 | { | |
296 | send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); |
|
296 | send_waveform_CWF( (volatile int *) ring_node_to_send_cwf_f2->buffer_address, SID_SBM2_CWF_F2, headerCWF_F2_SBM2, queue_id ); | |
297 | } |
|
297 | } | |
298 | } |
|
298 | } | |
299 | } |
|
299 | } | |
@@ -327,7 +327,7 rtems_task cwf1_task(rtems_task_argument | |||||
327 | // wait for an RTEMS_EVENT |
|
327 | // wait for an RTEMS_EVENT | |
328 | rtems_event_receive( RTEMS_EVENT_MODE_SBM1, |
|
328 | rtems_event_receive( RTEMS_EVENT_MODE_SBM1, | |
329 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
329 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
330 | send_waveform_CWF((volatile int*) ring_node_to_send_cwf_f1->buffer_address, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); |
|
330 | send_waveform_CWF( (volatile int*) ring_node_to_send_cwf_f1->buffer_address, SID_SBM1_CWF_F1, headerCWF_F1, queue_id ); | |
331 | } |
|
331 | } | |
332 | } |
|
332 | } | |
333 |
|
333 |
General Comments 0
You need to be logged in to leave comments.
Login now