@@ -1,6 +1,6 | |||
|
1 | 1 | ############################################################################# |
|
2 | 2 | # Makefile for building: bin/fsw |
|
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: |
|
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Nov 14 09:47:53 2013 | |
|
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 |
@@ -10,7 +10,7 | |||
|
10 | 10 | |
|
11 | 11 | CC = sparc-rtems-gcc |
|
12 | 12 | CXX = sparc-rtems-g++ |
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=22 -DPRINT_MESSAGES_ON_CONSOLE | |
|
13 | DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=22 -DPRINT_MESSAGES_ON_CONSOLE -DPRINT_TASK_STATISTICS | |
|
14 | 14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | 15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
16 | 16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header |
@@ -1,7 +1,7 | |||
|
1 | 1 | TEMPLATE = app |
|
2 | 2 | # CONFIG += console v8 sim |
|
3 | 3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** gsa |
|
4 | CONFIG += console verbose | |
|
4 | CONFIG += console verbose cpu_usage_report | |
|
5 | 5 | CONFIG -= qt |
|
6 | 6 | |
|
7 | 7 | include(./sparc.pri) |
@@ -1,6 +1,6 | |||
|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
|
2 | 2 | <!DOCTYPE QtCreatorProject> |
|
3 |
<!-- Written by QtCreator 2.8.1, 2013-11-1 |
|
|
3 | <!-- Written by QtCreator 2.8.1, 2013-11-14T11:56:41. --> | |
|
4 | 4 | <qtcreator> |
|
5 | 5 | <data> |
|
6 | 6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
@@ -22,9 +22,12 Header_TM_LFR_SCIENCE_CWF_t headerCWF_F3 | |||
|
22 | 22 | |
|
23 | 23 | unsigned char doubleSendCWF1 = 0; |
|
24 | 24 | unsigned char doubleSendCWF2 = 0; |
|
25 | unsigned char fullRecord; | |
|
25 | 26 | |
|
26 | 27 | rtems_isr waveforms_isr( rtems_vector_number vector ) |
|
27 | 28 | { |
|
29 | unsigned int statusReg; | |
|
30 | ||
|
28 | 31 | /** This is the interrupt sub routine called by the waveform picker core. |
|
29 | 32 | * |
|
30 | 33 | * This ISR launch different actions depending mainly on two pieces of information: |
@@ -33,7 +36,6 rtems_isr waveforms_isr( rtems_vector_nu | |||
|
33 | 36 | * |
|
34 | 37 | */ |
|
35 | 38 | |
|
36 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
37 | 39 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff00f; // clear new_err and full_err |
|
38 | 40 | |
|
39 | 41 | #ifdef GSA |
@@ -71,17 +73,22 rtems_isr waveforms_isr( rtems_vector_nu | |||
|
71 | 73 | #ifdef GSA |
|
72 | 74 | PRINTF("in waveform_isr *** unexpected waveform picker interruption\n") |
|
73 | 75 | #else |
|
74 | if ( (new_waveform_picker_regs->run_burst_enable & 0x7) == 0x0 ){ // if no channel is enable | |
|
75 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
76 | statusReg = new_waveform_picker_regs->status; | |
|
77 | fullRecord = fullRecord | ( statusReg & 0x7 ); | |
|
78 | // if ( (new_waveform_picker_regs->status & 0x7) == 0x7 ){ // f2 f1 and f0 are full | |
|
79 | // if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
|
80 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
81 | // } | |
|
82 | // new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff888; | |
|
83 | // } | |
|
84 | if ( fullRecord == 0x7 ){ // f2 f1 and f0 are full | |
|
85 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
|
86 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
87 | } | |
|
88 | fullRecord = 0x00; | |
|
76 | 89 | } |
|
77 | else { | |
|
78 |
|
|
|
79 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
|
80 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
|
81 | } | |
|
82 | new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff888; | |
|
83 | } | |
|
84 | } | |
|
90 | new_waveform_picker_regs->status = ( new_waveform_picker_regs->status & (~statusReg) ) | |
|
91 | | ( new_waveform_picker_regs->status & 0xfffffff8 ); | |
|
85 | 92 | #endif |
|
86 | 93 | break; |
|
87 | 94 | |
@@ -462,23 +469,41 void init_waveforms( void ) | |||
|
462 | 469 | |
|
463 | 470 | for (i=0; i< NB_SAMPLES_PER_SNAPSHOT; i++) |
|
464 | 471 | { |
|
472 | // //*** | |
|
473 | // // F0 | |
|
474 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x88887777; // | |
|
475 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; // | |
|
476 | // wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x44443333; // | |
|
477 | ||
|
478 | // //*** | |
|
479 | // // F1 | |
|
480 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x22221111; | |
|
481 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x44443333; | |
|
482 | // wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; | |
|
483 | ||
|
484 | // //*** | |
|
485 | // // F2 | |
|
486 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x44443333; | |
|
487 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x22221111; | |
|
488 | // wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0xaaaa0000; | |
|
489 | ||
|
465 | 490 | //*** |
|
466 | 491 | // F0 |
|
467 |
wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x |
|
|
468 |
wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x |
|
|
469 |
wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x |
|
|
492 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x0; // | |
|
493 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x0; // | |
|
494 | wf_snap_f0[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x0; // | |
|
470 | 495 | |
|
471 | 496 | //*** |
|
472 | 497 | // F1 |
|
473 |
wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x |
|
|
474 |
wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x |
|
|
475 |
wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x |
|
|
498 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x0; | |
|
499 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x0; | |
|
500 | wf_snap_f1[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x0; | |
|
476 | 501 | |
|
477 | 502 | //*** |
|
478 | 503 | // F2 |
|
479 |
wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x |
|
|
480 |
wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x |
|
|
481 |
wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x |
|
|
504 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 0 + TIME_OFFSET ] = 0x0; | |
|
505 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 1 + TIME_OFFSET ] = 0x0; | |
|
506 | wf_snap_f2[ (i* NB_WORDS_SWF_BLK) + 2 + TIME_OFFSET ] = 0x0; | |
|
482 | 507 | |
|
483 | 508 | //*** |
|
484 | 509 | // F3 |
@@ -723,7 +748,7 int send_waveform_SWF( volatile int *wav | |||
|
723 | 748 | |
|
724 | 749 | for (i=0; i<7; i++) // send waveform |
|
725 | 750 | { |
|
726 | spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) ]; | |
|
751 | spw_ioctl_send_SWF.data = (char*) &waveform[ (i * 340 * NB_WORDS_SWF_BLK) + TIME_OFFSET ]; | |
|
727 | 752 | spw_ioctl_send_SWF.hdr = (char*) &headerSWF[ i ]; |
|
728 | 753 | // BUILD THE DATA |
|
729 | 754 | if (i==6) { |
@@ -1089,10 +1114,10 void reset_new_waveform_picker_regs() | |||
|
1089 | 1114 | // new_waveform_picker_regs->delta_snapshot = 0x12800; // 0x1c 296 * 256 = 75776 |
|
1090 | 1115 | new_waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c 16 * 256 = 4096 |
|
1091 | 1116 | new_waveform_picker_regs->delta_f0 = 0x3f5; // 0x20 *** 1013 |
|
1092 | new_waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 | |
|
1117 | new_waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 [7 bits] | |
|
1093 | 1118 | new_waveform_picker_regs->delta_f1 = 0x3c0; // 0x28 *** 960 |
|
1094 | 1119 | // new_waveform_picker_regs->delta_f2 = 0x12200; // 0x2c *** 74240 |
|
1095 |
new_waveform_picker_regs->delta_f2 = 0xc00; // 0x2c *** 12 * 256 = |
|
|
1120 | new_waveform_picker_regs->delta_f2 = 0xc00; // 0x2c *** 12 * 256 = 3072 | |
|
1096 | 1121 | new_waveform_picker_regs->nb_data_by_buffer = 0x7ff; // 0x30 *** 2048 -1 |
|
1097 | 1122 | new_waveform_picker_regs->snapshot_param = 0x800; // 0x34 *** 2048 |
|
1098 | 1123 | new_waveform_picker_regs->start_date = 0x00; // 0x38 |
General Comments 0
You need to be logged in to leave comments.
Login now