##// END OF EJS Templates
VHDL_DEV implemented. The code is compatible with:...
paul -
r91:6af3303996c6 VHDLib206
parent child
Show More
@@ -1,6 +1,6
1 1 #############################################################################
2 # Makefile for building: bin/fsw
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Jan 21 15:38:15 2014
2 # Makefile for building: bin/fsw-vhdl-dev
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Jan 23 13:51:15 2014
4 4 # Project: fsw-qt.pro
5 5 # Template: app
6 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 87 /usr/lib64/qt4/mkspecs/features/lex.prf \
88 88 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
89 89 fsw-qt.pro
90 QMAKE_TARGET = fsw
90 QMAKE_TARGET = fsw-vhdl-dev
91 91 DESTDIR = bin/
92 TARGET = bin/fsw
92 TARGET = bin/fsw-vhdl-dev
93 93
94 94 first: all
95 95 ####### Implicit rules
@@ -170,8 +170,8 qmake: FORCE
170 170 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
171 171
172 172 dist:
173 @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.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
173 @$(CHK_DIR_EXISTS) obj/fsw-vhdl-dev1.0.0 || $(MKDIR) obj/fsw-vhdl-dev1.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 177 clean:compiler_clean
@@ -46,7 +46,7 contains( CONFIG, gsa ) {
46 46 TARGET = fsw
47 47 contains( CONFIG, vhdl_dev ) {
48 48 DEFINES += VHDL_DEV
49 TARGET = fsw
49 TARGET = fsw-vhdl-dev
50 50 }
51 51
52 52 INCLUDEPATH += \
@@ -1,6 +1,6
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by QtCreator 3.0.0, 2014-01-21T15:59:52. -->
3 <!-- Written by QtCreator 3.0.0, 2014-01-24T06:51:07. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -26,10 +26,9 extern int fdSPW;
26 26 // waveform buffers
27 27 // F0
28 28 extern volatile int wf_snap_f0[ ];
29 // F1
30 extern volatile int wf_snap_f1[ ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ];
31 // F2
32 extern volatile int wf_snap_f2[ ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ];
29 // F1 F2
30 extern volatile int wf_snap_f1[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 46 ];
31 extern volatile int wf_snap_f2[ ][ (NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK) + TIME_OFFSET + 46 ];
33 32 // F3
34 33 extern volatile int wf_cont_f3_a[ ];
35 34 extern volatile int wf_cont_f3_b[ ];
@@ -32,15 +32,15 int fdUART = 0;
32 32 unsigned char lfrCurrentMode;
33 33
34 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 ];
36 //
37 volatile int wf_snap_f1[ NB_RING_NODES_F1 ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ];
38 //
39 volatile int wf_snap_f2[ NB_RING_NODES_F2 ][ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ];
40 //
41 volatile int wf_cont_f3_a[ 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 ];
43 char wf_cont_f3_light[ NB_SAMPLES_PER_SNAPSHOT * NB_BYTES_CWF3_LIGHT_BLK ];
35 // F0
36 volatile int wf_snap_f0[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET ] __attribute__((aligned(0x100)));
37 // F1 F2
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 + 46 ] __attribute__((aligned(0x100)));
40 // F3
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 ] __attribute__((aligned(0x100)));
43 char wf_cont_f3_light[ NB_SAMPLES_PER_SNAPSHOT * NB_BYTES_CWF3_LIGHT_BLK ] __attribute__((aligned(0x100)));
44 44
45 45 // SPECTRAL MATRICES GLOBAL VARIABLES
46 46 volatile int spec_mat_f0_0[ SM_HEADER + TOTAL_SIZE_SM ];
@@ -78,6 +78,9 rtems_task Init( rtems_task_argument ign
78 78 BOOT_PRINTF("\n\n\n\n\n")
79 79 BOOT_PRINTF("***************************\n")
80 80 BOOT_PRINTF("** START Flight Software **\n")
81 #ifdef VHDL_DEV
82 PRINTF("/!\\ this is the VHDL_DEV flight software /!\\ \n")
83 #endif
81 84 BOOT_PRINTF("***************************\n")
82 85 BOOT_PRINTF("\n\n")
83 86
@@ -172,7 +172,7 int action_enter_mode(ccsdsTelecommandPa
172 172 }
173 173 else
174 174 {
175 printf("try to enter mode %d\n", requestedMode);
175 printf("in action_enter_mode *** enter mode %d\n", requestedMode);
176 176
177 177 #ifdef PRINT_TASK_STATISTICS
178 178 if (requestedMode != LFR_MODE_STANDBY)
@@ -394,21 +394,15 int stop_current_mode()
394 394
395 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 397 // mask interruptions
403 398 LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt
404 399 LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt
405 400 // reset registers
406 401 reset_wfp_burst_enable(); // reset burst and enable bits
407 402 reset_wfp_status(); // reset all the status bits
408 // creal interruptions
403 // clear interruptions
409 404 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt
410 405 LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectarl matrix interrupt
411 #endif
412 406 //**********************
413 407 // suspend several tasks
414 408 if (lfrCurrentMode != LFR_MODE_STANDBY) {
@@ -708,11 +702,18 int suspend_science_tasks()
708 702
709 703 void launch_waveform_picker( unsigned char mode )
710 704 {
705 int startDate;
706
711 707 reset_current_ring_nodes();
712 708 reset_waveform_picker_regs();
713 709 set_wfp_burst_enable_register( mode );
714 710 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
715 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 100 current_ring_node_f2 = current_ring_node_f2->next;
101 101 waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address;
102 102 // (2) send an event for the waveforms transmission
103 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_SBM2 ) != RTEMS_SUCCESSFUL) {
103 if (rtems_event_send( Task_id[TASKID_CWF2], RTEMS_EVENT_MODE_BURST ) != RTEMS_SUCCESSFUL) {
104 104 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
105 105 }
106 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 289 RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out);
290 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 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 327 // wait for an RTEMS_EVENT
328 328 rtems_event_receive( RTEMS_EVENT_MODE_SBM1,
329 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