@@ -0,0 +1,9 | |||||
|
1 | #!/usr/bin/lppmon -e | |||
|
2 | ||||
|
3 | proxy.loadSysDriver("AHBUARTplugin","AHBUART"); | |||
|
4 | proxy.loadSysDriverToParent("dsu3plugin","AHBUART"); | |||
|
5 | proxy.loadSysDriverToParent("APB UART PLUGIN","AHBUART"); | |||
|
6 | AHBUART.open("/dev/ttyUSB0",30000000) | |||
|
7 | dsu3plugin0.openFile("/opt/DEV_PLE/FSW-qt/bin/fsw-vhdl-dev") | |||
|
8 | dsu3plugin0.loadFile() | |||
|
9 | dsu3plugin0.run() |
@@ -0,0 +1,13 | |||||
|
1 | #!/usr/bin/lppmon -e | |||
|
2 | ||||
|
3 | proxy.loadSysDriver("RMAPPlugin","RMAPplugin0"); | |||
|
4 | proxy.loadSysDriverToParent("dsu3plugin","RMAPplugin0"); | |||
|
5 | ||||
|
6 | #BUTTON_selectStarDundee.click() | |||
|
7 | BUTTON_selectGRESB.click() | |||
|
8 | ||||
|
9 | BUTTON_rmapOpenCommunication.click() | |||
|
10 | dsu3plugin0.openFile("/opt/DEV_PLE/FSW-qt/bin/fsw-vhdl-dev") | |||
|
11 | dsu3plugin0.loadFile() | |||
|
12 | dsu3plugin0.run() | |||
|
13 |
@@ -0,0 +1,6 | |||||
|
1 | #!/usr/bin/lppmon -e | |||
|
2 | ||||
|
3 | dsu3plugin0.openFile("/opt/DEV_PLE/FSW-qt/bin/fsw-vhdl-dev") | |||
|
4 | dsu3plugin0.loadFile() | |||
|
5 | dsu3plugin0.run() | |||
|
6 |
@@ -23,6 +23,7 void timer_set_clock_divider(gptimer_reg | |||||
23 |
|
23 | |||
24 | // SERIAL LINK |
|
24 | // SERIAL LINK | |
25 | int send_console_outputs_on_apbuart_port( void ); |
|
25 | int send_console_outputs_on_apbuart_port( void ); | |
|
26 | int enable_apbuart_transmitter( void ); | |||
26 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value); |
|
27 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value); | |
27 |
|
28 | |||
28 | // RTEMS TASKS |
|
29 | // RTEMS TASKS |
@@ -52,6 +52,9 typedef struct ring_node | |||||
52 | #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3 |
|
52 | #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3 | |
53 | #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4 |
|
53 | #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4 | |
54 | #define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5 |
|
54 | #define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5 | |
|
55 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F0 RTEMS_EVENT_6 | |||
|
56 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F1 RTEMS_EVENT_7 | |||
|
57 | #define RTEMS_EVENT_MODE_NORMAL_SWF_F2 RTEMS_EVENT_8 | |||
55 |
|
58 | |||
56 | //**************************** |
|
59 | //**************************** | |
57 | // LFR DEFAULT MODE PARAMETERS |
|
60 | // LFR DEFAULT MODE PARAMETERS | |
@@ -99,6 +102,7 typedef struct ring_node | |||||
99 | #endif |
|
102 | #endif | |
100 |
|
103 | |||
101 | #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff |
|
104 | #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff | |
|
105 | #define APBUART_CTRL_REG_MASK_TE 0x00000002 | |||
102 | #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 (0x50) |
|
106 | #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400 (0x50) | |
103 |
|
107 | |||
104 | //********** |
|
108 | //********** |
@@ -76,8 +76,10 rtems_task Init( rtems_task_argument ign | |||||
76 | rtems_isr_entry old_isr_handler; |
|
76 | rtems_isr_entry old_isr_handler; | |
77 |
|
77 | |||
78 | // UART settings |
|
78 | // UART settings | |
|
79 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); | |||
79 | send_console_outputs_on_apbuart_port(); |
|
80 | send_console_outputs_on_apbuart_port(); | |
80 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); |
|
81 | enable_apbuart_transmitter(); | |
|
82 | PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n") | |||
81 |
|
83 | |||
82 | BOOT_PRINTF("\n\n\n\n\n") |
|
84 | BOOT_PRINTF("\n\n\n\n\n") | |
83 | BOOT_PRINTF("***************************\n") |
|
85 | BOOT_PRINTF("***************************\n") |
@@ -7,15 +7,6 | |||||
7 |
|
7 | |||
8 | #include "fsw_misc.h" |
|
8 | #include "fsw_misc.h" | |
9 |
|
9 | |||
10 | //char *DumbMessages[7] = {"in DUMB *** default", // RTEMS_EVENT_0 |
|
|||
11 | // "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 |
|
|||
12 | // "in DUMB *** waveforms_isr", // RTEMS_EVENT_2 |
|
|||
13 | // "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 |
|
|||
14 | // "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 |
|
|||
15 | // "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5 |
|
|||
16 | // "ERR HK" // RTEMS_EVENT_6 |
|
|||
17 | //}; |
|
|||
18 |
|
||||
19 | void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, |
|
10 | void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, | |
20 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) |
|
11 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) | |
21 | { |
|
12 | { | |
@@ -91,7 +82,15 int send_console_outputs_on_apbuart_port | |||||
91 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
82 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |
92 |
|
83 | |||
93 | apbuart_regs->ctrl = apbuart_regs->ctrl & APBUART_CTRL_REG_MASK_DB; |
|
84 | apbuart_regs->ctrl = apbuart_regs->ctrl & APBUART_CTRL_REG_MASK_DB; | |
94 | PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n") |
|
85 | ||
|
86 | return 0; | |||
|
87 | } | |||
|
88 | ||||
|
89 | int enable_apbuart_transmitter( void ) // set the bit 1, TE Transmitter Enable to 1 in the APBUART control register | |||
|
90 | { | |||
|
91 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |||
|
92 | ||||
|
93 | apbuart_regs->ctrl = apbuart_regs->ctrl | APBUART_CTRL_REG_MASK_TE; | |||
95 |
|
94 | |||
96 | return 0; |
|
95 | return 0; | |
97 | } |
|
96 | } | |
@@ -255,6 +254,7 rtems_task dumb_task( rtems_task_argumen | |||||
255 | coarse_time = time_management_regs->coarse_time; |
|
254 | coarse_time = time_management_regs->coarse_time; | |
256 | fine_time = time_management_regs->fine_time; |
|
255 | fine_time = time_management_regs->fine_time; | |
257 | printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); |
|
256 | printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); | |
|
257 | PRINTF1("status = %x\n", waveform_picker_regs->status) | |||
258 | } |
|
258 | } | |
259 | } |
|
259 | } | |
260 | } |
|
260 | } |
@@ -46,8 +46,6 rtems_isr waveforms_isr( rtems_vector_nu | |||||
46 | * |
|
46 | * | |
47 | */ |
|
47 | */ | |
48 |
|
48 | |||
49 | static unsigned char nb_swf = 0; |
|
|||
50 |
|
||||
51 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) |
|
49 | if ( (lfrCurrentMode == LFR_MODE_NORMAL) | |
52 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) |
|
50 | || (lfrCurrentMode == LFR_MODE_SBM1) || (lfrCurrentMode == LFR_MODE_SBM2) ) | |
53 | { // in modes other than STANDBY and BURST, send the CWF_F3 data |
|
51 | { // in modes other than STANDBY and BURST, send the CWF_F3 data | |
@@ -77,7 +75,12 rtems_isr waveforms_isr( rtems_vector_nu | |||||
77 | //****** |
|
75 | //****** | |
78 | // NORMAL |
|
76 | // NORMAL | |
79 | case(LFR_MODE_NORMAL): |
|
77 | case(LFR_MODE_NORMAL): | |
80 |
if ( (waveform_picker_regs->status & 0x |
|
78 | if ( (waveform_picker_regs->status & 0xff8) != 0x00) // [1000] check the error bits | |
|
79 | { | |||
|
80 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |||
|
81 | } | |||
|
82 | if ( (waveform_picker_regs->status & 0x07) == 0x07) // [0111] check the f2, f1, f0 full bits | |||
|
83 | { | |||
81 | // change F0 ring node |
|
84 | // change F0 ring node | |
82 | ring_node_to_send_swf_f0 = current_ring_node_f0; |
|
85 | ring_node_to_send_swf_f0 = current_ring_node_f0; | |
83 | current_ring_node_f0 = current_ring_node_f0->next; |
|
86 | current_ring_node_f0 = current_ring_node_f0->next; | |
@@ -90,20 +93,13 rtems_isr waveforms_isr( rtems_vector_nu | |||||
90 | ring_node_to_send_swf_f2 = current_ring_node_f2; |
|
93 | ring_node_to_send_swf_f2 = current_ring_node_f2; | |
91 | current_ring_node_f2 = current_ring_node_f2->next; |
|
94 | current_ring_node_f2 = current_ring_node_f2->next; | |
92 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; |
|
95 | waveform_picker_regs->addr_data_f2 = current_ring_node_f2->buffer_address; | |
93 | // send an event to the WFRM task |
|
96 | // | |
94 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { |
|
97 | if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_MODE_NORMAL ) != RTEMS_SUCCESSFUL) { | |
95 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); |
|
98 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_2 ); | |
96 | } |
|
99 | } | |
97 | // nb_swf = nb_swf + 1; |
|
|||
98 | // if (nb_swf == 2) |
|
|||
99 | // { |
|
|||
100 | // reset_wfp_burst_enable(); |
|
|||
101 | // } |
|
|||
102 | // else |
|
|||
103 | // { |
|
|||
104 |
|
|
100 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888; // [1000 1000 1000] | |
105 | // } |
|
|||
106 | } |
|
101 | } | |
|
102 | ||||
107 | break; |
|
103 | break; | |
108 |
|
104 | |||
109 | //****** |
|
105 | //****** | |
@@ -213,19 +209,28 rtems_task wfrm_task(rtems_task_argument | |||||
213 | while(1){ |
|
209 | while(1){ | |
214 | // wait for an RTEMS_EVENT |
|
210 | // wait for an RTEMS_EVENT | |
215 | rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1 |
|
211 | rtems_event_receive(RTEMS_EVENT_MODE_NORMAL | RTEMS_EVENT_MODE_SBM1 | |
216 |
| RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM |
|
212 | | RTEMS_EVENT_MODE_SBM2 | RTEMS_EVENT_MODE_SBM2_WFRM | |
|
213 | | RTEMS_EVENT_MODE_NORMAL_SWF_F0 | |||
|
214 | | RTEMS_EVENT_MODE_NORMAL_SWF_F1 | |||
|
215 | | RTEMS_EVENT_MODE_NORMAL_SWF_F2, | |||
217 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
216 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
218 | if (event_out == RTEMS_EVENT_MODE_NORMAL) |
|
217 | if (event_out == RTEMS_EVENT_MODE_NORMAL) | |
219 | { |
|
218 | { | |
220 | PRINTF1("status %x\n", waveform_picker_regs->status ) |
|
|||
221 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id); |
|
219 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id); | |
222 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f1->buffer_address, SID_NORM_SWF_F1, headerSWF_F1, queue_id); |
|
220 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f1->buffer_address, SID_NORM_SWF_F1, headerSWF_F1, queue_id); | |
223 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f2->buffer_address, SID_NORM_SWF_F2, headerSWF_F2, queue_id); |
|
221 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f2->buffer_address, SID_NORM_SWF_F2, headerSWF_F2, queue_id); | |
224 | waveform_picker_regs->status = waveform_picker_regs->status & 0xfffff888; // [1000 1000 1000] |
|
222 | } | |
|
223 | if ( (event_out & RTEMS_EVENT_MODE_NORMAL_SWF_F0) == RTEMS_EVENT_MODE_NORMAL_SWF_F0) | |||
|
224 | { | |||
|
225 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f0->buffer_address, SID_NORM_SWF_F0, headerSWF_F0, queue_id); | |||
225 | } |
|
226 | } | |
226 | else |
|
227 | if ( (event_out & RTEMS_EVENT_MODE_NORMAL_SWF_F1) == RTEMS_EVENT_MODE_NORMAL_SWF_F1) | |
227 | { |
|
228 | { | |
228 | PRINTF("in WFRM *** unexpected event") |
|
229 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f1->buffer_address, SID_NORM_SWF_F1, headerSWF_F1, queue_id); | |
|
230 | } | |||
|
231 | if ( (event_out & RTEMS_EVENT_MODE_NORMAL_SWF_F2) == RTEMS_EVENT_MODE_NORMAL_SWF_F2) | |||
|
232 | { | |||
|
233 | send_waveform_SWF((volatile int*) ring_node_to_send_swf_f2->buffer_address, SID_NORM_SWF_F2, headerSWF_F2, queue_id); | |||
229 | } |
|
234 | } | |
230 | } |
|
235 | } | |
231 | } |
|
236 | } | |
@@ -1126,17 +1131,23 void reset_waveform_picker_regs() | |||||
1126 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_a); // 0x14 |
|
1131 | waveform_picker_regs->addr_data_f3 = (int) (wf_cont_f3_a); // 0x14 | |
1127 | waveform_picker_regs->status = 0x00; // 0x18 |
|
1132 | waveform_picker_regs->status = 0x00; // 0x18 | |
1128 | // |
|
1133 | // | |
1129 |
|
|
1134 | waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c *** 4096 = 16 * 256 | |
1130 |
|
|
1135 | waveform_picker_regs->delta_f0 = 0xc0b; // 0x20 *** 3083 = 4096 - 1013 | |
1131 |
|
|
1136 | waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 [7 bits] | |
1132 |
|
|
1137 | waveform_picker_regs->delta_f1 = 0xc40; // 0x28 *** 3136 = 4096 - 960 | |
1133 |
|
|
1138 | waveform_picker_regs->delta_f2 = 0xc00; // 0x2c *** 3072 = 12 * 256 | |
1134 | // |
|
1139 | // | |
1135 | waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c *** 4096 = 16 * 256 |
|
1140 | // waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c *** 4096 = 16 * 256 | |
1136 | waveform_picker_regs->delta_f0 = 0x1; // 0x20 *** |
|
1141 | // waveform_picker_regs->delta_f0 = 0x1; // 0x20 *** | |
1137 | waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 [7 bits] |
|
1142 | // waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 [7 bits] | |
1138 | waveform_picker_regs->delta_f1 = 0x1; // 0x28 *** |
|
1143 | // waveform_picker_regs->delta_f1 = 0x1; // 0x28 *** | |
1139 | waveform_picker_regs->delta_f2 = 0x1; // 0x2c *** |
|
1144 | // waveform_picker_regs->delta_f2 = 0x1; // 0x2c *** | |
|
1145 | // | |||
|
1146 | // waveform_picker_regs->delta_snapshot = 0x1000; // 0x1c *** 4096 = 16 * 256 | |||
|
1147 | // waveform_picker_regs->delta_f0 = 0x0fff; // 0x20 *** | |||
|
1148 | // waveform_picker_regs->delta_f0_2 = 0x7; // 0x24 *** 7 [7 bits] | |||
|
1149 | // waveform_picker_regs->delta_f1 = 0x0fff; // 0x28 *** | |||
|
1150 | // waveform_picker_regs->delta_f2 = 0x1; // 0x2c *** | |||
1140 | // 2048 |
|
1151 | // 2048 | |
1141 | // waveform_picker_regs->nb_data_by_buffer = 0x7ff; // 0x30 *** 2048 -1 => nb samples -1 |
|
1152 | // waveform_picker_regs->nb_data_by_buffer = 0x7ff; // 0x30 *** 2048 -1 => nb samples -1 | |
1142 | // waveform_picker_regs->snapshot_param = 0x800; // 0x34 *** 2048 => nb samples |
|
1153 | // waveform_picker_regs->snapshot_param = 0x800; // 0x34 *** 2048 => nb samples |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now