##// END OF EJS Templates
last version before VHDL design upgrade...
paul -
r53:572a09e609bc nov2013
parent child
Show More
@@ -1,6 +1,6
1 #############################################################################
1 #############################################################################
2 # Makefile for building: bin/fsw
2 # Makefile for building: bin/fsw
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Mon Nov 4 07:05:32 2013
3 # Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Nov 5 07:57:53 2013
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
@@ -10,7 +10,7
10
10
11 CC = sparc-rtems-gcc
11 CC = sparc-rtems-gcc
12 CXX = sparc-rtems-g++
12 CXX = sparc-rtems-g++
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=20 -DPRINT_MESSAGES_ON_CONSOLE
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=21 -DPRINT_MESSAGES_ON_CONSOLE
14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -7,11 +7,11 CONFIG -= qt
7 include(./sparc.pri)
7 include(./sparc.pri)
8
8
9 # flight software version
9 # flight software version
10 SWVERSION=-0-20
10 SWVERSION=-0-21
11 DEFINES += SW_VERSION_N1=0
11 DEFINES += SW_VERSION_N1=0
12 DEFINES += SW_VERSION_N2=0
12 DEFINES += SW_VERSION_N2=0
13 DEFINES += SW_VERSION_N3=0
13 DEFINES += SW_VERSION_N3=0
14 DEFINES += SW_VERSION_N4=20
14 DEFINES += SW_VERSION_N4=21
15
15
16 contains( CONFIG, verbose ) {
16 contains( CONFIG, verbose ) {
17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
@@ -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 2.8.0, 2013-11-04T07:04:49. -->
3 <!-- Written by QtCreator 2.8.1, 2013-11-05T13:07:12. -->
4 <qtcreator>
4 <qtcreator>
5 <data>
5 <data>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -45,23 +45,7 struct time_management_regs_str{
45 };
45 };
46 typedef struct time_management_regs_str time_management_regs_t;
46 typedef struct time_management_regs_str time_management_regs_t;
47
47
48 struct waveform_picker_regs_str{
48 struct new_waveform_picker_regs_str{
49 volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
50 volatile int burst_enable; // 0x04 01 *** burst f2, f1, f0 enable f3, f2, f1, f0
51 volatile int addr_data_f0; // 0x08 10 ***
52 volatile int addr_data_f1; // 0x0c 11 ***
53 volatile int addr_data_f2; // 0x10 100 ***
54 volatile int addr_data_f3; // 0x14 101 ***
55 volatile int status; // 0x18 110 ***
56 volatile int delta_snapshot; // 0x1c 111 ***
57 volatile int delta_f2_f1; // 0x20 0000 ***
58 volatile int delta_f2_f0; // 0x24 0001 ***
59 volatile int nb_burst_available;// 0x28 0010 ***
60 volatile int nb_snapshot_param; // 0x2c 0011 ***
61 };
62 typedef struct waveform_picker_regs_str waveform_picker_regs_t;
63
64 struct waveform_picker_regs_str_alt{
65 volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
49 volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
66 volatile int run_burst_enable; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
50 volatile int run_burst_enable; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
67 volatile int addr_data_f0; // 0x08
51 volatile int addr_data_f0; // 0x08
@@ -78,7 +62,7 struct waveform_picker_regs_str_alt{
78 volatile int snapshot_param;
62 volatile int snapshot_param;
79 volatile int start_date;
63 volatile int start_date;
80 };
64 };
81 typedef struct waveform_picker_regs_str_alt waveform_picker_regs_t_alt;
65 typedef struct new_waveform_picker_regs_str new_waveform_picker_regs_t;
82
66
83 struct spectral_matrix_regs_str{
67 struct spectral_matrix_regs_str{
84 volatile int config;
68 volatile int config;
@@ -13,7 +13,7
13 extern struct param_sbm1_str param_sbm1;
13 extern struct param_sbm1_str param_sbm1;
14 extern struct param_sbm2_str param_sbm2;
14 extern struct param_sbm2_str param_sbm2;
15 extern time_management_regs_t *time_management_regs;
15 extern time_management_regs_t *time_management_regs;
16 extern waveform_picker_regs_t *waveform_picker_regs;
16 extern new_waveform_picker_regs_t *new_waveform_picker_regs;
17 extern gptimer_regs_t *gptimer_regs;
17 extern gptimer_regs_t *gptimer_regs;
18 extern rtems_name misc_name[5];
18 extern rtems_name misc_name[5];
19 extern rtems_id Task_id[20]; /* array of task ids */
19 extern rtems_id Task_id[20]; /* array of task ids */
@@ -65,9 +65,10 rtems_id get_pkts_queue_id( void );
65 void set_wfp_data_shaping();
65 void set_wfp_data_shaping();
66 char set_wfp_delta_snapshot();
66 char set_wfp_delta_snapshot();
67 void set_wfp_burst_enable_register( unsigned char mode);
67 void set_wfp_burst_enable_register( unsigned char mode);
68 void reset_wfp_burst_enable();
68 void reset_wfp_run_burst_enable();
69 void reset_wfp_status();
69 void reset_wfp_status();
70 void reset_new_waveform_picker_regs();
70 void reset_new_waveform_picker_regs();
71 void reset_new_waveform_picker_regs_alt();
71
72
72 //*****************
73 //*****************
73 // local parameters
74 // local parameters
@@ -52,4 +52,3 struct drvmgr_bus_res grlib_drv_resource
52 }
52 }
53 };
53 };
54
54
55
@@ -70,7 +70,6 rtems_task Init( rtems_task_argument ign
70 *
70 *
71 */
71 */
72
72
73
74 rtems_status_code status;
73 rtems_status_code status;
75 rtems_status_code status_spw;
74 rtems_status_code status_spw;
76 rtems_isr_entry old_isr_handler;
75 rtems_isr_entry old_isr_handler;
@@ -84,6 +83,10 rtems_task Init( rtems_task_argument ign
84 //send_console_outputs_on_apbuart_port();
83 //send_console_outputs_on_apbuart_port();
85 set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE);
84 set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE);
86
85
86 // waveform picker registers initialization
87 reset_wfp_run_burst_enable();
88 reset_wfp_status();
89
87 init_parameter_dump();
90 init_parameter_dump();
88 init_local_mode_parameters();
91 init_local_mode_parameters();
89 init_housekeeping_parameters();
92 init_housekeeping_parameters();
@@ -388,7 +388,7 int stop_current_mode()
388 LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt
388 LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt
389 LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt
389 LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // mask spectral matrix interrupt
390 // reset registers
390 // reset registers
391 reset_wfp_burst_enable(); // reset burst and enable bits
391 reset_wfp_run_burst_enable(); // reset run, burst and enable bits, [r b2 b1 b0 e3 e2 e1 e0]
392 reset_wfp_status(); // reset all the status bits
392 reset_wfp_status(); // reset all the status bits
393 // creal interruptions
393 // creal interruptions
394 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt
394 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt
@@ -464,6 +464,7 int enter_standby_mode()
464 int enter_normal_mode()
464 int enter_normal_mode()
465 {
465 {
466 rtems_status_code status;
466 rtems_status_code status;
467 int startDate;
467
468
468 status = restart_science_tasks();
469 status = restart_science_tasks();
469
470
@@ -479,10 +480,13 int enter_normal_mode()
479 #else
480 #else
480 //****************
481 //****************
481 // waveform picker
482 // waveform picker
482 reset_waveform_picker_regs();
483 reset_new_waveform_picker_regs();
483 set_wfp_burst_enable_register(LFR_MODE_NORMAL);
484 set_wfp_burst_enable_register(LFR_MODE_NORMAL);
484 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
485 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
485 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
486 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
487 startDate = time_management_regs->coarse_time + 2;
488 new_waveform_picker_regs->start_date = startDate;
489 new_waveform_picker_regs->run_burst_enable = new_waveform_picker_regs->run_burst_enable | 0x80; // [1000 0000]
486 //****************
490 //****************
487 // spectral matrix
491 // spectral matrix
488 #endif
492 #endif
@@ -499,7 +503,7 int enter_burst_mode()
499 #ifdef GSA
503 #ifdef GSA
500 LEON_Unmask_interrupt( IRQ_SM );
504 LEON_Unmask_interrupt( IRQ_SM );
501 #else
505 #else
502 reset_waveform_picker_regs();
506 reset_new_waveform_picker_regs();
503 set_wfp_burst_enable_register(LFR_MODE_BURST);
507 set_wfp_burst_enable_register(LFR_MODE_BURST);
504 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
508 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
505 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
509 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
@@ -521,7 +525,7 int enter_sbm1_mode()
521 #ifdef GSA
525 #ifdef GSA
522 LEON_Unmask_interrupt( IRQ_SM );
526 LEON_Unmask_interrupt( IRQ_SM );
523 #else
527 #else
524 reset_waveform_picker_regs();
528 reset_new_waveform_picker_regs();
525 set_wfp_burst_enable_register(LFR_MODE_SBM1);
529 set_wfp_burst_enable_register(LFR_MODE_SBM1);
526 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
530 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
527 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
531 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
@@ -547,7 +551,7 int enter_sbm2_mode()
547 #ifdef GSA
551 #ifdef GSA
548 LEON_Unmask_interrupt( IRQ_SM );
552 LEON_Unmask_interrupt( IRQ_SM );
549 #else
553 #else
550 reset_waveform_picker_regs();
554 reset_new_waveform_picker_regs();
551 set_wfp_burst_enable_register(LFR_MODE_SBM2);
555 set_wfp_burst_enable_register(LFR_MODE_SBM2);
552 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
556 LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER );
553 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
557 LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER );
@@ -33,6 +33,9 rtems_isr waveforms_isr( rtems_vector_nu
33 *
33 *
34 */
34 */
35
35
36 rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 );
37 new_waveform_picker_regs->status = new_waveform_picker_regs->status & 0xfffff00f; // clear new_err and full_err
38
36 #ifdef GSA
39 #ifdef GSA
37 #else
40 #else
38 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
41 if ( (lfrCurrentMode == LFR_MODE_NORMAL)
@@ -999,7 +1002,8 void set_wfp_burst_enable_register( unsi
999 switch(mode) {
1002 switch(mode) {
1000 case(LFR_MODE_NORMAL):
1003 case(LFR_MODE_NORMAL):
1001 new_waveform_picker_regs->run_burst_enable = 0x00; // [0000 0000] no burst enable
1004 new_waveform_picker_regs->run_burst_enable = 0x00; // [0000 0000] no burst enable
1002 new_waveform_picker_regs->run_burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0
1005 // new_waveform_picker_regs->run_burst_enable = 0x0f; // [0000 1111] enable f3 f2 f1 f0
1006 new_waveform_picker_regs->run_burst_enable = 0x07; // [0000 0111] enable f2 f1 f0
1003 break;
1007 break;
1004 case(LFR_MODE_BURST):
1008 case(LFR_MODE_BURST):
1005 new_waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled
1009 new_waveform_picker_regs->run_burst_enable = 0x40; // [0100 0000] f2 burst enabled
@@ -1020,7 +1024,7 void set_wfp_burst_enable_register( unsi
1020 #endif
1024 #endif
1021 }
1025 }
1022
1026
1023 void reset_wfp_burst_enable()
1027 void reset_wfp_run_burst_enable()
1024 {
1028 {
1025 /** This function resets the waveform picker burst_enable register.
1029 /** This function resets the waveform picker burst_enable register.
1026 *
1030 *
@@ -1050,21 +1054,42 void reset_wfp_status()
1050
1054
1051 void reset_new_waveform_picker_regs()
1055 void reset_new_waveform_picker_regs()
1052 {
1056 {
1053 new_waveform_picker_regs->data_shaping = 0x01; // 0x00 00 *** R1 R0 SP1 SP0 BW
1057 new_waveform_picker_regs->data_shaping = 0x01; // 0x00 *** R1 R0 SP1 SP0 BW
1054 new_waveform_picker_regs->run_burst_enable = 0x00; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
1058 new_waveform_picker_regs->run_burst_enable = 0x00; // 0x04 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
1055 new_waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // 0x08
1059 new_waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // 0x08
1056 new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); // 0x0c
1060 new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); // 0x0c
1057 new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); // 0x10
1061 new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); // 0x10
1058 new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); // 0x14
1062 new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); // 0x14
1059 new_waveform_picker_regs->status = 0x00; // 0x18
1063 new_waveform_picker_regs->status = 0x00; // 0x18
1060 new_waveform_picker_regs->delta_snapshot = 0x12800; // 0x1c
1064 // new_waveform_picker_regs->delta_snapshot = 0x12800; // 0x1c 296 * 256 = 75776
1061 new_waveform_picker_regs->delta_f0 = 0x3f5; // 0x20 *** 1013
1065 new_waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c 16 * 256 = 4096
1062 new_waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7
1066 new_waveform_picker_regs->delta_f0 = 0x3f5; // 0x20 *** 1013
1063 new_waveform_picker_regs->delta_f1 = 0x3c0; // 0x28 *** 960
1067 new_waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7
1064 new_waveform_picker_regs->delta_f2 = 0x12200; // 0x2c *** 74240
1068 new_waveform_picker_regs->delta_f1 = 0x3c0; // 0x28 *** 960
1065 new_waveform_picker_regs->nb_data_by_buffer = 0x1802; // 0x30 *** 2048 * 3 + 2
1069 // new_waveform_picker_regs->delta_f2 = 0x12200; // 0x2c *** 74240
1066 new_waveform_picker_regs->snapshot_param = 0x7ff; // 0x34 *** 2048 -1
1070 new_waveform_picker_regs->delta_f2 = 0xc00; // 0x2c *** 12 * 256 = 2048
1067 new_waveform_picker_regs->start_date = 0x00;
1071 new_waveform_picker_regs->nb_data_by_buffer = 0x1802; // 0x30 *** 2048 * 3 + 2
1072 new_waveform_picker_regs->snapshot_param = 0x7ff; // 0x34 *** 2048 -1
1073 new_waveform_picker_regs->start_date = 0x00; // 0x38
1074 }
1075
1076 void reset_new_waveform_picker_regs_alt()
1077 {
1078 new_waveform_picker_regs->data_shaping = 0x01; // 0x00 *** R1 R0 SP1 SP0 BW
1079 new_waveform_picker_regs->run_burst_enable = 0x00; // 0x04 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
1080 new_waveform_picker_regs->addr_data_f0 = (int) (wf_snap_f0); // 0x08
1081 new_waveform_picker_regs->addr_data_f1 = (int) (wf_snap_f1); // 0x0c
1082 new_waveform_picker_regs->addr_data_f2 = (int) (wf_snap_f2); // 0x10
1083 new_waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3); // 0x14
1084 new_waveform_picker_regs->status = 0x00; // 0x18
1085 new_waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c 16 * 256 = 4096
1086 new_waveform_picker_regs->delta_f0 = 0x19; // 0x20 *** 1013
1087 new_waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7
1088 new_waveform_picker_regs->delta_f1 = 0x19; // 0x28 *** 960
1089 new_waveform_picker_regs->delta_f2 = 0x400; // 0x2c *** 4 * 256 = 1024
1090 new_waveform_picker_regs->nb_data_by_buffer = 0x32; // 0x30 *** 16 * 3 + 2
1091 new_waveform_picker_regs->snapshot_param = 0xf; // 0x34 *** 16 -1
1092 new_waveform_picker_regs->start_date = 0x00; // 0x38
1068 }
1093 }
1069
1094
1070 //*****************
1095 //*****************
General Comments 0
You need to be logged in to leave comments. Login now