]> jspc29.x-matter.uni-frankfurt.de Git - jtag_mvd.git/commitdiff
removed hardcoded addresses and paths, changed to one chain on TRB3
authorHadaq in Frankfurt <hadaq@frankfurt>
Tue, 19 Mar 2013 08:46:24 +0000 (09:46 +0100)
committerHadaq in Frankfurt <hadaq@frankfurt>
Tue, 19 Mar 2013 08:46:24 +0000 (09:46 +0100)
13 files changed:
soft/toolbox/Hmon.pm
soft/toolbox/jtag_atomic/chains.ini
soft/toolbox/jtag_atomic/copy_on_datachanged.pl
soft/toolbox/jtag_atomic/files/.gitignore [new file with mode: 0644]
soft/toolbox/jtag_atomic/jtagmonitor_lastcounters.ini
soft/toolbox/jtag_atomic/jtagmonitor_usechainsini4.pl
soft/toolbox/jtag_atomic/the_gui.pl
soft/toolbox/jtag_atomic/ui.pl
soft/toolbox/jtag_atomic/ui_writeram.pl
soft/toolbox/prototype_setup.db
soft/toolbox/sensors/sensor1.ini
soft/toolbox/sensors/sensor2.ini
soft/toolbox/sensors/sensor3.ini

index b16923108b80f8adf0cccdf27afbf9976be2ae9b..9f3aabbe2fe4a19cebc76c18f976ae3dfdd76163 100644 (file)
@@ -4,7 +4,7 @@ use Data::Dumper;
 use warnings;
 use strict;
 
-use constant HMONDIR => "/local.1/daq/mvdmon/";
+use constant HMONDIR => "./";
 
 our %hublist;
 our $r_hublist = \%hublist;
index 072ee2288a1558227dfbbd6a750433fb6a2f195b..837a05fc0f918b7ce434b4fa461a60c491afc138 100644 (file)
@@ -1,7 +1,7 @@
 ;WARNING this file is generated automatically. don't edit manually.
 
 [chain1]
-FPGAtrbnetAddr=0xf013
+FPGAtrbnetAddr=0xf308
 RAMtrbnetAddr=0xa000
 CMDreg_trbnetAddr=0xa120
 RAMbase_trbnetAddr=0xa121
@@ -44,80 +44,3 @@ JNR1_sensor3=sensor3.ini
 JNR2_sensor2=sensor2.ini
 JNR3_sensor1=sensor1.ini
 ;END GENERATE_CHAINORDER chain1
-
-[chain2]
-FPGAtrbnetAddr=0xf013
-RAMtrbnetAddr=0xa000
-CMDreg_trbnetAddr=0xa320
-RAMbase_trbnetAddr=0xa321
-DATAreg_trbnetAddr=0xa322
-STATUS2RAM3BBASEADDRREGtrbnetAddr=0xa363
-STATUS2RAM3BtrbnetAddr=0xa370
-CONFsignals_trbnetAddr=0xb021
-CONFresetafterfirstwrite_trbnetAddr=0xb011
-CONFresetbeforeinit_trbnetAddr=0xb010
-CONFtrigmapsstart_trbnetAddr=0xb00e
-CONFtrigmapsreset_trbnetAddr=0xb00d
-CONFtrigrunjtag_trbnetAddr=0xb00f
-CONFtrigwriteonce_trbnetAddr=0xb014
-CONFtriginitseq_trbnetAddr=0xb00c
-chainnr=1
-DEBUGram1baddr=0xa347
-DEBUGram1bdata=0xa348
-DEBUGram1caddr=0xa349
-DEBUGram1cdata=0xa34a
-DEBUGram1crun=0xa34b
-; guiBM_NP_defaults1/guiBM_NP_defaults2 is a comma separated list of the following strings representing buttons in the gui:
-;'h_man_maps_reset', 'h_delay0', 'h_delay1', 'h_delay2', 'h_delay3', 'h_prog_ram', 'h_set_timing_10mhz', 'h_set_timing_1mhz', 'h_set_timing_100khz',
-; 'h_set_inout', 'h_maps_reset_before_on', 'h_maps_reset_after_on', 'h_maps_reset_before_off', 'h_maps_reset_after_off',
-;'h_maps_clk_on', 'h_maps_clk_off', 'h_trig_init_seq', 'h_maps_reset', 'h_run_jtag', 'h_write_once', 'h_maps_start'
-; gui_defaults1: executed in this order, before board defaults
-; gui_defaults2: executed in this order, after board defaults
-guiBM_NP_defaults1=h_delay1,h_prog_ram,h_set_timing_10mhz,h_set_inout,h_maps_reset_before_off,h_maps_reset_after_on
-guiBM_NP_defaults2=""
-
-
-;BEGIN GENERATE_CHAINORDER chain2
-JNR0_sensor8=sensor8.ini
-JNR1_sensor7=sensor7.ini
-JNR2_sensor6=sensor6.ini
-JNR3_sensor5=sensor5.ini
-;END GENERATE_CHAINORDER chain2
-
-[chain3]
-FPGAtrbnetAddr=0xf013
-RAMtrbnetAddr=0xa400
-CMDreg_trbnetAddr=0xa520
-RAMbase_trbnetAddr=0xa521
-DATAreg_trbnetAddr=0xa522
-STATUS2RAM3BBASEADDRREGtrbnetAddr=0xe163
-STATUS2RAM3BtrbnetAddr=0xa570
-CONFsignals_trbnetAddr=0xb022
-CONFresetafterfirstwrite_trbnetAddr=0xb011
-CONFresetbeforeinit_trbnetAddr=0xb010
-CONFtrigmapsstart_trbnetAddr=0xb00e
-CONFtrigmapsreset_trbnetAddr=0xb00d
-CONFtrigrunjtag_trbnetAddr=0xb00f
-CONFtrigwriteonce_trbnetAddr=0xb014
-CONFtriginitseq_trbnetAddr=0xb00c
-chainnr=2
-DEBUGram1baddr=0xa547
-DEBUGram1bdata=0xa548
-DEBUGram1caddr=0xa549
-DEBUGram1cdata=0xa54a
-DEBUGram1crun=0xa54b
-; guiBM_NP_defaults1/guiBM_NP_defaults2 is a comma separated list of the following strings representing buttons in the gui:
-;'h_man_maps_reset', 'h_delay0', 'h_delay1', 'h_delay2', 'h_delay3', 'h_prog_ram', 'h_set_timing_10mhz', 'h_set_timing_1mhz', 'h_set_timing_100khz',
-; 'h_set_inout', 'h_maps_reset_before_on', 'h_maps_reset_after_on', 'h_maps_reset_before_off', 'h_maps_reset_after_off',
-;'h_maps_clk_on', 'h_maps_clk_off', 'h_trig_init_seq', 'h_maps_reset', 'h_run_jtag', 'h_write_once', 'h_maps_start'
-; gui_defaults1: executed in this order, before board defaults
-; gui_defaults2: executed in this order, after board defaults
-guiBM_NP_defaults1=h_delay1,h_prog_ram,h_set_timing_10mhz,h_set_inout,h_maps_reset_before_off,h_maps_reset_after_on
-guiBM_NP_defaults2=""
-
-
-;BEGIN GENERATE_CHAINORDER chain3
-JNR0_sensor12=sensor12.ini
-JNR1_sensor10=sensor10.ini
-JNR2_sensor9=sensor9.ini
-;END GENERATE_CHAINORDER chain3
index b1b530e2784e24dabaa198187a30fa05ec5897ed..b2a8c9c3dfd6b830884dfee56479843cd936af16 100755 (executable)
@@ -38,7 +38,6 @@ required:
 "
 }
 
-$ENV{DAQOPSERVER}='trb124';
 
 sub int_to_32bit_hex($) {
   my ($in) = @_;
diff --git a/soft/toolbox/jtag_atomic/files/.gitignore b/soft/toolbox/jtag_atomic/files/.gitignore
new file mode 100644 (file)
index 0000000..72e8ffc
--- /dev/null
@@ -0,0 +1 @@
+*
index 4aee1374e1d76891410136c03c0e80790383321a..2b7fc732ccee481605a0ddce4a19374f0f4b03b3 100644 (file)
@@ -1,35 +1,17 @@
 [chain1]
-JNR3_sensor1_rerrors=
-JNR3_sensor1_werrors=
-JNR3_sensor1_run=
-JNR3_sensor1_datach=
-JNR2_sensor2_rerrors=
-JNR2_sensor2_werrors=
-JNR2_sensor2_run=
-JNR2_sensor2_datach=
-JNR1_sensor3_rerrors=
-JNR1_sensor3_werrors=
-JNR1_sensor3_run=
-JNR1_sensor3_datach=
-JNR0_sensor4_rerrors=
-JNR0_sensor4_werrors=
-JNR0_sensor4_run=
-JNR0_sensor4_datach=
-[chain2]
-JNR3_sensor5_rerrors=
-JNR3_sensor5_werrors=
-JNR3_sensor5_run=
-JNR3_sensor5_datach=
-JNR2_sensor6_rerrors=
-JNR2_sensor6_werrors=
-JNR2_sensor6_run=
-JNR2_sensor6_datach=
-JNR1_sensor7_rerrors=
-JNR1_sensor7_werrors=
-JNR1_sensor7_run=
-JNR1_sensor7_datach=
-JNR0_sensor8_rerrors=
-JNR0_sensor8_werrors=
-JNR0_sensor8_run=
-JNR0_sensor8_datach=
-[chain3]
+JNR3_sensor1_rerrors=1
+JNR3_sensor1_werrors=1
+JNR3_sensor1_run=6
+JNR3_sensor1_datach=1
+JNR2_sensor2_rerrors=1
+JNR2_sensor2_werrors=1
+JNR2_sensor2_run=6
+JNR2_sensor2_datach=1
+JNR1_sensor3_rerrors=1
+JNR1_sensor3_werrors=1
+JNR1_sensor3_run=6
+JNR1_sensor3_datach=1
+JNR0_sensor4_rerrors=1
+JNR0_sensor4_werrors=1
+JNR0_sensor4_run=6
+JNR0_sensor4_datach=1
index 7965e0ba483584063b9adfd8957438aec39c4490..3da19d5e76510cb7c1709f5ebc3dec0acbb3b45d 100755 (executable)
@@ -6,18 +6,19 @@ use Time::HiRes qw( gettimeofday usleep time );
 use FileHandle;
 use Data::Dumper;
 use POSIX qw/floor ceil/;
+use lib qw(libs);
 use Config::Abstract::Ini;
 use Sys::Syslog;
 my %laststore;
 my $totalsum = 0;
 use HADES::TrbNet;
-use lib qw(/daq/toolbox);
+use lib qw(../);
 use Hmon;
 use QA;
 use HPlot;
 openlog("atomic,jtagmonitor_usechainsini4.pl", "perror", "local1");
 syslog("INFO", "starting monitor");
-$ENV{DAQOPSERVER}='trb124';
+#$ENV{DAQOPSERVER}='trb124';
 
 sub int_to_32bit_hex($) {
   my ($in) = @_;
@@ -41,7 +42,7 @@ sub colored_table {
 
 }
 
-$ENV{DAQOPSERVER}='trb124';
+#$ENV{DAQOPSERVER}='trb124';
 
 trb_init_ports() or die trb_strerror();
 my $chainsfile= './chains.ini';
@@ -60,11 +61,12 @@ while (1){
   sleep(1);
   foreach my $chain (keys %allchains) {
     my %settings=%{$allchains{$chain}};
-    my $fpga_addr = $settings{'FPGAtrbnetAddr'};
-    my $cmd_reg_addr = $settings{'CMDreg_trbnetAddr'};
-    my $status2_ram3b_baseaddr_reg_addr = $settings{'STATUS2RAM3BBASEADDRREGtrbnetAddr'};
-    my $status2_ram3b_addr         = $settings{'STATUS2RAM3BtrbnetAddr'};
-    system("trbcmd w $fpga_addr $cmd_reg_addr 0x00000063"); # command: M26C_CMD_COPY_TO_STATUS2
+    my $fpga_addr = hex(substr($settings{'FPGAtrbnetAddr'},2));
+    my $cmd_reg_addr = hex(substr($settings{'CMDreg_trbnetAddr'},2));
+    my $status2_ram3b_baseaddr_reg_addr = hex(substr($settings{'STATUS2RAM3BBASEADDRREGtrbnetAddr'},2));
+    my $status2_ram3b_addr         = hex(substr($settings{'STATUS2RAM3BtrbnetAddr'},2));
+    trb_register_write($fpga_addr,$cmd_reg_addr,0x00000063);
+#     system("trbcmd w $fpga_addr $cmd_reg_addr 0x00000063"); # command: M26C_CMD_COPY_TO_STATUS2
   }
   sleep(1);
 #      my  $str = Hmon::MakeDate(0,0,"");
@@ -76,10 +78,10 @@ while (1){
   my $run_counter_changed = 0;
   foreach my $chain (sort(keys %allchains)) {
     my %settings=%{$allchains{$chain}};
-    my $fpga_addr = $settings{'FPGAtrbnetAddr'};
-    my $cmd_reg_addr = $settings{'CMDreg_trbnetAddr'};
-    my $status2_ram3b_baseaddr_reg_addr = $settings{'STATUS2RAM3BBASEADDRREGtrbnetAddr'};
-    my $status2_ram3b_addr         = $settings{'STATUS2RAM3BtrbnetAddr'};
+    my $fpga_addr = hex(substr($settings{'FPGAtrbnetAddr'},2));
+    my $cmd_reg_addr = hex(substr($settings{'CMDreg_trbnetAddr'},2));
+    my $status2_ram3b_baseaddr_reg_addr = hex(substr($settings{'STATUS2RAM3BBASEADDRREGtrbnetAddr'},2));
+    my $status2_ram3b_addr         = hex(substr($settings{'STATUS2RAM3BtrbnetAddr'},2));
     my @sensors;
     my @vert_list1;
     my @vert_list2;
@@ -96,20 +98,23 @@ while (1){
       if ($setting_name =~ /sensor[0-9]+/) {
         push(@sensors, $setting_name);
         my $i = (scalar @sensors)-1;
-        my $rambasepointer=int_to_32bit_hex(($i)*4);
-       print "trbcmd w $fpga_addr $status2_ram3b_baseaddr_reg_addr 0x$rambasepointer\n"; # ADDR_STATUS2_RAM3B_BASEADDR // FIRST COL
-       system("trbcmd w $fpga_addr $status2_ram3b_baseaddr_reg_addr 0x$rambasepointer"); # ADDR_STATUS2_RAM3B_BASEADDR // FIRST COL
+        my $rambasepointer=(($i)*4); #int_to_32bit_hex(($i)*4);
+       print "trbcmd w $fpga_addr $status2_ram3b_baseaddr_reg_addr $rambasepointer\n"; # ADDR_STATUS2_RAM3B_BASEADDR // FIRST COL
+       trb_register_write($fpga_addr,$status2_ram3b_baseaddr_reg_addr, $rambasepointer); 
+#      system("trbcmd w $fpga_addr $status2_ram3b_baseaddr_reg_addr 0x$rambasepointer"); # ADDR_STATUS2_RAM3B_BASEADDR // FIRST COL
 
         print "reading $fpga_addr $status2_ram3b_addr.\n";
-       my $rerrors1  = trb_register_read(hex($fpga_addr), hex($status2_ram3b_addr));
-        print "reading $fpga_addr " .(hex($status2_ram3b_addr)+2) ."\n";
-       my $werrors1  = trb_register_read(hex($fpga_addr), hex($status2_ram3b_addr)+2);
+       my $rerrors1  = trb_register_read(($fpga_addr), ($status2_ram3b_addr));
+       print Dumper $rerrors1;
+        print "reading $fpga_addr " .(($status2_ram3b_addr)+2) ."\n";
+       my $werrors1  = trb_register_read(($fpga_addr), ($status2_ram3b_addr)+2);
         
-        $rambasepointer=int_to_32bit_hex(($i)*4+2);
-       print "trbcmd w $fpga_addr $status2_ram3b_baseaddr_reg_addr 0x$rambasepointer\n"; # ADDR_STATUS2_RAM3B_BASEADDR // FIRST COL
-       system("trbcmd w $fpga_addr $status2_ram3b_baseaddr_reg_addr 0x$rambasepointer"); # ADDR_STATUS2_RAM3B_BASEADDR // SECOND COL
-       my $run  = trb_register_read(hex($fpga_addr), hex($status2_ram3b_addr));
-       my $dat  = trb_register_read(hex($fpga_addr), hex($status2_ram3b_addr)+2);
+        $rambasepointer=(($i)*4+2);#int_to_32bit_(($i)*4+2);
+       print "trbcmd w $fpga_addr $status2_ram3b_baseaddr_reg_addr $rambasepointer\n"; # ADDR_STATUS2_RAM3B_BASEADDR // FIRST COL
+  trb_register_write($fpga_addr,$status2_ram3b_baseaddr_reg_addr, $rambasepointer); 
+#      system("trbcmd w $fpga_addr $status2_ram3b_baseaddr_reg_addr 0x$rambasepointer"); # ADDR_STATUS2_RAM3B_BASEADDR // SECOND COL
+       my $run  = trb_register_read(($fpga_addr), ($status2_ram3b_addr));
+       my $dat  = trb_register_read(($fpga_addr), ($status2_ram3b_addr)+2);
 
 
        my $k=0, $v=0;
index b602b826ee9ad5ecd70d0250c115227378f4f15e..1026a58e6ce3665701e0b471517507afb5c48382 100755 (executable)
@@ -7,7 +7,6 @@ use POSIX qw(strftime);
 use FileHandle;
 require "./ui_generators.pl";
 
-$ENV{DAQOPSERVER}='trb124';
 if(not( -e "/tmp/jtag_initmem")) {
   system("mkdir /tmp/jtag_initmem");
 }
index b692f339e863dc1af9b23bd4bc84cc5d15d3e2b1..9f8ac91ea20ff5bcab5fb0c94566dd7c7bf928e7 100755 (executable)
@@ -10,7 +10,7 @@ use Sys::Syslog;
 require "./ui_generators.pl";
 
 
-$ENV{DAQOPSERVER}='trb124';
+#$ENV{DAQOPSERVER}='trb124';
 
 my $opt_help;
 my $opt_chain;
index a71c7e1d5fff1e4b64f06d0b0ba2f6af9c4e7c3b..9336a96e384a11dd692a06027c2e7b44351f3609 100755 (executable)
@@ -254,7 +254,7 @@ foreach my $chain (keys %allchains) {
       @drs_length = ();
       my $sensorfile = $settings{$setting_name};
       if(not defined($opt_quiet)) { print "loading sensor file: $sensorfile\n"; }
-      my $sensorSettingsO = new Config::Abstract::Ini("/daq/toolbox/sensors/".$sensorfile);
+      my $sensorSettingsO = new Config::Abstract::Ini("../sensors/".$sensorfile);
       my %sensorSettings = $sensorSettingsO->get_all_settings;
       my $this_irlen = $sensorSettingsO->get_entry_setting('General', 'IRLEN', '5');
       my $bypassreg  = $sensorSettingsO->get_entry_setting('General', 'BYPASSREG', '1F');
index c75155a89639905ba19253f9f4fb0d0bcb4d28eb..13f7dd39a1b4fa8c3b2759997cd8199cc2a9516a 100644 (file)
@@ -97,15 +97,15 @@ sensor2    chain1       2        1.2
 sensor3    chain1       1        1.4
 sensor4    chain1       0        1.5
 
-sensor5    chain2       3        1.7
-sensor6    chain2       2        1.8
-sensor7    chain2       1        4.1
-sensor8    chain2       0        4.2
-
-sensor9    chain3       2        4.3
-sensor10   chain3       1        4.4
-sensor11   chain3       F        4.5
-sensor12   chain3       0        4.6
+#sensor5    chain2       3        1.7
+#sensor6    chain2       2        1.8
+#sensor7    chain2       1        4.1
+#sensor8    chain2       0        4.2
+
+#sensor9    chain3       2        4.3
+#sensor10   chain3       1        4.4
+#sensor11   chain3       F        4.5
+#sensor12   chain3       0        4.6
 
 ====================================================
 
index 312402e6dd08858d7a7e080765b88cc0f94ccdb5..480804bc9e7b2f48a2799f88b3f69986fdb9827f 100644 (file)
@@ -2,7 +2,8 @@
 IRLEN=5
 BYPASSREG=1F
 [Data]
-00=0F,152,006432202064C1B08BAB32648020280A0A0A0A64
+; Format: Laufende Nummer=HEXADECIMAL INSTRUCTION REGISTER,REGISTER LENGTH IN BITS,HEXADECIMAL DATA REGISTER LIKE ARABIC NUMBERS(PADDED WITH LEADING ZEROS TO MULTIPLE OF 32 BIT)
+00=0F,152,00643220206481B08BAB32648020280A0A0A0A64
 ;00=0F,152,006432202064FFFFFFFF32768020280A0A0A0A64
 ;00=0F,152,0064322020649ECD74C532768020280A0A0A0A5F  Bertrams LAST
 ;00=0F,152,006432202064B8E3ADD032768020280A0A0A0A64
index 65583d1aa7bc99b987bf42ade6d0c61caeab60b5..b75eeb49295ac62da6192c83ca31a7a946e46355 100644 (file)
@@ -2,7 +2,7 @@
 IRLEN=5
 BYPASSREG=1F
 [Data]
-00=0F,152,006432202064A9D2DEA232648020280A0A0A0A64
+00=0F,152,006432202064FFFFFFFF32648020280A0A0A0A64
 ;00=0F,152,006432202064AFDAE2A932648020280A0A0A0A64
 ;00=0F,152,006432202064FFFFFFFF32768020280A0A0A0A64
 ;00=0F,152,0064322020649ECD74C532768020280A0A0A0A5F  Bertrams LAST
@@ -44,4 +44,4 @@ BYPASSREG=1F
 ;00=0F,152,006432202064B8E183D532768020280A0A0A0A5F  FPC13_R recalib manually by BN
 
 
-;00=0F,152,006432202064AED883D132768020280A0A0A0A64  Boris recalib CVD sensor (both on 1 FEB)
\ No newline at end of file
+;00=0F,152,006432202064AED883D132768020280A0A0A0A64  Boris recalib CVD sensor (both on 1 FEB)
index fbd601bda8a1fbe70cb909b2a7cdc30e3c8d1749..5ec76a958443751bbc923e8d10ae51e8dc06560f 100644 (file)
@@ -2,7 +2,7 @@
 IRLEN=5
 BYPASSREG=1F
 [Data]
-00=0F,152,006432202064A9C1D3C432648020280A0A0A0A64
+00=0F,152,006432202064FFFFFFFF32648020280A0A0A0A64
 ;00=0F,152,006432202064FFFFFFFF32768020280A0A0A0A64
 ;00=0F,152,0064322020649ECD74C532768020280A0A0A0A5F  Bertrams LAST
 ;00=0F,152,006432202064B8E3ADD032768020280A0A0A0A64
@@ -42,4 +42,4 @@ BYPASSREG=1F
 ;00=0F,152,006432202064B8E183D532768020280A0A0A0A5F  FPC13_R recalib manually by BN
 
 
-;00=0F,152,006432202064AED883D132768020280A0A0A0A64  Boris recalib CVD sensor (both on 1 FEB)
\ No newline at end of file
+;00=0F,152,006432202064AED883D132768020280A0A0A0A64  Boris recalib CVD sensor (both on 1 FEB)