Index: trunk/3DEES/Paella.v
===================================================================
--- trunk/3DEES/Paella.v	(revision 181)
+++ trunk/3DEES/Paella.v	(revision 182)
@@ -152,6 +152,6 @@
 		.adc_frame(sys_frame),
 		.adc_data({
-			adc_data[5], adc_data[4], adc_data[3],
-			adc_data[2], adc_data[1], adc_data[0]}));
+			adc_data[5], adc_data[3], adc_data[2],      // D3, D1, S2
+			adc_data[4], adc_data[1], adc_data[0]}));   // D2, S1_S, S1_F 
 
 	wire	[15:0]		cfg_bits [63:0];
@@ -198,10 +198,10 @@
 		begin : MUX_DATA
 			assign int_mux_data[j] = {
-				{6'd0, cls_data},
-				{4'd0, cls_flag, 7'd0},
-//				{4'd0, amp_flag[j][0], 7'd0},
+//				{6'd0, cls_data},
+//				{4'd0, cls_flag, 7'd0},
+				{4'd0, amp_flag[j][0], 7'd0},
 				amp_data[j][11:0],
-				clp_data[j][11:0]
-//				sys_data[j]
+				clp_data[j][11:0],
+				sys_data[j]
 				};
 		end
@@ -295,5 +295,5 @@
 //				.tau_data({16'd0, 16'd19835, 16'd19835, 16'd19835}),
 // exp(-32/1000)*1024*20
-				.tau_data({16'd0, cfg_bits[33+6*j], cfg_bits[32+6*j], cfg_bits[30+6*j]}),
+				.tau_data({16'd0, cfg_bits[34+6*j], cfg_bits[32+6*j], cfg_bits[30+6*j]}),
 				.inp_data({
 					19'd0, cic_data[j*3+2][18:0], cic_data[j*3+1][18:0], cic_data[j*3+0][18:0]}),
@@ -343,8 +343,8 @@
 			cfg_bits[23][11:0], cfg_bits[22][11:0], cfg_bits[21][11:0], cfg_bits[20][11:0],
 			cfg_bits[19][11:0], cfg_bits[18][11:0], cfg_bits[17][11:0], cfg_bits[16][11:0]}),
-		.inp_data({amp_data[5][11:0], amp_data[4][11:0], amp_data[0][11:0],
-			amp_data[0][11:0], amp_data[1][11:0], amp_data[0][11:0]}),
-		.inp_flag({amp_flag[5][0], amp_flag[4][0], amp_flag[0][0],
-			amp_flag[0][0], amp_flag[1][0], amp_flag[0][0]}),
+		.inp_data({amp_data[5][11:0], amp_data[4][11:0], amp_data[3][11:0],
+			amp_data[2][11:0], amp_data[1][11:0], amp_data[0][11:0]}),
+		.inp_flag({amp_flag[5][0], amp_flag[4][0], amp_flag[3][0],
+			amp_flag[2][0], amp_flag[1][0], amp_flag[0][0]}),
 		.out_flag(cls_flag),
 		.out_data(cls_data));
Index: trunk/3DEES/UserInterface.tcl
===================================================================
--- trunk/3DEES/UserInterface.tcl	(revision 181)
+++ trunk/3DEES/UserInterface.tcl	(revision 182)
@@ -69,24 +69,24 @@
     variable cfgThrs
     array set cfgThrs {
-        0  20
-        6  2000
-        1  20
-        7  2000
-        2  20
-        8  200
-        9  2000
-        10 3000
-        3  20
-        11 200
-        12 2000
-        13 3000
-        4  20
-        14 200
-        15 2000
-        16 3000
-        5  20
-        17 200
-        18 2000
-        19 3000
+        0  8
+        6  50
+        1  8
+        7  50
+        2  10
+        8  31
+        9  52
+        10 79
+        3  60
+        11 135
+        12 171
+        13 233
+        4  249
+        14 348
+        15 495
+        16 693
+        5  505
+        17 606
+        18 707
+        19 808
     }
 
@@ -97,7 +97,7 @@
     array set inpCodes {
         0 {r}
-        1 {f}
-        2 {d}
-        3 {c}
+        1 {c}
+        2 {a}
+        3 {f}
     }
 
@@ -351,5 +351,4 @@
                 set column [expr {$num + 1}]
                 set value $cfgCodes(${ch}_${num})
-                puts "${ch} ${num} ${value}"
                 spinbox ${config(thrs)}.thrs_${value} -from 0 -to 4095 \
                   -increment 10 -width 10 -textvariable [myvar thrs($value)] \
@@ -376,5 +375,4 @@
                 set column [expr {$num + 1}]
                 set value $cfgCodes(${ch}_${num})
-                puts "${ch} ${num} ${value}"
                 spinbox ${config(bins)}.thrs_${value} -from 0 -to 4095 \
                   -increment 10 -width 10 -textvariable [myvar thrs($value)] \
@@ -511,5 +509,5 @@
         $config(4).chan_0_4 select
         $config(5).chan_0_5 select
-        $config(6).chan_0_1 select
+        $config(6).chan_2_1 select
 
         foreach {ch dummy} [array get adcCodes] {
@@ -564,11 +562,11 @@
         grid $config(key).r -row 0 -column 0 -sticky news
 
-        label $config(key).f -text "f - filtered signal"
+        label $config(key).f -text "c - filtered and clipped signal"
         grid $config(key).f -row 0 -column 1 -sticky news
 
-        label $config(key).d -text "d - deconvoluted signal"
+        label $config(key).d -text "a - amplitude"
         grid $config(key).d -row 0 -column 2 -sticky news
 
-        label $config(key).c -text "c - clipped signal"
+        label $config(key).c -text "f - amplitude flag"
         grid $config(key).c -row 0 -column 3 -sticky news
 
@@ -983,5 +981,5 @@
 
         ${config}.thrs_check select
-        ${config}.thrs_field set 100
+        ${config}.thrs_field set 30
     }
 
