]> jspc29.x-matter.uni-frankfurt.de Git - dirich.git/commitdiff
change calibration range to lower values due to problems in some dirich boards
authorAdrian Weber <adrian.a.weber@exp2.physik.uni-giessen.de>
Tue, 3 Aug 2021 07:29:12 +0000 (09:29 +0200)
committerAdrian Weber <adrian.a.weber@exp2.physik.uni-giessen.de>
Tue, 3 Aug 2021 07:29:12 +0000 (09:29 +0200)
combiner_cts/code_EBR/LUT.vhd
combiner_cts/code_EBR/LUT_calculation.pl [new file with mode: 0644]

index 5e3af673a20cb38390283d2578383dd3b0e62989..d42c9d1972c6e23c7dc42ad2c9edba2d77dd7193 100644 (file)
@@ -37,41 +37,41 @@ end entity;
 architecture lut of LUT is
   subtype lutin is std_logic_vector (11 downto 0);
   subtype lutout is std_logic_vector (11 downto 0);
-  type lut is array (natural range 436 to 563) of lutout;
+  type lut is array (natural range 400 to 527) of lutout;
 
   constant LUTslope:   lut := (
-    "100100101101", "100100100111", "100100100010", "100100011101", 
-    "100100010111", "100100010010", "100100001101", "100100001000", 
-    "100100000010", "100011111101", "100011111000", "100011110011", 
+    "101000000000", "100111111010", "100111110011", "100111101101", 
+    "100111100111", "100111100001", "100111011010", "100111010100", 
+    "100111001110", "100111001000", "100111000010", "100110111100", 
+    "100110110110", "100110110000", "100110101010", "100110100100", 
+    "100110011110", "100110011000", "100110010010", "100110001100", 
+    "100110000110", "100110000001", "100101111011", "100101110101", 
+    "100101101111", "100101101010", "100101100100", "100101011110", 
+    "100101011001", "100101010011", "100101001110", "100101001000", 
+    "100101000011", "100100111101", "100100111000", "100100110010", 
+    "100100101101", "100100101000", "100100100010", "100100011101", 
+    "100100011000", "100100010010", "100100001101", "100100001000", 
+    "100100000011", "100011111101", "100011111000", "100011110011", 
     "100011101110", "100011101001", "100011100100", "100011011111", 
-    "100011011001", "100011010100", "100011010000", "100011001011", 
+    "100011011010", "100011010101", "100011010000", "100011001011", 
     "100011000110", "100011000001", "100010111100", "100010110111", 
-    "100010110010", "100010101101", "100010101000", "100010100100", 
-    "100010011111", "100010011010", "100010010101", "100010010001", 
-    "100010001100", "100010000111", "100010000011", "100001111110", 
-    "100001111001", "100001110101", "100001110000", "100001101100", 
-    "100001100111", "100001100011", "100001011110", "100001011010", 
-    "100001010101", "100001010001", "100001001100", "100001001000", 
-    "100001000100", "100000111111", "100000111011", "100000110111", 
-    "100000110010", "100000101110", "100000101010", "100000100110", 
-    "100000100001", "100000011101", "100000011001", "100000010101", 
-    "100000010001", "100000001100", "100000001000", "100000000100", 
+    "100010110010", "100010101110", "100010101001", "100010100100", 
+    "100010011111", "100010011011", "100010010110", "100010010001", 
+    "100010001100", "100010001000", "100010000011", "100001111111", 
+    "100001111010", "100001110101", "100001110001", "100001101100", 
+    "100001101000", "100001100011", "100001011111", "100001011010", 
+    "100001010110", "100001010001", "100001001101", "100001001001", 
+    "100001000100", "100001000000", "100000111011", "100000110111", 
+    "100000110011", "100000101111", "100000101010", "100000100110", 
+    "100000100010", "100000011110", "100000011001", "100000010101", 
+    "100000010001", "100000001101", "100000001001", "100000000101", 
     "100000000000", "011111111100", "011111111000", "011111110100", 
     "011111110000", "011111101100", "011111101000", "011111100100", 
     "011111100000", "011111011100", "011111011000", "011111010100", 
-    "011111010000", "011111001100", "011111001000", "011111000100", 
-    "011111000000", "011110111101", "011110111001", "011110110101", 
-    "011110110001", "011110101101", "011110101010", "011110100110", 
-    "011110100010", "011110011110", "011110011011", "011110010111", 
-    "011110010011", "011110010000", "011110001100", "011110001000", 
-    "011110000101", "011110000001", "011101111110", "011101111010", 
-    "011101110110", "011101110011", "011101101111", "011101101100", 
-    "011101101000", "011101100101", "011101100001", "011101011110", 
-    "011101011010", "011101010111", "011101010011", "011101010000", 
-    "011101001101", "011101001001", "011101000110", "011101000010", 
-    "011100111111", "011100111100", "011100111000", "011100110101", 
-    "011100110010", "011100101110", "011100101011", "011100101000", 
-    "011100100101", "011100100001", "011100011110", "011100011011"
+    "011111010001", "011111001101", "011111001001", "011111000101", 
+    "011111000001", "011110111101", "011110111001", "011110110110", 
+    "011110110010", "011110101110", "011110101010", "011110100110", 
+    "011110100011", "011110011111", "011110011011", "011110011000" 
     );
         
   signal do_cal_out_i : std_logic := '0';
@@ -117,4 +117,4 @@ begin
   
   do_cal_out <= do_cal_out_i;
 
-end architecture;
\ No newline at end of file
+end architecture;
diff --git a/combiner_cts/code_EBR/LUT_calculation.pl b/combiner_cts/code_EBR/LUT_calculation.pl
new file mode 100644 (file)
index 0000000..55add9b
--- /dev/null
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+
+print "calc LUTs\n";
+print "  Remove last \",\"\n";
+print "%%---------------------------------%%\n";
+
+my $range_start = 400;
+
+my $range_end = $range_start + 127;
+
+sub slope {
+   my $val = shift @_;
+   
+   my $val_ret = int( (1000*1024-512)/($val))+2;
+   return $val_ret;
+
+}
+
+print "  type lut is array (natural range $range_start to $range_end) of lutout;\n\n";
+print "  constant LUTslope:   lut := (\n";
+# 128 entries
+foreach $i ($range_start..$range_end){
+  my $valRet = slope($i);
+  if ($i%4 == 0) {print "    ";}
+  printf("\"%012b\", ", $valRet);
+  if ($i%4 == 3) {print "\n";}
+}
+
+print "    );\n"