]> jspc29.x-matter.uni-frankfurt.de Git - dirich.git/commitdiff
start of combiner with integrated CTS. (files for online calib already added)
authorAdrian Weber <a.weber@gsi.de>
Mon, 20 Apr 2020 11:33:14 +0000 (13:33 +0200)
committerAdrian Weber <a.weber@gsi.de>
Mon, 20 Apr 2020 11:33:14 +0000 (13:33 +0200)
40 files changed:
combiner_cts/big_data_file [new file with mode: 0644]
combiner_cts/code_EBR/CalLimit3.vhd [new file with mode: 0644]
combiner_cts/code_EBR/Cal_Limits.vhd [new file with mode: 0644]
combiner_cts/code_EBR/Cal_Limits_v2.vhd [new file with mode: 0644]
combiner_cts/code_EBR/Calc_output.vhd [new file with mode: 0644]
combiner_cts/code_EBR/Calibration.vhd [new file with mode: 0644]
combiner_cts/code_EBR/Delta.vhd [new file with mode: 0644]
combiner_cts/code_EBR/LUT.vhd [new file with mode: 0644]
combiner_cts/code_EBR/Memory.vhd [new file with mode: 0644]
combiner_cts/code_EBR/Memory_curr.vhd [new file with mode: 0644]
combiner_cts/code_EBR/cnt_val.vhd [new file with mode: 0644]
combiner_cts/code_EBR/compare_old.vhd [new file with mode: 0644]
combiner_cts/code_EBR/default_val.vhd [new file with mode: 0644]
combiner_cts/code_EBR/file_output.vhd [new file with mode: 0644]
combiner_cts/code_EBR/input_env.vhd [new file with mode: 0644]
combiner_cts/code_EBR/read_Memory.vhd [new file with mode: 0644]
combiner_cts/code_EBR/read_cnt.vhd [new file with mode: 0644]
combiner_cts/code_EBR/sim_tb.vhd [new file with mode: 0644]
combiner_cts/code_EBR/transcript [new file with mode: 0644]
combiner_cts/code_EBR/trb_net_std.vhd [new file with mode: 0644]
combiner_cts/code_EBR/txt_util.vhd [new file with mode: 0644]
combiner_cts/combiner.lpf [new file with mode: 0644]
combiner_cts/combiner.prj [new file with mode: 0644]
combiner_cts/combiner.vhd [new file with mode: 0644]
combiner_cts/compile.pl [new symlink]
combiner_cts/config.vhd [new file with mode: 0644]
combiner_cts/config_compile_frankfurt.pl [new file with mode: 0644]
combiner_cts/config_compile_gsi.pl [new file with mode: 0644]
combiner_cts/config_compile_gsi.pl_orig [new file with mode: 0644]
combiner_cts/core/FIFO_36x128.ipx [new file with mode: 0644]
combiner_cts/core/FIFO_36x128.lpc [new file with mode: 0644]
combiner_cts/core/FIFO_36x128.vhd [new file with mode: 0644]
combiner_cts/core/FIFO_36x64.ipx [new file with mode: 0644]
combiner_cts/core/FIFO_36x64.lpc [new file with mode: 0644]
combiner_cts/core/FIFO_36x64.vhd [new file with mode: 0644]
combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.ipx [new file with mode: 0644]
combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.lpc [new file with mode: 0644]
combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.vhd [new file with mode: 0644]
combiner_cts/par.p2t [new file with mode: 0644]
combiner_cts/synplify.fdc [new file with mode: 0644]

diff --git a/combiner_cts/big_data_file b/combiner_cts/big_data_file
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/combiner_cts/code_EBR/CalLimit3.vhd b/combiner_cts/code_EBR/CalLimit3.vhd
new file mode 100644 (file)
index 0000000..fa71395
--- /dev/null
@@ -0,0 +1,141 @@
+architecture i of i is
+  type tLocalBuffer is array ( (locBufDepth-1) downto 0) of std_logic_vector(31 downto 0); --(Flag [31])(reserved [30] )(FPGA [29:26])(channel [25:20])(Max [19:10])(Min [9:0])
+       signal EBRbufCurr       : tLocalBuffer;
+       signal EBRbufNext       : tLocalBuffer;
+begin
+
+THE_Mem : process(CLK)
+       variable EBRCurr_Min_v  : std_logic_vector(9 downto 0);
+       variable EBRCurr_Max_v  : std_logic_vector(9 downto 0);
+       variable EBRNext_Min_v  : std_logic_vector(9 downto 0);
+       variable EBRNext_Max_v  : std_logic_vector(9 downto 0);
+begin
+       if rising_edge(CLK) then
+               --------- Current Values -----------------------------
+               EBRCurr_Min_v <= min_curr_in;
+               EBRCurr_Max_v <= max_curr_in;
+
+               for i in 0 to (locBufDepth-1) loop
+                       if (EBRbufCurr(i)(31) = '1') and (EBRbufCurr(i)(29 downto 26) = FPGA) and (EBRbufCurr(i)(25 downto 20) = chnl) then
+                               EBRCurr_Min_v := EBRbufCurr(i)( 9 downto  0);
+                               EBRCurr_Max_v := EBRbufCurr(i)(19 downto 10);
+                       end if;
+               end loop;
+
+               for i in 0 to (locBufDepth-2) loop
+                       EBRbufCurr(i) <= EBRbufCurr(i+1);
+               end loop;
+               
+               --------- Next Values -----------------------------
+               EBRNext_Min_v <= min_next_in;
+               EBRNext_Max_v <= max_next_in;
+               
+               for i in 0 to (locBufDepth-1) loop
+                       if (EBRbufNext(i)(31) = '1') and (EBRbufNext(i)(29 downto 26) = FPGA) and (EBRbufNext(i)(25 downto 20) = chnl) then
+                               EBRNext_Min_v := EBRbufNext(i)( 9 downto  0);
+                               EBRNext_Max_v := EBRbufNext(i)(19 downto 10);
+                       end if;
+               end loop;
+
+               for i in 0 to (locBufDepth-2) loop
+                       EBRbufNext(i) <= EBRbufNext(i+1);
+               end loop;
+
+               --------------------------------------------------------------
+               -----------------------------  NEXT  -------------------------
+               --------------------------------------------------------------
+               if Do_Cal_in = '1' then
+                       write_next      <= '1';
+                       if cnt_i /= to_unsigned(0,20) then --next memory
+                               if unsigned(DIN(21 downto 12)) >= unsigned(EBRNext_Max_v) then
+                                       EBRNext_Max_v <= DIN(21 downto 12);
+                                       if unsigned(DIN(21 downto 12)) < unsigned(EBRNext_Min_v) then
+                                               EBRNext_Min_v <= DIN(21 downto 12);
+                                       end if; 
+                               else
+                                       if unsigned(DIN(21 downto 12)) < unsigned(EBRNext_Min_v) then
+                                               EBRNext_Min_v <= DIN(21 downto 12);
+                                       end if; 
+                               end if;
+                       else
+                               EBRNext_Min_v   <= DIN(21 downto 12);--"1111111111";
+                               EBRNext_Max_v   <= DIN(21 downto 12);--"0000000000";
+                       end if; --/= 0
+                       EBRbufNext(locBufDepth-1)<= "10" & FPGA & chnl & EBRNext_Max_v & EBRNext_Min_v;
+                       min_next                <= EBRNext_Min_v;
+                       max_next                <= EBRNext_Max_v;
+               else -- no calib
+                 write_next    <= '0';
+                 min_next              <= "0000000000";
+                       max_next                <= "0000000000";
+                       EBRbufNext(locBufDepth-1) <= x"00000000";
+               end if;
+               
+               --------------------------------------------------------------
+               --------------------------  CURRENT  -------------------------
+               --------------------------------------------------------------
+               if dflt_i(to_integer(unsigned(FPGA)),to_integer(unsigned(chnl))) = '0' then
+                       if Do_Cal_in = '1' then
+                               if cnt_i /= to_unsigned(0,20) then
+                                       min_out <= EBRCurr_Min_v;
+                                       max_out <= EBRCurr_Max_v;
+                                       if (unsigned(EBRCurr_Min_v) < unsigned(EBRCurr_Max_v)) then
+                                               Delta_i <= std_logic_vector(unsigned(EBRCurr_Max_v) - unsigned(EBRCurr_Min_v));
+                                       else
+                                               Delta_i <= "0110110100";
+                                       end if;
+                                       min_curr <= EBRCurr_Min_v;
+                                       max_curr <= EBRCurr_Max_v;
+                                       write_curr <= '0';
+                                       EBRbuf(locBufDepth-1) <= "10" & FPGA & chnl & EBRCurr_Max_v & EBRCurr_Min_v;
+                               else 
+                                       min_out                 <= EBRNext_Min_v;
+                                       max_out                 <= EBRNext_Max_v;
+                                       min_curr_i      <= EBRNext_Min_v;
+                                       max_curr_i      <= EBRNext_Max_v;
+                                       min_curr                <= EBRNext_Min_v;
+                                       max_curr                <= EBRNext_Max_v;
+                                       if (unsigned(EBRNext_Min_v) < unsigned(EBRNext_Max_v)) then
+                                               Delta_i <= std_logic_vector(unsigned(EBRNext_Max_v) - unsigned(EBRNext_Min_v));
+                                       else
+                                               Delta_i <= "0110110100";
+                                       end if;  
+                                       write_curr <= '1';
+                                       EBRbuf(locBufDepth-1) <= "10" & FPGA & chnl & EBRNext_Max_v & EBRNext_Min_v;
+                               end if;
+                       else -- no calibr
+                               write_curr      <= '0';
+                               write_next      <= '0';
+                               min_out                 <= "0000000000";
+                               max_out                 <= "0000000000";
+                               min_curr                <= "0000000000";
+                               max_curr                <= "0000000000";
+                               EBRbufNext(locBufDepth-1) <= x"00000000";
+                               EBRbufCurr(locBufDepth-1) <= x"00000000";
+                       end if;
+               elsif dflt_i(to_integer(unsigned(FPGA)),to_integer(unsigned(chnl))) = '1' then
+     --FLASH
+                       write_curr <= '1';
+                       min_out    <= def_value(0,to_integer(unsigned(chnl)))( 9 downto  0);
+                       max_out    <= def_value(0,to_integer(unsigned(chnl)))(19 downto 10);
+                       min_curr   <= def_value(0,to_integer(unsigned(chnl)))( 9 downto  0);
+                       max_curr   <= def_value(0,to_integer(unsigned(chnl)))(19 downto 10);
+                       min_curr_i <= def_value(0,to_integer(unsigned(chnl)))( 9 downto  0);
+                       max_curr_i <= def_value(0,to_integer(unsigned(chnl)))(19 downto 10);
+                       Delta_i    <= std_logic_vector(unsigned(def_value(0,to_integer(unsigned(chnl)))(19 downto 10)) - unsigned(def_value(0,to_integer(unsigned(chnl)))(9 downto 0)));
+               else
+                       write_curr <= '0';
+                       min_out    <= "0000000100";
+                       max_out    <= "1000000000";
+                       min_curr   <= "0000000100";
+                       max_curr   <= "1000000000";
+                       min_curr_i <= "0000000100";
+                       max_curr_i <= "1000000000";
+                       Delta_i    <= "0111111011";--"0111111110";
+               end if;--default value
+
+               min_curr_ii  <= min_curr_i;
+               max_curr_ii  <= max_curr_i;
+
+       end if;--rising_edge
+       end process;
\ No newline at end of file
diff --git a/combiner_cts/code_EBR/Cal_Limits.vhd b/combiner_cts/code_EBR/Cal_Limits.vhd
new file mode 100644 (file)
index 0000000..c3f7182
--- /dev/null
@@ -0,0 +1,415 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+library work;
+use work.trb_net_std.all;
+
+entity Cal_Limits is
+    generic (
+       cal_Limit_gen   : unsigned(19 downto 0) := "00000000000100000000"
+    );    
+    port (
+        CLK                    : in  std_logic;
+        cal_Limit_reg  : in  unsigned(19 downto 0);
+        DIN_in         : in  std_logic_vector(31 downto 0);
+        DIN_in_b_r     : in  std_logic;
+        DIN_in_data_w  : in  std_logic;
+        DIN_in_data_f  : in  std_logic;
+        min_curr_in            : in  std_logic_vector( 9 downto 0);
+        max_curr_in            : in  std_logic_vector( 9 downto 0);
+        min_next_in            : in  std_logic_vector( 9 downto 0);
+        max_next_in            : in  std_logic_vector( 9 downto 0);
+        FPGA                   : in  std_logic_vector( 3 downto 0);
+        FPGA_next      : in  std_logic_vector( 3 downto 0);
+        chnl                   : in  std_logic_vector( 6 downto 0);
+        chnl_next              : in  std_logic_vector( 6 downto 0);
+        Do_Cal_in              : in  std_logic;
+        default_val_in         : in  std_logic := '1';
+        chnl_cnt_in    : in  unsigned(19 downto 0);
+        new_data       : in  std_logic;
+        write_curr             : out std_logic;
+        write_next             : out std_logic;
+        min_next               : out std_logic_vector( 9 downto 0);
+        max_next               : out std_logic_vector( 9 downto 0);
+        min_curr               : out std_logic_vector( 9 downto 0);
+        max_curr               : out std_logic_vector( 9 downto 0);
+        min_out                : out std_logic_vector( 9 downto 0);
+        max_out                : out std_logic_vector( 9 downto 0);
+        Delta                  : out std_logic_vector( 9 downto 0);
+        FPGA_out               : out std_logic_vector( 3 downto 0);
+        chnl_out               : out std_logic_vector( 6 downto 0);
+        FPGA_out_curr          : out std_logic_vector( 3 downto 0);
+        chnl_out_curr  : out std_logic_vector( 6 downto 0);
+        DIN_out                : out std_logic_vector(31 downto 0);
+        DIN_out_b_r    : out std_logic;
+        DIN_out_data_w : out std_logic;
+        DIN_out_data_f : out std_logic;
+        Do_Cal_out             : out std_logic;
+        chnl_cnt_out   : out unsigned (19 downto 0);--:="00000000000000000000";
+        write_chnl_cnt  : out std_logic;
+        chnl_out_write  : out std_logic_vector( 6 downto 0);
+        FPGA_out_write  : out std_logic_vector( 3 downto 0);
+        cal_Limit_set   : out unsigned (19 downto 0);
+        BUS_Flash_value : in  std_logic_vector(26 downto 0);
+        Flash_flag     : in  std_logic
+    );
+end Cal_Limits;
+
+architecture Behavioral of Cal_Limits is
+
+  signal FPGA_i     : std_logic_vector(3 downto 0);
+  signal Delta_i    : std_logic_vector(9 downto 0) := "0110110100";
+  
+  signal min_curr_i : std_logic_vector( 9 downto 0);--:= "0000000001";
+  signal max_curr_i : std_logic_vector( 9 downto 0);--:= "1000000001";
+  signal min_next_i : std_logic_vector( 9 downto 0);--:= "0000000001";
+  signal max_next_i : std_logic_vector( 9 downto 0);--:= "1000000001";
+
+  signal min_curr_ii : std_logic_vector( 9 downto 0);--:= "0000000001";
+  signal max_curr_ii : std_logic_vector( 9 downto 0);--:= "1000000001";
+  signal min_next_ii : std_logic_vector( 9 downto 0);--:= "0000000001";
+  signal max_next_ii : std_logic_vector( 9 downto 0);--:= "1000000001";
+
+  signal min_curr_iii : std_logic_vector( 9 downto 0);--:= "0000000001";
+  signal max_curr_iii : std_logic_vector( 9 downto 0);--:= "1000000001";
+  signal min_next_iii : std_logic_vector( 9 downto 0);--:= "0000000001";
+  signal max_next_iii : std_logic_vector( 9 downto 0);--:= "1000000001";
+  
+  signal cnt_i     : unsigned(19 downto 0):="00000000000000000000";
+  signal cnt_ii            : unsigned(19 downto 0):="00000000000000000000";
+  signal cnt_iii    : unsigned(19 downto 0):="00000000000000000000";
+
+  signal chnl_i     : std_logic_vector( 6 downto 0);
+  signal FPGA_ii    : std_logic_vector( 3 downto 0);
+  signal chnl_ii    : std_logic_vector( 6 downto 0);
+  signal use_old    : std_logic:='0';
+  
+  signal write_curr_i : std_logic;
+  
+  signal cal_Limit    : unsigned(19 downto 0):="00011000011010100000";--:="00011000011010100000";
+  
+  type array2D is array (1 downto 0, 0 to 64) of std_logic_vector(19 downto 0); --(FPGA)(channel)
+  signal def_value : array2D := (others => ("10000000010000000010","10000000100000000010","10000000110000000010","10000001000000000010",
+                                           "10000001010000000010","10000001100000000010","10000001110000000010","10000010000000000010",
+                                           "10000010010000000010","10000010100000000010","10000010110000000010","10000011000000000010",
+                                           "10000011010000000010","10000011100000000010", others => "11111000010000001111" ));
+  
+  --signal write_curr_ii : std_logic;
+  
+begin
+
+   Limit : process (CLK)
+   begin
+    if rising_edge(CLK) then 
+    
+      if (cal_Limit_reg <= cal_Limit_gen) then
+         cal_Limit     <= cal_Limit_gen;
+         cal_Limit_set <= cal_Limit_gen;
+      else
+         cal_Limit     <= cal_Limit_reg;
+         cal_Limit_set <= cal_Limit_reg;
+      end if;
+    
+    end if;
+   end process;
+
+   Count : process (CLK)
+   begin
+     if rising_edge(CLK) then
+        if Do_Cal_in = '1' then
+           if new_data = '0' then
+             if cnt_i < cal_Limit then
+               cnt_i        <= cnt_i + 1;
+               chnl_cnt_out <= cnt_i + 1;
+            else
+               cnt_i <= to_unsigned(0,20);
+               chnl_cnt_out <= to_unsigned(0,20);
+            end if;
+            write_chnl_cnt <= '0';
+            use_old <= '0'; 
+           else -- new data
+             chnl_cnt_out   <= cnt_i;
+             write_chnl_cnt <= '1';
+             
+             if FPGA_next = FPGA_i and chnl_next = chnl_i then
+               use_old <= '1';
+             else
+               use_old <= '0';
+             end if;
+             
+             if use_old = '0' then
+               if chnl_cnt_in < cal_Limit then
+               cnt_i <= chnl_cnt_in + 1;
+               else
+                cnt_i <= to_unsigned(0,20);
+               end if;
+             else
+               if cnt_ii < cal_Limit then
+               cnt_i <= cnt_ii + 1;
+               else
+                cnt_i <= to_unsigned(0,20);
+               end if;
+             end if;
+           end if; --new data
+           
+           FPGA_out         <= FPGA;
+
+           FPGA_i           <= FPGA;
+           FPGA_ii         <= FPGA_i;
+
+          chnl_out         <= chnl;
+           chnl_i          <= chnl;
+           chnl_ii         <= chnl_i;
+
+           cnt_ii          <= cnt_i;
+          cnt_iii          <= cnt_ii;
+          
+          FPGA_out_write <= FPGA_i;
+          chnl_out_write <= chnl_i;
+          
+          FPGA_out_curr <= FPGA;
+          chnl_out_curr <= chnl;
+        else
+          write_chnl_cnt <= '0';
+        end if;
+     end if;
+   end process;
+   
+   
+   Mem_next : process(CLK)--DIN_in
+   begin
+    if rising_edge(CLK) then
+     if Do_Cal_in = '1' then
+       if new_data = '0' then -- old Data/ FPGA/CHNL
+         if cnt_i /= to_unsigned(0,20) then --next memory
+          if unsigned(DIN_in(21 downto 12)) > unsigned(max_next_i) then
+             max_next_i <= DIN_in(21 downto 12);   
+          end if; 
+          if unsigned(DIN_in(21 downto 12)) < unsigned(min_next_i) then
+             min_next_i <= DIN_in(21 downto 12);   
+          end if; 
+        else
+          min_next_i   <= DIN_in(21 downto 12);--"1111111111";
+          max_next_i   <= DIN_in(21 downto 12);--"0000000000";
+        end if;
+        write_next <= '0';
+        min_next <= min_next_i;
+        max_next <= max_next_i;
+       else -- new data/FPGA/CHNL
+        write_next <= '1';
+        min_next <= min_next_i;
+        max_next <= max_next_i;
+        if use_old = '1' then
+           if cnt_ii /= to_unsigned(0,20) then
+               if unsigned(DIN_in(21 downto 12)) >= unsigned(max_next_ii) then
+                  max_next_i <= DIN_in(21 downto 12);
+                  if unsigned(DIN_in(21 downto 12)) < unsigned(min_next_ii) then
+                     min_next_i <= DIN_in(21 downto 12);
+                  else
+                     min_next_i <= min_next_ii;
+                  end if; 
+               else
+                  max_next_i <= max_next_ii;
+                  if unsigned(DIN_in(21 downto 12)) < unsigned(min_next_in) then
+                     min_next_i <= DIN_in(21 downto 12);
+                  else
+                     min_next_i <= min_next_ii;
+                  end if; 
+               end if;
+           else
+               min_next_i   <= DIN_in(21 downto 12);--"1111111111";
+               max_next_i   <= DIN_in(21 downto 12);--"0000000000";
+           end if;
+        else -- fpga/=fpga_ii and chnl_iii /= chnl
+           if chnl_cnt_in /= to_unsigned(0,20) then --next memory
+              if unsigned(DIN_in(21 downto 12)) >= unsigned(max_next_in) then
+                max_next_i <= DIN_in(21 downto 12);
+                if unsigned(DIN_in(21 downto 12)) < unsigned(min_next_in) then
+                  min_next_i <= DIN_in(21 downto 12);
+                else
+                  min_next_i <= min_next_in;
+                end if; 
+              else
+                max_next_i <= max_next_in;
+                if unsigned(DIN_in(21 downto 12)) < unsigned(min_next_in) then
+                  min_next_i <= DIN_in(21 downto 12);
+                else
+                  min_next_i <= min_next_in;
+                end if; 
+              end if;
+           else
+              min_next_i   <= DIN_in(21 downto 12);--"1111111111";
+              max_next_i   <= DIN_in(21 downto 12);--"0000000000";
+           end if; --/= 0
+       end if;
+       end if;--new data
+
+       min_next_ii  <= min_next_i;
+       max_next_ii  <= max_next_i;
+       min_next_iii <= min_next_ii;
+       max_next_iii <= max_next_ii;
+
+     else
+       write_next <= '0';
+     end if;  
+   end if;--rising_edge
+  end process;
+  
+  
+  Mem_curr : process(CLK)--DIN_in)
+  begin
+   if rising_edge(CLK) then
+     if default_val_in = '0' then
+       if Do_Cal_in = '1' then
+         if new_data = '0' then
+          if cnt_i /= to_unsigned(0,20) then
+             min_out <= min_curr_i;
+             max_out <= max_curr_i;
+             if (unsigned(min_curr_i) < unsigned(max_curr_i)) then
+               Delta_i <= std_logic_vector(unsigned(max_curr_i) - unsigned(min_curr_i));
+             else
+               Delta_i <= "0110110100";
+             end if;
+             min_curr <= min_curr_i;
+             max_curr <= max_curr_i;
+             write_curr <= '0';
+          else
+             min_out    <= min_next_i;
+             max_out    <= max_next_i;
+             min_curr_i <= min_next_i;
+             max_curr_i <= max_next_i;
+             min_curr <= min_next_i;
+             max_curr <= max_next_i;
+             if (unsigned(min_next_i) < unsigned(max_next_i)) then
+               Delta_i <= std_logic_vector(unsigned(max_next_i) - unsigned(min_next_i));
+             else
+               Delta_i <= "0110110100";
+             end if;  
+             write_curr <= '1';
+          end if;
+          
+          --min_curr <= min_curr_i;
+          --max_curr <= max_curr_i;
+        else  -- new data
+          if use_old = '1' then 
+               --min_curr   <= min_curr_i;
+               --max_curr   <= max_curr_i;
+             if cnt_ii = to_unsigned(0,20) then
+               write_curr <= '1';
+               min_curr_i <= min_next_ii;
+               max_curr_i <= max_next_ii;
+               min_out    <= min_next_ii;
+               max_out    <= max_next_ii;
+               min_curr   <= min_next_ii;
+               max_curr   <= max_next_ii;
+               if (unsigned(min_next_ii) < unsigned(max_next_ii)) then
+                 Delta_i <= std_logic_vector(unsigned(max_next_ii) - unsigned(min_next_ii));
+               else
+                 Delta_i <= "0110110100";
+               end if;
+            else
+               min_curr_i <= min_curr_ii;
+               max_curr_i <= max_curr_ii;
+               min_out    <= min_curr_ii;
+               max_out    <= max_curr_ii;
+               min_curr   <= min_curr_ii;
+               max_curr   <= max_curr_ii;
+               if (unsigned(min_curr_ii) < unsigned(max_curr_ii)) then
+                 Delta_i <= std_logic_vector(unsigned(max_curr_ii) - unsigned(min_curr_ii));
+               else
+                 Delta_i <= "0110110100";
+               end if;
+               write_curr <= '0';
+            end if;
+          else --use_old ='0'
+               --min_curr   <= min_curr_i;
+               --max_curr   <= max_curr_i;
+             if chnl_cnt_in = to_unsigned(0,20) then
+               write_curr <= '1';
+               min_curr_i <= min_next_in;
+               max_curr_i <= max_next_in;
+               min_out    <= min_next_in;
+               max_out    <= max_next_in;
+               min_curr   <= min_next_in;
+               max_curr   <= max_next_in;
+               if (unsigned(min_next_in) < unsigned(max_next_in)) then
+                 Delta_i <= std_logic_vector(unsigned(max_next_in) - unsigned(min_next_in));
+               else
+                 Delta_i <= "0110110100";
+               end if;
+            else
+               min_curr_i <= min_curr_in;
+               max_curr_i <= max_curr_in;
+               min_out    <= min_curr_in;
+               max_out    <= max_curr_in;
+               min_curr   <= min_curr_in;
+               max_curr   <= max_curr_in;
+               if (unsigned(min_curr_in) < unsigned(max_curr_in)) then
+                 Delta_i <= std_logic_vector(unsigned(max_curr_in) - unsigned(min_curr_in));
+               else
+                 Delta_i <= "0110110100";
+               end if;
+               write_curr <= '0';
+            end if;
+          end if;  
+         end if;
+       else -- no calibr
+         write_curr <= '0';
+       end if;
+     elsif default_val_in = '1' then
+     --FLASH
+        write_curr <= '1';
+        min_out    <= def_value(0,to_integer(unsigned(chnl)))( 9 downto  0);
+        max_out    <= def_value(0,to_integer(unsigned(chnl)))(19 downto 10);
+        min_curr   <= def_value(0,to_integer(unsigned(chnl)))( 9 downto  0);
+        max_curr   <= def_value(0,to_integer(unsigned(chnl)))(19 downto 10);
+        min_curr_i <= def_value(0,to_integer(unsigned(chnl)))( 9 downto  0);
+        max_curr_i <= def_value(0,to_integer(unsigned(chnl)))(19 downto 10);
+        Delta_i    <= std_logic_vector(unsigned(def_value(0,to_integer(unsigned(chnl)))(19 downto 10)) - unsigned(def_value(0,to_integer(unsigned(chnl)))(9 downto 0)));
+     else
+         write_curr <= '0';
+         min_out    <= "0000000100";
+         max_out    <= "1000000000";
+         min_curr   <= "0000000100";
+         max_curr   <= "1000000000";
+         min_curr_i <= "0000000100";
+         max_curr_i <= "1000000000";
+         Delta_i    <= "0111111011";--"0111111110";
+     end if;--default value
+
+       min_curr_ii  <= min_curr_i;
+       max_curr_ii  <= max_curr_i;
+       min_curr_iii <= min_curr_ii;
+       max_curr_iii <= max_curr_ii;
+       --write_curr_ii   <= write_curr_i;
+       --write_curr  <= write_curr_i;
+       
+       --max_curr <= "1000000001";
+  end if;--rising_edge
+ end process;
+   proc_Flash_input : process (CLK)
+   begin
+     if rising_edge(CLK) then
+       if Flash_flag = '1' then
+         def_value(0,to_integer(unsigned(BUS_Flash_value(26 downto 20))))( 19 downto  0) <= BUS_Flash_value(19 downto 0);
+         
+       end if;
+     end if;
+   end process;
+   --synchronous output
+   proc_slope : process (CLK)
+   begin
+     if rising_edge(CLK) then
+        DIN_out        <= DIN_in;
+        DIN_out_b_r    <= DIN_in_b_r;
+        DIN_out_data_w <= DIN_in_data_w;
+        DIN_out_data_f         <= DIN_in_data_f;
+        Do_Cal_out     <= Do_Cal_in;
+     end if;
+   end process;
+
+   Delta <= Delta_i;
+end Behavioral;
\ No newline at end of file
diff --git a/combiner_cts/code_EBR/Cal_Limits_v2.vhd b/combiner_cts/code_EBR/Cal_Limits_v2.vhd
new file mode 100644 (file)
index 0000000..89f44d1
--- /dev/null
@@ -0,0 +1,404 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+library work;
+use work.trb_net_std.all;
+
+entity Cal_Limits_v2 is
+  generic (
+    cal_Limit_gen  : unsigned(19 downto 0) := "00000000000100000000";--"00000000000100000000";
+    locBufDepth    : integer := 7;
+    USE_STAT_BITS     : integer range 0 to 1 := c_NO;
+    USE_DATA_WRITE    : integer range 0 to 1 := c_NO;
+    USE_DATA_FINISHED : integer range 0 to 1 := c_NO; 
+    USE_BUSY_RELEASE  : integer range 0 to 1 := c_NO
+  );    
+  port (
+    CLK                : in  std_logic;
+    RESET              : in  std_logic;
+    stop_Limits        : in  std_logic;
+    cal_Limit_reg      : in  unsigned(19 downto 0);
+    DIN                : in  std_logic_vector(31 downto 0);
+    DIN_ready          : in  std_logic;
+    DIN_type           : in  std_logic_vector( 3 downto 0);
+    min_curr_in        : in  std_logic_vector( 9 downto 0);
+    max_curr_in        : in  std_logic_vector( 9 downto 0);
+    min_next_in        : in  std_logic_vector( 9 downto 0);
+    max_next_in        : in  std_logic_vector( 9 downto 0);
+    FPGA               : in  std_logic_vector( 3 downto 0);
+    chnl               : in  std_logic_vector( 6 downto 0);
+    Do_Cal_in          : in  std_logic;
+    chnl_cnt_in        : in  unsigned(19 downto 0);
+    BUS_Flash_value    : in  std_logic_vector(31 downto 0);
+    Flash_flag         : in  std_logic;
+    DIN_info           : in  std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+    write_curr_out     : out std_logic;
+    write_next         : out std_logic;
+    min_next           : out std_logic_vector( 9 downto 0);
+    max_next           : out std_logic_vector( 9 downto 0);
+    min_curr_out       : out std_logic_vector( 9 downto 0);
+    max_curr_out       : out std_logic_vector( 9 downto 0);
+    min_out_out        : out std_logic_vector( 9 downto 0);
+    max_out_out        : out std_logic_vector( 9 downto 0);
+    Delta              : out std_logic_vector( 9 downto 0);
+    FPGA_out           : out std_logic_vector( 3 downto 0);
+    chnl_out           : out std_logic_vector( 6 downto 0);
+    FPGA_out_curr      : out std_logic_vector( 3 downto 0);
+    chnl_out_curr      : out std_logic_vector( 6 downto 0);
+    FPGA_out_write     : out std_logic_vector( 3 downto 0);
+    chnl_out_write     : out std_logic_vector( 6 downto 0);
+    FPGA_out_write_cnt : out std_logic_vector( 3 downto 0);
+    chnl_out_write_cnt : out std_logic_vector( 6 downto 0);
+    DOUT               : out std_logic_vector(31 downto 0);
+    DOUT_ready         : out std_logic;
+    DOUT_type          : out std_logic_vector( 3 downto 0);
+    Do_Cal_out         : out std_logic;
+    chnl_cnt_out       : out unsigned (19 downto 0); --:="00000000000000000000";
+    write_chnl_cnt     : out std_logic;
+    cal_Limit_set      : out unsigned (19 downto 0);
+    Debug_Data_min     : out std_logic_vector(31 downto 0);
+    Debug_Data_max     : out std_logic_vector(31 downto 0);
+    DOUT_info          : out std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+    dflt_out           : out std_logic_vector(3 downto 0);
+    cnt_i_debug        : out unsigned (19 downto 0)
+  );
+end Cal_Limits_v2;
+
+architecture Behavioral of Cal_Limits_v2 is
+
+  signal Delta_i     : std_logic_vector( 9 downto 0) := "0110110100"; 
+  signal cnt_i       : unsigned(19 downto 0):="00000000000000000000";
+  signal cal_Limit   : unsigned(19 downto 0):="00011000011010100000";--"00011000011010100000";
+
+  type array2D is array (0 to 15, 0 to 64) of std_logic_vector(19 downto 0); --(FPGA)(channel)
+  signal def_value   : array2D := (others => (others => "10000000000000010011"));
+  
+  type bit_2D is array (16 downto 0, 63 downto 0) of std_logic; --(channel)
+  signal dflt_i      : bit_2D := (others => (others => '1'));
+  type tLocalBuffer is array ( (locBufDepth-1) downto 0) of std_logic_vector(31 downto 0); --(Flag [31])(reserved [30] )(FPGA [29:26])(channel [25:20])(Max [19:10])(Min [9:0])
+  signal EBRcntr     : tLocalBuffer := (others =>(others => '0'));
+  signal EBRbufCurr  : tLocalBuffer := (others =>(others => '0'));
+  signal EBRbufNext  : tLocalBuffer := (others =>(x"3FF00"&b"00" & b"11" & x"FF"));
+  
+  signal DIN_r         : std_logic_vector(31 downto 0);
+  signal DIN_ready_r   : std_logic;
+  signal DIN_type_r    : std_logic_vector( 3 downto 0);
+  signal min_curr_in_r : std_logic_vector( 9 downto 0);
+  signal max_curr_in_r : std_logic_vector( 9 downto 0);
+  signal min_next_in_r : std_logic_vector( 9 downto 0):= "1111111111";
+  signal max_next_in_r : std_logic_vector( 9 downto 0):= "0000000000";
+  signal FPGA_r        : std_logic_vector( 3 downto 0):= "0000";
+  signal chnl_r        : std_logic_vector( 6 downto 0);
+  signal Do_Cal_in_r   : std_logic;
+  signal stop_Limits_r : std_logic;
+  signal DIN_info_r    : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+  
+  signal max_default,min_default : std_logic_vector( 9 downto 0);
+  signal write_default : std_logic;
+  signal min_out       : std_logic_vector( 9 downto 0);
+  signal max_out       : std_logic_vector( 9 downto 0);
+  signal min_curr      : std_logic_vector( 9 downto 0);
+  signal max_curr      : std_logic_vector( 9 downto 0);
+  signal write_curr    : std_logic;
+  signal first_reset    : std_logic := '1';
+  
+begin
+
+  Limit : process (CLK)
+  begin
+  if rising_edge(CLK) then 
+    if (cal_Limit_reg <= cal_Limit_gen) then
+      cal_Limit     <= cal_Limit_gen;
+      cal_Limit_set <= cal_Limit_gen;
+    else
+      cal_Limit     <= cal_Limit_reg;
+      cal_Limit_set <= cal_Limit_reg;
+    end if;
+  end if;
+  end process;
+
+  Count : process (CLK)
+  variable cnt_v : unsigned (19 downto 0);
+  begin
+  if rising_edge(CLK) then
+    if (RESET = '1') then
+       --Reset behaviour
+       if first_reset = '1' then
+         dflt_i      <= (others => (others => '1'));
+         first_reset <= '0';
+       end if; 
+
+    else
+      cnt_v := chnl_cnt_in;
+
+           
+      if (Flash_flag = '1') and (BUS_Flash_value(19 downto 0) /= x"00000") then
+          dflt_i(to_integer(unsigned(BUS_Flash_value( 30 downto  27))),to_integer(unsigned(BUS_Flash_value( 26 downto  20)))) <= '0'; 
+      end if;
+      
+      for i in 0 to (locBufDepth-1) loop
+        if (EBRcntr(i)(31) = '1') and (EBRcntr(i)(29 downto 26) = FPGA) and (EBRcntr(i)(25 downto 20) = chnl(5 downto 0)) then
+          cnt_v := unsigned(EBRcntr(i)(19 downto  0));
+        end if;
+      end loop;
+
+      for i in 0 to (locBufDepth-2) loop
+        EBRcntr(i) <= EBRcntr(i+1);
+      end loop;
+    
+      if ((Do_Cal_in = '1') and (stop_Limits = '0')) then
+        if cnt_v < cal_Limit then
+          cnt_v := cnt_v + 1;
+        else
+          cnt_v := to_unsigned(0,20);
+          dflt_i(to_integer(unsigned(FPGA)),to_integer(unsigned(chnl))) <= '0';
+        end if;
+        write_chnl_cnt  <= '1';
+        chnl_cnt_out    <= cnt_v;
+        cnt_i           <= cnt_v;
+        EBRcntr(locBufDepth-1) <= "10" & FPGA & chnl(5 downto 0) & std_logic_vector(cnt_v);
+      else
+        write_chnl_cnt  <= '0';
+        chnl_cnt_out <= x"00000";
+        EBRcntr(locBufDepth-1) <= x"00000000";
+      end if;
+
+    end if;--reset|no calibration
+          
+    --sync following processes with cnt_i
+    fpga_r            <= FPGA;
+    chnl_r            <= chnl;
+    DIN_r             <= DIN;
+    DIN_ready_r       <= DIN_ready;
+    DIN_type_r        <= DIN_type;
+    min_curr_in_r     <= min_curr_in;
+    max_curr_in_r     <= max_curr_in;
+    min_next_in_r     <= min_next_in;
+    max_next_in_r     <= max_next_in;
+    Do_Cal_in_r       <= Do_Cal_in;
+    stop_Limits_r     <= stop_Limits;
+    DIN_info_r        <= DIN_info;
+    cnt_i_debug       <= cnt_i; 
+  end if;
+  end process;
+   
+   
+  THE_Mem : process(CLK)
+    variable EBRCurr_Min_v  : std_logic_vector(9 downto 0):= "1111111111";
+    variable EBRCurr_Max_v  : std_logic_vector(9 downto 0):= "0000000000";
+    variable EBRNext_Min_v  : std_logic_vector(9 downto 0):= "1111111111";
+    variable EBRNext_Max_v  : std_logic_vector(9 downto 0):= "0000000000";
+  begin
+  if rising_edge(CLK) then
+    if (RESET = '1') then
+       --Reset behaviour      
+    else
+      --------- Current Values -----------------------------
+      EBRCurr_Min_v := min_curr_in_r;
+      EBRCurr_Max_v := max_curr_in_r;
+
+      for i in 0 to (locBufDepth-1) loop
+        if (EBRbufCurr(i)(31) = '1') and (EBRbufCurr(i)(29 downto 26) = FPGA_r) and (EBRbufCurr(i)(25 downto 20) = chnl_r(5 downto 0)) then
+          EBRCurr_Min_v := EBRbufCurr(i)( 9 downto  0);
+          EBRCurr_Max_v := EBRbufCurr(i)(19 downto 10);
+        end if;
+      end loop;
+
+      for i in 0 to (locBufDepth-2) loop
+        EBRbufCurr(i) <= EBRbufCurr(i+1);
+      end loop;
+      
+      --------- Next Values -----------------------------
+      EBRNext_Min_v := min_next_in_r;
+      EBRNext_Max_v := max_next_in_r;
+      
+      for i in 0 to (locBufDepth-1) loop
+        if (EBRbufNext(i)(31) = '1') and (EBRbufNext(i)(29 downto 26) = FPGA_r) and (EBRbufNext(i)(25 downto 20) = chnl_r(5 downto 0)) then
+          EBRNext_Min_v := EBRbufNext(i)( 9 downto  0);
+          EBRNext_Max_v := EBRbufNext(i)(19 downto 10);
+        end if;
+      end loop;
+
+      for i in 0 to (locBufDepth-2) loop
+        EBRbufNext(i) <= EBRbufNext(i+1);
+      end loop;
+
+
+      --------------------------------------------------------------
+      --------------------------  CURRENT  -------------------------
+      --------------------------------------------------------------
+      if dflt_i(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r))) = '0' then
+        if Do_Cal_in_r = '1' then
+          if cnt_i /= to_unsigned(0,20) then
+            min_out <= EBRCurr_Min_v;
+            max_out <= EBRCurr_Max_v;
+            if (unsigned(EBRCurr_Min_v) < unsigned(EBRCurr_Max_v)) then
+              Delta_i <= std_logic_vector(unsigned(EBRCurr_Max_v) - unsigned(EBRCurr_Min_v));
+            else
+              Delta_i <= "0110110100";
+            end if;
+            min_curr <= EBRCurr_Min_v;
+            max_curr <= EBRCurr_Max_v;
+            write_curr <= '0';
+            EBRbufCurr(locBufDepth-1) <= "10" & FPGA_r & chnl_r(5 downto 0) & EBRCurr_Max_v & EBRCurr_Min_v;
+          else 
+            min_out     <= EBRNext_Min_v;
+            max_out     <= EBRNext_Max_v;
+            min_curr    <= EBRNext_Min_v;
+            max_curr    <= EBRNext_Max_v;
+            if (unsigned(EBRNext_Min_v) < unsigned(EBRNext_Max_v)) then
+              Delta_i <= std_logic_vector(unsigned(EBRNext_Max_v) - unsigned(EBRNext_Min_v));
+            else
+              Delta_i <= "0110110100";
+            end if;  
+            write_curr <= '1';
+            EBRbufCurr(locBufDepth-1) <= "10" & FPGA_r & chnl_r(5 downto 0) & EBRNext_Max_v & EBRNext_Min_v;
+          end if;
+        else -- no calibr
+          write_curr  <= '0';
+          write_next  <= '0';
+          EBRbufNext(locBufDepth-1) <= x"00000000";
+          EBRbufCurr(locBufDepth-1) <= x"00000000";
+        end if;
+      elsif dflt_i(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r))) = '1' then
+      --FLASH
+        if Do_Cal_in_r = '1' then
+          write_curr <= '1';
+          min_out    <= def_value(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r)))( 9 downto  0);
+          max_out    <= def_value(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r)))(19 downto 10);
+          min_curr   <= def_value(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r)))( 9 downto  0);
+          max_curr   <= def_value(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r)))(19 downto 10);
+          Delta_i    <= std_logic_vector(unsigned(def_value(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r)))(19 downto 10)) - unsigned(def_value(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r)))(9 downto 0)));
+          EBRbufCurr(locBufDepth-1) <= "10" & FPGA_r & chnl_r(5 downto 0) & def_value(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r)))(19 downto 10) & def_value(to_integer(unsigned(FPGA_r)),to_integer(unsigned(chnl_r)))( 9 downto 0);
+        else
+          write_curr <= '0';
+          --min_out    <= b"0000000000";
+          --max_out    <= b"0000000000";
+          --min_curr   <= b"0000000000";  --commented at 2019-04-09; may work still, bur without 0 at beginning in Monitoring
+          --max_curr   <= b"0000000000";  --commented at 2019-04-09; may work still, bur without 0 at beginning in Monitoring
+          Delta_i    <= b"0000000000";
+          EBRbufCurr(locBufDepth-1) <= x"00000000";
+        end if;
+      else
+        write_curr <= '0';
+        min_out    <= "0000000100";
+        max_out    <= "1000000000";
+        min_curr   <= "0000000100";
+        max_curr   <= "1000000000";
+        Delta_i    <= "0111111011";--"0111111110";
+        if Do_Cal_in_r = '1' then
+          write_curr <= '1';
+          EBRbufCurr(locBufDepth-1) <= "10" & FPGA_r & chnl_r(5 downto 0) & "1000000000" & "0000000100";
+        else
+          EBRbufCurr(locBufDepth-1) <= x"00000000";
+        end if;
+      end if;--default value
+
+
+      --------------------------------------------------------------
+      -----------------------------  NEXT  -------------------------
+      --------------------------------------------------------------
+      if ((Do_Cal_in_r = '1') and (stop_Limits_r = '0')) then
+        write_next  <= '1';
+        if cnt_i /= to_unsigned(0,20) then --next memory
+          if unsigned(DIN_r(21 downto 12)) >= unsigned(EBRNext_Max_v) then
+            EBRNext_Max_v := DIN_r(21 downto 12);
+            Debug_Data_max <= DIN_r;
+            if unsigned(DIN_r(21 downto 12)) < unsigned(EBRNext_Min_v) then
+              EBRNext_Min_v := DIN_r(21 downto 12);
+              Debug_Data_min <= DIN_r;
+            end if; 
+          else
+            if unsigned(DIN_r(21 downto 12)) < unsigned(EBRNext_Min_v) then
+              EBRNext_Min_v := DIN_r(21 downto 12);
+              Debug_Data_min <= DIN_r;
+            end if; 
+          end if;
+        else
+          EBRNext_Min_v  := DIN_r(21 downto 12);--"1111111111";
+          EBRNext_Max_v  := DIN_r(21 downto 12);--"0000000000";
+        end if; --/= 0
+        EBRbufNext(locBufDepth-1)<= "10" & FPGA_r & chnl_r(5 downto 0) & EBRNext_Max_v & EBRNext_Min_v;
+        min_next    <= EBRNext_Min_v;
+        max_next    <= EBRNext_Max_v;
+      else -- no calib
+        write_next  <= '0';
+        min_next    <= "1010101010";
+        max_next    <= "0101010101";
+        EBRbufNext(locBufDepth-1) <= (x"3FF00"&b"00" & b"11" & x"FF");
+      end if;
+    end if; -- reset| Calibration
+  end if;--rising_edge
+  end process;
+--   proc_Flash_input : process (CLK)
+--   begin
+--   if rising_edge(CLK) then
+--     write_default <= '0';
+--     if RESET = '1' then
+--       --RESET
+--     else 
+--     --IDEA:
+--       -- Send Flash value of FOGA|channel to thsi location. If Flash_flag = 1 the value is written to RAM.
+--       -- write_out is OR of this write and write from current. By default wrrite from here is 0.
+-- 
+--     end if;  
+--   end if;
+--   end process;
+ write_curr_out <= write_curr or write_default;
+ min_curr_out   <= min_default when write_default = '1' else
+                   min_curr;
+ min_out_out    <= min_default when write_default = '1' else
+                   min_out;
+ max_curr_out   <= max_default when write_default = '1' else
+                   max_curr;
+ max_out_out    <= max_default when write_default = '1' else
+                   max_out;
+
+--  write_curr_out <= write_curr;
+--   min_curr_out   <= min_curr;
+--   min_out_out    <= min_out;
+--   max_curr_out   <= max_curr;
+--   max_out_out    <= max_out;
+  dflt_out       <= dflt_i(0,3)&dflt_i(0,2)&dflt_i(0,1)&dflt_i(0,0);
+  --synchronous output
+  proc_slope : process (CLK)
+  begin
+  if rising_edge(CLK) then
+    DOUT           <= DIN_r;
+    DOUT_ready     <= DIN_ready_r;
+    DOUT_type      <= DIN_type_r;
+    DOUT_info      <= DIN_info_r;
+    Do_Cal_out     <= Do_Cal_in_r;
+    chnl_out_write <= chnl_r;
+    FPGA_out_write <= fpga_r;
+    FPGA_out       <= fpga_r;
+    if Flash_flag = '1' then     
+      if BUS_Flash_value(19 downto 0) = x"00000" then
+          write_default <= '0';--'1';
+      else
+          write_default <= '1';--'1';
+          --dflt_i(to_integer(unsigned(BUS_Flash_value( 30 downto  27))),to_integer(unsigned(BUS_Flash_value( 26 downto  20)))) <= '0'; 
+      end if;
+      min_default    <= BUS_Flash_value( 9 downto  0);
+      max_default    <= BUS_Flash_value(19 downto 10);
+      FPGA_out_curr  <= BUS_Flash_value( 30 downto  27); -- fpga number from Flash
+      chnl_out       <= BUS_Flash_value( 26 downto  20);
+      chnl_out_curr  <= BUS_Flash_value( 26 downto  20);
+    else 
+      FPGA_out_curr  <= fpga_r;
+      chnl_out       <= chnl_r;
+      chnl_out_curr  <= chnl_r;
+    end if;
+   
+  end if;
+  end process;
+  
+  chnl_out_write_cnt <= chnl_r;
+  FPGA_out_write_cnt <= fpga_r;
+  Delta              <= Delta_i;
+end Behavioral;
\ No newline at end of file
diff --git a/combiner_cts/code_EBR/Calc_output.vhd b/combiner_cts/code_EBR/Calc_output.vhd
new file mode 100644 (file)
index 0000000..5e8b827
--- /dev/null
@@ -0,0 +1,53 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+library work;
+use work.trb_net_std.all;
+
+entity calc_output is
+  generic (
+    USE_STAT_BITS     : integer range 0 to 1 := c_NO;
+    USE_DATA_WRITE    : integer range 0 to 1 := c_NO;
+    USE_DATA_FINISHED : integer range 0 to 1 := c_NO; 
+    USE_BUSY_RELEASE  : integer range 0 to 1 := c_NO
+  );  
+  port (       
+    CLK            : in  std_logic;
+    DIN            : in  std_logic_vector(31 downto 0);
+    DIN_ready      : in  std_logic;
+    DIN_type       : in  std_logic_vector( 3 downto 0);
+    do_cal_in      : in  std_logic;
+    overshoot_in   : in  std_logic := '0';
+    undershoot_in  : in  std_logic := '0';
+    slope          : in  std_logic_vector(11 downto 0);
+    factor         : in  std_logic_vector( 9 downto 0);
+    DIN_info       : in  std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+    DOUT           : out std_logic_vector(31 downto 0);
+    DOUT_ready     : out std_logic;
+    DOUT_type      : out std_logic_vector( 3 downto 0);
+    do_cal_out     : out std_logic;
+    overshoot_out  : out std_logic := '0';
+    undershoot_out : out std_logic := '0';
+    Cal_Data_out   : out std_logic_vector(21 downto 0);
+    DOUT_info      : out std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0)
+  );
+end calc_output;
+
+architecture Behavioral of calc_output is
+begin
+  
+  cnt : process (CLK,factor,slope)
+  begin
+  if rising_edge(CLK) then 
+    Cal_Data_out   <= std_logic_vector( (unsigned(factor) * unsigned(slope)) + to_unsigned(512,9));
+    DOUT           <= DIN;
+    DOUT_ready     <= DIN_ready;
+    DOUT_type      <= DIN_type;
+    do_cal_out     <= do_cal_in;
+    overshoot_out  <= overshoot_in;
+    undershoot_out <= undershoot_in;
+    DOUT_info      <= DIN_info;
+  end if; 
+  end process;
+
+end Behavioral;
diff --git a/combiner_cts/code_EBR/Calibration.vhd b/combiner_cts/code_EBR/Calibration.vhd
new file mode 100644 (file)
index 0000000..923ff83
--- /dev/null
@@ -0,0 +1,678 @@
+----------------------------------------------------------------------------------
+-- Company: JLU Giessen
+-- Engineer: Adrian Weber
+-- 
+-- Create Date: 06.01.2017 13:32:05
+-- Update Date: 13.11.2018 09:42:20
+-- Module Name: Calibration - Behavioral
+-- Project Name: TDC Calibration
+-- Target Devices: TrbSc
+----------------------------------------------------------------------------------
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+library work;
+use work.trb_net_std.all;
+
+entity TDC_Calibration is
+  generic (
+    IS_COMBINER       : integer range 0 to 1  := c_YES;
+    USE_STAT_BITS     : integer range 0 to 1  := c_NO;
+    USE_DATA_WRITE    : integer range 0 to 1  := c_NO;
+    USE_DATA_FINISHED : integer range 0 to 1  := c_NO; 
+    USE_BUSY_RELEASE  : integer range 0 to 1  := c_NO );
+  port ( 
+    CLK        : in  std_logic;
+    RESET      : in  std_logic;
+    DIN        : in  std_logic_vector(31 downto 0);
+    DIN_TYPE   : in  std_logic_vector( 3 downto 0);
+    DIN_READY  : in  std_logic;
+    DIN_STAT   : in  std_logic_vector((31*IS_COMBINER) downto 0);
+    FPGA_in    : in  std_logic_vector(15 downto 0);
+    TRIGG_TYPE : in  std_logic_vector( 3 downto 0);
+    DOUT       : out std_logic_vector(31 downto 0);
+    DOUT_TYPE  : out std_logic_vector( 3 downto 0);
+    DOUT_READY : out std_logic;
+    DOUT_STAT  : out std_logic_vector((31*IS_COMBINER) downto 0);
+    BUS_RX     : in  CTRLBUS_RX;
+    BUS_TX     : out CTRLBUS_TX;
+    DIN_info   : in  std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+    DOUT_info  : out std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0)
+  );
+end TDC_Calibration;
+
+architecture Behavioral of TDC_Calibration is
+  signal Dout_int            : std_logic_vector(21 downto 0);
+  signal DIN_i_Mem           : std_logic_vector(31 downto 0) := (others => '0');
+  signal DIN_i_Mem_ready     : std_logic;
+  signal DIN_i_Mem_type      : std_logic_vector( 3 downto 0);
+  signal DIN_o_Lim           : std_logic_vector(31 downto 0) := (others => '0');
+  signal DIN_o_Lim_ready     : std_logic;
+  signal DIN_o_Lim_type      : std_logic_vector( 3 downto 0);
+  signal min_out_Lim         : std_logic_vector( 9 downto 0) := (others => '1');
+  signal max_out_Lim         : std_logic_vector( 9 downto 0) := (others => '0');
+  signal Delta_Lim           : std_logic_vector( 9 downto 0) := "0110110100";
+  signal min_next_Lim        : std_logic_vector( 9 downto 0) := (others => '1');
+  signal max_next_Lim        : std_logic_vector( 9 downto 0) := (others => '0');
+  signal min_curr_Lim        : std_logic_vector( 9 downto 0) := (others => '1');
+  signal max_curr_Lim        : std_logic_vector( 9 downto 0) := (others => '0');
+  signal FPGA_Lim            : std_logic_vector( 3 downto 0) ;
+  signal chnl_Lim            : std_logic_vector( 6 downto 0) := (others => '0');
+  signal do_cal_LIM          : std_logic;
+  signal DIN_o_LUT           : std_logic_vector(31 downto 0) := (others => '0');
+  signal DIN_o_LUT_ready     : std_logic;
+  signal DIN_o_LUT_type      : std_logic_vector( 3 downto 0);
+  signal min_out_LUT         : std_logic_vector( 9 downto 0) := (others => '0');
+  signal max_out_LUT         : std_logic_vector( 9 downto 0) := (others => '1');
+  signal slope_LUT           : std_logic_vector(11 downto 0) := (others => '0');
+  signal cal_flag_LUT_out    : std_logic := '0';
+  signal write_next          : std_logic; 
+  signal min_next            : std_logic_vector( 9 downto 0):= "1111111111";
+  signal max_next            : std_logic_vector( 9 downto 0);    
+  signal write_curr          : std_logic;
+  signal min_curr            : std_logic_vector( 9 downto 0);
+  signal max_curr            : std_logic_vector( 9 downto 0);
+  signal factor_LUT          : std_logic_vector( 9 downto 0);
+  signal DIN_o_cnt           : std_logic_vector(31 downto 0);
+  signal DIN_o_cnt_ready     : std_logic;
+  signal DIN_o_cnt_type      : std_logic_vector( 3 downto 0);
+  signal FPGA_o_cnt          : std_logic_vector( 3 downto 0);
+  signal chnl_read_cnt       : std_logic_vector( 6 downto 0);
+  signal cal_cnt_in          : unsigned(19 downto 0);
+  signal cal_cnt_out         : unsigned(19 downto 0) := "00000000000000000000";   
+  signal DIN_o_cnt_val       : std_logic_vector(31 downto 0);
+  signal DIN_o_cnt_val_ready : std_logic;
+  signal DIN_o_cnt_val_type  : std_logic_vector( 3 downto 0);
+  signal DIN_MemCurr_data    : std_logic_vector(31 downto 0);
+  signal DIN_MemCurr_ready   : std_logic;
+  signal DIN_MemCurr_type    : std_logic_vector( 3 downto 0);
+  signal Do_Cal_read_cnt     : std_logic := '0';
+  signal CHNL_out_Memory     : std_logic_vector( 6 downto 0);
+  signal FPGA_out_Memory     : std_logic_vector( 3 downto 0);
+  signal Do_Cal_Memory       : std_logic := '0';
+  signal write_chnl_cnt      : std_logic;
+  signal chnl_out_write      : std_logic_vector( 6 downto 0);
+  signal FPGA_out_write      : std_logic_vector( 3 downto 0);
+  signal BUS_do_Cal          : std_logic := '1';
+  signal overshoot_LUT       : std_logic := '0';
+  signal undershoot_LUT      : std_logic := '0';
+  signal Cal_Limit_reg       : unsigned(19 downto 0) := "00011000011010100000";
+  signal cal_Limit_set       : unsigned(19 downto 0);    
+  signal Do_cal_CalcOut      : std_logic := '0';
+  signal DIN_o_CalcOut       : std_logic_vector(31 downto 0);
+  signal DIN_o_CalcOut_ready : std_logic;
+  signal DIN_o_CalcOut_type  : std_logic_vector( 3 downto 0);
+  signal overshoot_CalcOut   : std_logic := '0';
+  signal undershoot_CalcOut  : std_logic := '0';
+  signal Bus_Chnl            : std_logic_vector( 6 downto 0);
+  signal Bus_FPGA            : std_logic_vector( 3 downto 0);
+  signal Bus_min             : std_logic_vector( 9 downto 0);
+  signal Bus_max             : std_logic_vector( 9 downto 0); 
+  signal FPGA_out_curr       : std_logic_vector( 3 downto 0);
+  signal chnl_out_curr       : std_logic_vector( 6 downto 0);
+  signal BUS_Flash_value     : std_logic_vector(31 downto 0);
+  signal Flash_flag          : std_logic;
+  signal chnl_out_write_cnt  : std_logic_vector( 6 downto 0);
+  signal FPGA_out_write_cnt  : std_logic_vector( 3 downto 0);
+  
+  signal docal_debug_out     : unsigned(31 downto 0); 
+  signal docal_debug_in      : unsigned(31 downto 0);
+  signal Debug_Data_min      : std_logic_vector(31 downto 0);
+  signal Debug_Data_max      : std_logic_vector(31 downto 0);
+  
+  type array_16_16_t is array (0 to 15) of std_logic_vector(15 downto 0);
+  signal FPGA_mntr_i         : array_16_16_t := (others => (others=> '0'));
+  signal FPGA_cnt_mntr       : std_logic_vector( 3 downto 0);
+  signal FPGA_mntr           : std_logic_vector(15 downto 0);
+  type MinMax_t is array (0 to 15, 0 to 63) of std_logic_vector(19 downto 0);
+  signal MinMax_Monitor      : MinMax_t := (others=>(others=>(others=>'0')));
+  signal BUS_stop_LimitGen   : std_logic := '0';
+  signal BUS_Trig_type       : std_logic_vector( 3 downto 0):="0000";
+  signal stop_Limits_r       : std_logic := '0';
+  signal stp_Lmt_read_cnt    : std_logic := '0';
+  signal stp_Lmt_MemCurr     : std_logic := '0';
+  
+  signal MonitorRam_plcHldr1 : std_logic_vector( 5 downto 0);
+  signal MonitorRam_plcHldr2 : std_logic_vector( 9 downto 0);
+  
+  signal Max_Monitoring      : std_logic_vector( 9 downto 0):="1010101010";
+  signal Min_Monitoring      : std_logic_vector( 9 downto 0):="1010101010";
+  
+  signal Monitor_RAM_RE      : std_logic := '0';
+  signal Monitor_RAM_AddFPGA : std_logic_vector( 3 downto 0);
+  signal Monitor_RAM_AddChnl : std_logic_vector( 6 downto 0);
+  
+  signal Monitor_RAM_ready   : std_logic := '0';
+  signal Monitor_RAM_ready_i : std_logic := '0';
+  signal Monitor_RAM_ready_r : std_logic := '0';
+  
+  signal DIN_delay           : std_logic_vector(31 downto 0);
+  signal DIN_ready_delay     : std_logic;
+  signal DIN_type_delay      : std_logic_vector( 3 downto 0);
+  signal slope_delay         : std_logic_vector(11 downto 0) := (others => '0');
+  signal do_cal_delay        : std_logic := '0';
+  signal factor_delay        : std_logic_vector( 9 downto 0);
+  signal overshoot_delay     : std_logic := '0';
+  signal undershoot_delay    : std_logic := '0';
+  
+  signal trig_type_in        : std_logic_vector( 3 downto 0):= "0000";
+  
+  signal DIN_info_rc         : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0) := (others => '0');
+  signal DIN_info_mem        : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0) := (others => '0');
+  signal DIN_info_LUT        : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0) := (others => '0');
+  signal DIN_info_Lim        : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0) := (others => '0');
+  signal DIN_info_delay      : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0) := (others => '0');
+  signal DIN_info_CalcOut    : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0) := (others => '0');
+  signal DIN_info_ready      : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0) := (others => '0');
+  
+  signal ch0_onoff           : std_logic_vector(15 downto 0) := x"FFFF";
+  signal dflt_out            : std_logic_vector( 3 downto 0) := x"0";
+  signal cnt_i_debug         : unsigned(19 downto 0);
+  
+  component RAM_pseudo_DP_wReg_36x1k is
+    port (
+      WrAddress : in  std_logic_vector( 9 downto 0); 
+      RdAddress : in  std_logic_vector( 9 downto 0); 
+      Data      : in  std_logic_vector(35 downto 0); 
+      WE        : in  std_logic; 
+      RdClock   : in  std_logic; 
+      RdClockEn : in  std_logic; 
+      Reset     : in  std_logic; 
+      WrClock   : in  std_logic; 
+      WrClockEn : in  std_logic; 
+      Q         : out std_logic_vector(35 downto 0)
+    );
+  end component RAM_pseudo_DP_wReg_36x1k;
+  
+begin
+
+--BUS Handler
+  proc_reg : process 
+  begin
+  wait until rising_edge(CLK);
+  BUS_TX.ack     <= '0';
+  BUS_TX.nack    <= '0';
+  BUS_TX.unknown <= '0';
+  Flash_flag     <= '0';
+  
+  Monitor_RAM_RE <= '0';
+
+  if BUS_RX.write = '1' then
+    BUS_TX.ack <= '1';
+    if BUS_RX.addr(11 downto 0) > x"010" and BUS_RX.addr(11 downto 0) < x"0d0" then  --x"810" is upper limit
+      BUS_Flash_value <= std_logic_vector(unsigned(BUS_RX.addr(11 downto 0))-x"10") & BUS_RX.data(19 downto 10) & BUS_RX.data(9 downto 0);
+      Flash_flag <= '1';
+    elsif BUS_RX.addr(11 downto 0) >= x"000" and BUS_RX.addr(11 downto 0) < x"010" then --standard debugg
+      case BUS_RX.addr(11 downto 0) is
+        when x"000"   => 
+                BUS_Trig_type     <= BUS_RX.data(11 downto 8);
+                BUS_do_Cal        <= BUS_RX.data(0);                         -- change between w/ and w/o FPGA based Calibration
+                BUS_stop_LimitGen <= BUS_RX.data(4);
+        when x"001"   => 
+                Cal_Limit_reg   <= unsigned(BUS_RX.data(19 downto 0));    -- Set Maximum Value for Calibration Counter
+        when x"002"   => 
+                Bus_FPGA        <= BUS_RX.data(3 downto 0);                -- set channel for Min/Max Output
+        when x"003"   => 
+                Bus_Chnl        <= BUS_RX.data(6 downto 0);                -- set channel for Min/Max Output
+        when x"004"   => 
+                ch0_onoff       <= BUS_RX.data(15 downto 0);                -- set channel0 On/off
+        when others   =>
+                BUS_TX.ack      <= '0';
+                BUS_TX.unknown  <= '1';
+      end case;
+    else --monitoring
+      BUS_TX.ack      <= '0'; 
+      BUS_TX.unknown  <= '1';
+    end if;  
+  elsif BUS_RX.read = '1' then
+    BUS_TX.ack <= '1';
+    if BUS_RX.addr(11 downto 4) = x"00" then
+      case BUS_RX.addr(3 downto 0) is
+        when x"0"     =>  BUS_TX.data(31 downto 12) <= (others => '0');
+                          BUS_TX.data(11 downto  8) <= BUS_Trig_type;
+                          BUS_TX.data( 7 downto  5) <= (others => '0');
+                          BUS_TX.data( 4)           <= BUS_stop_LimitGen;
+                          BUS_TX.data( 3 downto  1) <= (others => '0');
+                          BUS_TX.data( 0)           <= BUS_do_Cal;
+        when x"1"     =>  BUS_TX.data(31 downto 20) <= (others => '0');
+                          BUS_TX.data(19 downto  0) <= std_logic_vector(cal_Limit_set);
+        when x"2"     =>  BUS_TX.data( 3 downto  0) <= Bus_FPGA;
+                          BUS_TX.data(31 downto  4) <= (others => '0');
+        when x"3"     =>  BUS_TX.data( 6 downto  0) <= Bus_Chnl;
+                          BUS_TX.data(31 downto  7) <= (others => '0');
+        when x"4"     =>  BUS_TX.data(31 downto 10) <= (others => '0');
+                          BUS_TX.data( 9 downto  0) <= Bus_min;
+        when x"5"     =>  BUS_TX.data(31 downto 10) <= (others => '0');
+                          BUS_TX.data( 9 downto  0) <= Bus_max;
+        when x"6"      => BUS_TX.data <= std_logic_vector(docal_debug_in);
+        when x"7"      => BUS_TX.data <= std_logic_vector(docal_debug_out);
+        when x"8"      => BUS_TX.data(11 downto  8) <= FPGA_Lim;
+                          BUS_TX.data(7) <= '0';
+                          BUS_TX.data( 6 downto  0) <= chnl_Lim;
+                          BUS_TX.data(31 downto 12) <= (others => '0');
+        when x"9"      => BUS_TX.data(31 downto 20) <= (others => '0');
+                          BUS_TX.data(19 downto  0) <= std_logic_vector(cal_cnt_in);
+        when x"A"      => BUS_TX.data <= Debug_Data_min;
+        when x"B"      => BUS_TX.data <= Debug_Data_max;
+        when x"C"      => BUS_TX.data(31 downto 22) <= (others => '0');
+                          BUS_TX.data(21 downto 12) <= Max_Monitoring;--MinMax_Monitor(0,16);
+                          BUS_TX.data(11 downto 10) <= (others => '0');
+                          BUS_TX.data( 9 downto  0) <= Min_Monitoring;
+        when x"D"      => BUS_TX.data(31 downto 20) <= (others => '0');
+                          BUS_TX.data(19 downto  0) <= std_logic_vector(cnt_i_debug);--MinMax_Monitor(0,17);
+        when x"E"      => BUS_TX.data(31 downto  4) <= (others => '0');--BUS_TX.data(31 downto 20) <= (others => '0');
+                          BUS_TX.data( 3 downto  0) <= dflt_out;--BUS_TX.data(19 downto  0) <= MinMax_Monitor(0,18);
+        when x"F"      => BUS_TX.data(31 downto 16) <= (others => '0');
+                          BUS_TX.data(15 downto  0) <= ch0_onoff;
+        when others   =>  BUS_TX.ack     <= '0';
+                          BUS_TX.unknown <= '1';
+      end case;
+    elsif BUS_RX.addr(11 downto 4) = x"02" then
+      BUS_TX.data(31 downto 16) <= x"0000";
+      BUS_TX.data(15 downto  0) <= FPGA_mntr_i(to_integer(unsigned(BUS_RX.addr(3 downto 0))));
+    elsif BUS_RX.addr(11 downto 4) = x"03" then --ch 0
+      BUS_TX.ack <= '0';
+      Monitor_RAM_AddChnl <= "0000000";
+      Monitor_RAM_AddFPGA <= std_logic_vector(unsigned(BUS_RX.addr(3 downto 0)));
+      Monitor_RAM_RE <= '1';
+    elsif (BUS_RX.addr(11 downto 4) > x"03") and (BUS_RX.addr(11 downto 4) < x"20")  then
+      BUS_TX.ack <= '0';
+      Monitor_RAM_AddChnl <= std_logic_vector(unsigned("00" & BUS_RX.addr(4 downto 0))+1);
+      Monitor_RAM_AddFPGA <= std_logic_vector(unsigned(BUS_RX.addr(8 downto 5)) - 2);
+      Monitor_RAM_RE <= '1'; 
+    else
+      BUS_TX.ack      <= '0';
+      BUS_TX.unknown  <= '1';
+    end if;
+  elsif (Monitor_RAM_ready = '1') then
+    BUS_TX.data(31 downto 20) <= (others => '0');
+    BUS_TX.data(19 downto  0) <= Max_Monitoring & Min_Monitoring;
+    BUS_TX.ack                <= '1';
+  end if;
+  end process;
+  
+  THE_MONITOR_FPGA_ID : process 
+  begin
+  wait until rising_edge(CLK);
+  FPGA_mntr_i(to_integer(unsigned(FPGA_cnt_mntr))) <= FPGA_mntr;
+  end process;
+  
+  
+  THE_MONITOR_RAM : RAM_pseudo_DP_wReg_36x1k
+  port map (
+    WrAddress(9 downto 6) => FPGA_out_curr,
+    WrAddress(5 downto 0) => chnl_out_curr(5 downto 0),
+    RdAddress(9 downto 6) => Monitor_RAM_AddFPGA,
+    RdAddress(5 downto 0) => Monitor_RAM_AddChnl(5 downto 0),
+    Data( 9 downto  0)    => min_curr_Lim,
+    Data(15 downto 10)    => (others => '0'),
+    Data(25 downto 16)    => max_curr_Lim,
+    Data(35 downto 26)    => (others => '0'),
+    WE                    => write_curr, 
+    RdClock               => CLK, 
+    RdClockEn             => '1',--Monitor_RAM_RE, 
+    Reset                 => RESET, 
+    WrClock               => CLK,
+    WrClockEn             => '1',
+    Q(35 downto 26)       => MonitorRam_plcHldr2,
+    Q(25 downto 16)       => Max_Monitoring,
+    Q(15 downto 10)       => MonitorRam_plcHldr1,
+    Q( 9 downto  0)       => Min_Monitoring
+  );
+
+  
+  Monitor_RAM_ready_r  <= Monitor_RAM_RE when rising_edge(CLK);
+  Monitor_RAM_ready    <= Monitor_RAM_ready_r when rising_edge(CLK);
+  
+  
+--   read_no_COMBINER : if IS_COMBINER = c_NO generate
+--   
+--     THE_TRIG_TYP : process  begin
+--     wait until rising_edge(CLK);
+--   
+--     if DIN(31 downto 29) = "001" then
+--       trig_type_in <= DIN(27 downto 24);
+--     end if;
+--     end process;
+--   
+--     read_cntr : entity work.read_cnt
+--     port map(
+--       CLK           => CLK,
+--       RESET         => RESET,
+--       BUS_stp_Lmt   => BUS_stop_LimitGen,
+--       BUS_Trig_type => BUS_Trig_type,
+--       chnl          => chnl_read_cnt,
+--       FPGA_out      => FPGA_o_cnt,
+--       FPGA_in       => FPGA_in,
+--       Trigger_type  => trig_type_in,
+--       DIN           => DIN_i_Mem,
+--       DIN_ready     => DIN_i_Mem_ready,
+--       DIN_type      => x"4",
+--       DOUT          => DIN_o_cnt,
+--       DOUT_ready    => DIN_o_cnt_ready,
+--       DOUT_type     => DIN_o_cnt_type,
+--       Do_Cal        => Do_Cal_read_cnt,
+--       FPGA_cnt_mntr => FPGA_cnt_mntr,
+--       FPGA_mntr     => FPGA_mntr,
+--       stop_Limit    => stp_Lmt_read_cnt
+--     );
+--   end generate read_no_COMBINER;
+--     
+--   read_COMBINER : if IS_COMBINER = c_YES generate
+    
+    read_cntr : entity work.read_cnt
+    generic map (
+      USE_STAT_BITS     => USE_STAT_BITS,
+      USE_DATA_WRITE    => USE_DATA_WRITE,
+      USE_DATA_FINISHED => USE_DATA_FINISHED,
+      USE_BUSY_RELEASE  => USE_BUSY_RELEASE
+    )
+    port map(
+      CLK           => CLK,
+      RESET         => RESET,
+      BUS_stp_Lmt   => BUS_stop_LimitGen,
+      BUS_Trig_type => BUS_Trig_type,
+      chnl          => chnl_read_cnt,
+      FPGA_out      => FPGA_o_cnt,
+      FPGA_in       => FPGA_in,
+      Trigger_type  => TRIGG_TYPE,
+      DIN           => DIN_i_Mem,
+      DIN_ready     => DIN_i_Mem_ready,
+      DIN_type      => DIN_i_Mem_type,
+      DOUT          => DIN_o_cnt,
+      DOUT_ready    => DIN_o_cnt_ready,
+      DOUT_type     => DIN_o_cnt_type,
+      Do_Cal        => Do_Cal_read_cnt,
+      FPGA_cnt_mntr => FPGA_cnt_mntr,
+      FPGA_mntr     => FPGA_mntr,
+      stop_Limit    => stp_Lmt_read_cnt,
+      DIN_info      => DIN_info_ready,
+      DOUT_info     => DIN_info_rc,
+      ch0_onoff     => ch0_onoff
+    );
+--   end generate read_COMBINER;
+  ent_cnt_val : entity work.cnt_val
+    port map(
+      CLK          => CLK,
+      RESET        => RESET,
+      write        => write_chnl_cnt,
+      FPGA_read    => FPGA_o_cnt,
+      chnl_read    => chnl_read_cnt,
+      FPGA_write   => FPGA_out_write_cnt,
+      chnl_write   => chnl_out_write_cnt,
+      cal_cnt      => cal_cnt_in, 
+      cal_cnt_out  => cal_cnt_out,
+      DIN          => DIN_o_cnt,
+      DIN_ready    => DIN_o_cnt_ready,
+      DIN_type     => DIN_o_cnt_type
+    );
+
+
+  Mem_next : entity work.Memory
+    port map(
+      CLK        => CLK,
+      RESET      => RESET,
+      write      => write_next,
+      FPGA_read  => FPGA_o_cnt,
+      chnl_read  => chnl_read_cnt,
+      FPGA_write => FPGA_out_write,
+      chnl_write => chnl_out_write,
+      min        => min_next_Lim,
+      max        => max_next_Lim,
+      min_out    => min_next,
+      max_out    => max_next,
+      DIN        => DIN_o_cnt,
+      DIN_ready  => DIN_o_cnt_ready,
+      DIN_type   => DIN_o_cnt_type
+    );
+
+  Mem_curr : entity work.Memory_curr
+    generic map (
+      USE_STAT_BITS     => USE_STAT_BITS,
+      USE_DATA_WRITE    => USE_DATA_WRITE,
+      USE_DATA_FINISHED => USE_DATA_FINISHED,
+      USE_BUSY_RELEASE  => USE_BUSY_RELEASE
+    )
+    port map(
+      CLK         => CLK,
+      RESET       => RESET,
+      stp_Lmt_in  => stp_Lmt_read_cnt,
+      write       => write_curr,
+      FPGA_read   => FPGA_o_cnt,
+      chnl_read   => chnl_read_cnt,
+      FPGA_write  => FPGA_out_curr,
+      chnl_write  => chnl_out_curr,
+      min         => min_curr_Lim,
+      max         => max_curr_Lim,
+      min_out     => min_curr,
+      max_out     => max_curr,
+      Do_Cal_in   => Do_Cal_read_cnt,
+      DIN         => DIN_o_cnt,
+      DIN_ready   => DIN_o_cnt_ready,
+      DIN_type    => DIN_o_cnt_type,
+      DOUT        => DIN_MemCurr_data,
+      DOUT_ready  => DIN_MemCurr_ready,
+      DOUT_type   => DIN_MemCurr_type,
+      FPGA_out    => FPGA_out_Memory,
+      CHNL_out    => CHNL_out_Memory,
+      Do_Cal_out  => Do_Cal_Memory,
+      stp_Lmt_out => stp_Lmt_MemCurr,
+      DIN_info    => DIN_info_rc,
+      DOUT_info   => DIN_info_mem
+    );
+    
+    
+  Cal_Limits : entity work.Cal_Limits_v2
+    generic map(
+      cal_Limit_gen     => "00000010011100010000", -- 10k
+      USE_STAT_BITS     => USE_STAT_BITS,
+      USE_DATA_WRITE    => USE_DATA_WRITE,
+      USE_DATA_FINISHED => USE_DATA_FINISHED,
+      USE_BUSY_RELEASE  => USE_BUSY_RELEASE
+    )
+    port map(
+      CLK                => CLK,
+      RESET              => RESET,
+      stop_Limits        => stp_Lmt_MemCurr,
+      cal_Limit_reg      => Cal_Limit_reg,
+      DIN                => DIN_MemCurr_data,
+      DIN_ready          => DIN_MemCurr_ready,
+      DIN_type           => DIN_MemCurr_type,
+      min_curr_in        => min_curr,
+      max_curr_in        => max_curr,
+      min_next_in        => min_next,
+      max_next_in        => max_next,
+      FPGA               => FPGA_out_Memory,
+      chnl               => CHNL_out_Memory,
+      Do_Cal_in          => Do_Cal_Memory,
+      chnl_cnt_in        => cal_cnt_out,
+      BUS_Flash_value    => BUS_Flash_value,
+      Flash_flag         => Flash_flag,
+      write_curr_out     => write_curr,
+      write_next         => write_next,
+      min_next           => min_next_Lim,
+      max_next           => max_next_Lim,
+      min_curr_out       => min_curr_Lim,
+      max_curr_out       => max_curr_Lim,
+      min_out_out        => min_out_Lim,
+      max_out_out        => max_out_Lim,
+      Delta              => Delta_Lim,
+      FPGA_out           => FPGA_Lim,
+      chnl_out           => chnl_Lim,
+      FPGA_out_curr      => FPGA_out_curr,
+      chnl_out_curr      => chnl_out_curr,
+      FPGA_out_write     => FPGA_out_write,
+      chnl_out_write     => chnl_out_write,
+      FPGA_out_write_cnt => FPGA_out_write_cnt,
+      chnl_out_write_cnt => chnl_out_write_cnt,
+      DOUT               => DIN_o_Lim,
+      DOUT_ready         => DIN_o_Lim_ready,
+      DOUT_type          => DIN_o_Lim_type,
+      Do_Cal_out         => do_cal_LIM,
+      chnl_cnt_out       => cal_cnt_in,
+      write_chnl_cnt     => write_chnl_cnt,
+      cal_Limit_set      => cal_Limit_set,
+      Debug_Data_min     => Debug_Data_min,
+      Debug_Data_max     => Debug_Data_max,
+      DIN_info           => DIN_info_mem,
+      DOUT_info          => DIN_info_Lim,
+      dflt_out           => dflt_out,
+      cnt_i_debug        => cnt_i_debug
+    );
+
+
+  LUTs : entity work.LUT
+    generic map (
+      USE_STAT_BITS     => USE_STAT_BITS,
+      USE_DATA_WRITE    => USE_DATA_WRITE,
+      USE_DATA_FINISHED => USE_DATA_FINISHED,
+      USE_BUSY_RELEASE  => USE_BUSY_RELEASE
+    )
+    port map(
+      CLK        => CLK,
+      DIN        => DIN_o_Lim,
+      DIN_ready  => DIN_o_Lim_ready,
+      DIN_type   => DIN_o_Lim_type,
+      Delta      => Delta_Lim,
+      min_in     => min_out_Lim,
+      max_in     => max_out_Lim,
+      do_cal_in  => do_cal_LIM,
+      min_out    => min_out_LUT,
+      max_out    => max_out_LUT,
+      DOUT       => DIN_o_LUT,
+      DOUT_ready => DIN_o_LUT_ready,
+      DOUT_type  => DIN_o_LUT_type,
+      slope      => slope_LUT,
+      do_cal_out => cal_flag_LUT_out,
+      factor     => factor_LUT,
+      overshoot  => overshoot_LUT,
+      undershoot => undershoot_LUT,
+      DIN_info   => DIN_info_Lim,
+      DOUT_info  => DIN_info_LUT
+    );
+    
+   DELAY_SLOPE: process begin
+   wait until rising_edge(CLK);
+
+    DIN_delay        <= DIN_o_LUT;
+    DIN_ready_delay  <= DIN_o_LUT_ready;
+    DIN_type_delay   <= DIN_o_LUT_type;
+    slope_delay      <= slope_LUT;
+    do_cal_delay     <= cal_flag_LUT_out;
+    factor_delay     <= factor_LUT;
+    overshoot_delay  <= overshoot_LUT;
+    undershoot_delay <= undershoot_LUT;
+    DIN_info_delay   <= DIN_info_LUT;
+   end process;
+
+  Calc_Output : entity work.calc_output
+    generic map (
+      USE_STAT_BITS     => USE_STAT_BITS,
+      USE_DATA_WRITE    => USE_DATA_WRITE,
+      USE_DATA_FINISHED => USE_DATA_FINISHED,
+      USE_BUSY_RELEASE  => USE_BUSY_RELEASE
+    )
+    port map(
+      CLK            => CLK,
+      DIN            => DIN_delay,
+      DIN_ready      => DIN_ready_delay,
+      DIN_type       => DIN_type_delay,
+      do_cal_in      => do_cal_delay,
+      overshoot_in   => overshoot_delay,
+      undershoot_in  => undershoot_delay,
+      slope          => slope_delay,
+      factor         => factor_delay,
+      DOUT           => DIN_o_CalcOut,
+      DOUT_ready     => DIN_o_CalcOut_ready,
+      DOUT_type      => DIN_o_CalcOut_type,
+      do_cal_out     => Do_cal_CalcOut,
+      overshoot_out  => overshoot_CalcOut,
+      undershoot_out => undershoot_CalcOut,
+      Cal_Data_out   => Dout_int,
+      DIN_info       => DIN_info_delay,
+      DOUT_info      => DIN_info_CalcOut
+    );
+    
+ THE_Enable : process
+  begin
+  wait until rising_edge(CLK);
+  if DIN_READY = '1' then
+    DIN_i_Mem      <= DIN;
+    DIN_i_Mem_type <= DIN_TYPE;
+    DIN_info_ready <= DIN_info;
+  end if;
+  DIN_i_Mem_ready  <= DIN_READY;
+  
+  end process;
+  
+  
+  fine_out : process (CLK)
+  begin
+  if rising_edge(CLK) then
+
+    if ((Do_cal_CalcOut = '1') and (BUS_do_Cal = '1')) then
+      DOUT(31 downto 22)   <= DIN_o_CalcOut(31 downto 22);
+      DOUT(11 downto  0)   <= DIN_o_CalcOut(11 downto  0);
+      if ((overshoot_CalcOut = '0') and (undershoot_CalcOut = '0')) then
+        DOUT(21 downto 12) <= Dout_int(19 downto 10);
+      elsif (undershoot_CalcOut = '1') and (overshoot_CalcOut = '0') then
+        DOUT(21 downto 12) <= "1111110010";  --1010
+      elsif (undershoot_CalcOut = '0') and (overshoot_CalcOut = '1') then
+        DOUT(21 downto 12) <= "1111110111";  --1015
+      else
+        DOUT(21 downto 12) <= "1111111100";  --1020
+      end if;
+    else
+      DOUT      <= DIN_o_CalcOut;
+    end if;
+    
+    DOUT_READY  <= DIN_o_CalcOut_ready;
+    DOUT_TYPE   <= DIN_o_CalcOut_type;
+    DOUT_info   <= DIN_info_CalcOut;
+  end if;
+  end process;
+  
+  
+  debug : process (CLK)
+  begin 
+    if rising_edge(CLK) then
+      if (unsigned(Bus_Chnl) = unsigned(chnl_Lim)) and (unsigned(Bus_FPGA) = unsigned(FPGA_Lim)) then
+        Bus_min <= min_out_Lim;
+        Bus_max <= max_out_Lim;
+      end if;
+      
+      if do_cal_LIM = '1' then
+        docal_debug_out <= docal_debug_out + 1;
+      end if;
+      if Do_Cal_Memory = '1' then
+        docal_debug_in <= docal_debug_in + 1;
+      end if;
+    end if;  
+  end process;
+  
+  Calib_monitor : process (CLK)
+  begin 
+    if rising_edge(CLK) then
+      if do_cal_LIM = '1' then
+        MinMax_Monitor(to_integer(unsigned(FPGA_Lim)),to_integer(unsigned(chnl_Lim(5 downto 0))))( 9 downto  0) <= min_out_Lim;
+        MinMax_Monitor(to_integer(unsigned(FPGA_Lim)),to_integer(unsigned(chnl_Lim(5 downto 0))))(19 downto 10) <= max_out_Lim;
+      end if;
+    end if;  
+  end process;
+  
+  
+  TX_stat : if IS_COMBINER = c_YES generate
+    TX_statusbits : process (CLK)
+    begin
+    if rising_edge(CLK) then
+      if (DIN_READY = '1') then
+        DOUT_STAT <= DIN_STAT;
+      end if;
+    end if;
+    end process;
+  end generate TX_stat;
+  
+end Behavioral;
diff --git a/combiner_cts/code_EBR/Delta.vhd b/combiner_cts/code_EBR/Delta.vhd
new file mode 100644 (file)
index 0000000..49bb5f7
--- /dev/null
@@ -0,0 +1,43 @@
+----------------------------------------------------------------------------------
+-- Company: 
+-- Engineer: 
+-- 
+-- Create Date: 08.01.2017 15:55:47
+-- Design Name: 
+-- Module Name: Delta - Behavioral
+-- Project Name: 
+-- Target Devices: 
+-- Tool Versions: 
+-- Description: 
+-- 
+-- Dependencies: 
+-- 
+-- Revision:
+-- Revision 0.01 - File Created
+-- Additional Comments:
+-- 
+----------------------------------------------------------------------------------
+
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+
+-- Uncomment the following library declaration if using
+-- arithmetic functions with Signed or Unsigned values
+--use IEEE.NUMERIC_STD.ALL;
+
+-- Uncomment the following library declaration if instantiating
+-- any Xilinx primitives in this code.
+--library UNISIM;
+--use UNISIM.VComponents.all;
+
+entity Delta is
+    Port ( );
+end Delta;
+
+architecture Behavioral of Delta is
+
+begin
+
+
+end Behavioral;
diff --git a/combiner_cts/code_EBR/LUT.vhd b/combiner_cts/code_EBR/LUT.vhd
new file mode 100644 (file)
index 0000000..5e3af67
--- /dev/null
@@ -0,0 +1,120 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+library work;
+use work.trb_net_std.all;
+
+entity LUT is
+  generic (
+    USE_STAT_BITS     : integer range 0 to 1 := c_NO;
+    USE_DATA_WRITE    : integer range 0 to 1 := c_NO;
+    USE_DATA_FINISHED : integer range 0 to 1 := c_NO; 
+    USE_BUSY_RELEASE  : integer range 0 to 1 := c_NO );
+  port (
+    CLK        : in  std_logic;
+    DIN        : in  std_logic_vector(31 downto 0);
+    DIN_ready  : in  std_logic;
+    DIN_type   : in  std_logic_vector( 3 downto 0);
+    Delta      : in  std_logic_vector( 9 downto 0):="0110110100";
+    min_in     : in  std_logic_vector( 9 downto 0);
+    max_in     : in  std_logic_vector( 9 downto 0);
+    do_cal_in  : in  std_logic;
+    DIN_info   : in  std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+    min_out    : out std_logic_vector( 9 downto 0);
+    max_out    : out std_logic_vector( 9 downto 0);
+    DOUT       : out std_logic_vector(31 downto 0);
+    DOUT_ready : out std_logic;
+    DOUT_type  : out std_logic_vector( 3 downto 0);
+    slope      : out std_logic_vector(11 downto 0);
+    do_cal_out : out std_logic;
+    factor     : out std_logic_vector( 9 downto 0);
+    overshoot  : out std_logic := '0';
+    undershoot : out std_logic := '0';
+    DOUT_info  : out std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0)
+  );
+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;
+
+  constant LUTslope:   lut := (
+    "100100101101", "100100100111", "100100100010", "100100011101", 
+    "100100010111", "100100010010", "100100001101", "100100001000", 
+    "100100000010", "100011111101", "100011111000", "100011110011", 
+    "100011101110", "100011101001", "100011100100", "100011011111", 
+    "100011011001", "100011010100", "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", 
+    "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"
+    );
+        
+  signal do_cal_out_i : std_logic := '0';
+    
+begin
+
+  proc_slope : process (CLK)
+  begin
+  if rising_edge(CLK) then
+    if do_cal_in = '1' then
+      slope <= LUTslope( TO_INTEGER ( unsigned(Delta)));
+    end if;
+    min_out      <= min_in;
+    max_out      <= max_in;
+    do_cal_out_i <= do_cal_in;
+  end if;
+  end process;
+  
+  proc_factor : process (CLK)
+  begin
+  if rising_edge(CLK) then
+  --keep values in definition area of linear part
+    if (unsigned(DIN(21 downto 12)) < unsigned(min_in) ) then
+      factor     <= (others => '0');
+      undershoot <= '1'; -- value is out of calibration range
+      overshoot  <= '0';
+    elsif (unsigned(DIN(21 downto 12)) > unsigned(max_in) ) then
+      factor     <= (others => '0');
+      overshoot  <= '1'; -- value is out of calibration range
+      undershoot <= '0';
+    else
+      factor     <= std_logic_vector(unsigned(DIN(21 downto 12)) - unsigned(min_in));
+      undershoot <= '0';
+      overshoot  <= '0';
+    end if;
+
+    DOUT        <= DIN;
+    DOUT_ready  <= DIN_ready;
+    DOUT_type   <= DIN_type;
+    DOUT_info   <= DIN_info;
+  end if;
+  end process; 
+  
+  do_cal_out <= do_cal_out_i;
+
+end architecture;
\ No newline at end of file
diff --git a/combiner_cts/code_EBR/Memory.vhd b/combiner_cts/code_EBR/Memory.vhd
new file mode 100644 (file)
index 0000000..4c9c225
--- /dev/null
@@ -0,0 +1,98 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+
+entity Memory is
+  Port (
+    CLK        : in  std_logic;
+    RESET      : in  std_logic;
+    write      : in  std_logic;
+    FPGA_read  : in  std_logic_vector( 3 downto 0);
+    chnl_read  : in  std_logic_vector( 6 downto 0);
+    FPGA_write : in  std_logic_vector( 3 downto 0);
+    chnl_write : in  std_logic_vector( 6 downto 0);
+    Min        : in  std_logic_vector( 9 downto 0);
+    Max        : in  std_logic_vector( 9 downto 0);
+    DIN        : in  std_logic_vector(31 downto 0);
+    DIN_ready  : in  std_logic;
+    DIN_type   : in  std_logic_vector( 3 downto 0);
+    Min_out    : out std_logic_vector( 9 downto 0):= "1111111111";
+    Max_out    : out std_logic_vector( 9 downto 0):= "0000000000"
+  );
+end Memory;
+
+architecture Behavioral of Memory is
+  signal Max_EBR_out    : std_logic_vector( 9 downto 0) := "0000000000";
+  signal Min_EBR_out    : std_logic_vector( 9 downto 0) := "1111111111";
+  signal Q_col, Q_col_r : std_logic_vector(20 downto 0) :='0' & x"003FF";
+  signal Q_i1           : std_logic_vector( 5 downto 0);
+  signal Q_i2           : std_logic_vector( 9 downto 0);
+  
+  component RAM_pseudo_DP_wReg_36x1k is
+    port (
+      WrAddress : in  std_logic_vector( 9 downto 0); 
+      RdAddress : in  std_logic_vector( 9 downto 0); 
+      Data      : in  std_logic_vector(35 downto 0); 
+      WE        : in  std_logic; 
+      RdClock   : in  std_logic; 
+      RdClockEn : in  std_logic; 
+      Reset     : in  std_logic; 
+      WrClock   : in  std_logic; 
+      WrClockEn : in  std_logic; 
+      Q         : out std_logic_vector(35 downto 0)
+    );
+  end component RAM_pseudo_DP_wReg_36x1k;
+
+begin
+  
+  THE_EBR_curr : RAM_pseudo_DP_wReg_36x1k
+  port map (
+    WrAddress(9 downto 6) => FPGA_write,
+    WrAddress(5 downto 0) => chnl_write(5 downto 0),
+    RdAddress(9 downto 6) => FPGA_read,
+    RdAddress(5 downto 0) => chnl_read(5 downto 0),
+    Data( 9 downto  0)    => Min,
+    Data(15 downto 10)    => (others => '0'),
+    Data(25 downto 16)    => Max,
+    Data(35 downto 26)    => (others => '0'),
+    WE                    => write, 
+    RdClock               => CLK, 
+    RdClockEn             => '1', 
+    Reset                 => RESET, 
+    WrClock               => CLK,
+    WrClockEn             => '1',
+    Q(35 downto 26)       => Q_i2,
+    Q(25 downto 16)       => Max_EBR_out,
+    Q(15 downto 10)       => Q_i1,
+    Q( 9 downto  0)       => Min_EBR_out
+  );
+
+  
+  RW_handler : process (CLK)
+  begin
+  if rising_edge(CLK) then       
+    -- handle read/write on same Address;
+    -- delay of collision Output to sync with "normal" Q.
+    if (write = '1') and (FPGA_write = FPGA_read) and (chnl_write = chnl_read) then
+      Q_col(20)           <= '1';
+      Q_col(19 downto 10) <= Max;
+      Q_col( 9 downto  0) <= Min;
+    else   
+      Q_col <= '0' & x"003FF";
+    end if;
+    -- selection between Q from collison or normal one
+    if (Q_col_r(20) = '1') then
+      Min_out <= Q_col_r( 9 downto  0);
+      Max_out <= Q_col_r(19 downto 10);
+    else
+      if Min_EBR_out = "0000000000" then
+        Min_out <= "1111111111";
+      else
+        Min_out <= Min_EBR_out;
+      end if;  
+      Max_out <= Max_EBR_out;
+    end if;
+    Q_col_r <= Q_col;
+  end if;
+  end process;
+end Behavioral;
diff --git a/combiner_cts/code_EBR/Memory_curr.vhd b/combiner_cts/code_EBR/Memory_curr.vhd
new file mode 100644 (file)
index 0000000..4f8fe5b
--- /dev/null
@@ -0,0 +1,155 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+library work;
+use work.trb_net_std.all;
+
+entity Memory_curr is
+  generic (
+    USE_STAT_BITS     : integer range 0 to 1 := c_NO;
+    USE_DATA_WRITE    : integer range 0 to 1 := c_NO;
+    USE_DATA_FINISHED : integer range 0 to 1 := c_NO; 
+    USE_BUSY_RELEASE  : integer range 0 to 1 := c_NO );
+  port (
+    CLK         : in  std_logic;
+    RESET       : in  std_logic;
+    stp_Lmt_in  : in  std_logic;
+    write       : in  std_logic;
+    FPGA_read   : in  std_logic_vector( 3 downto 0);
+    chnl_read   : in  std_logic_vector( 6 downto 0);
+    FPGA_write  : in  std_logic_vector( 3 downto 0);
+    chnl_write  : in  std_logic_vector( 6 downto 0);
+    Min         : in  std_logic_vector( 9 downto 0);
+    Max         : in  std_logic_vector( 9 downto 0);
+    Do_Cal_in   : in  std_logic;
+    DIN         : in  std_logic_vector(31 downto 0);
+    DIN_ready   : in  std_logic;
+    DIN_type    : in  std_logic_vector( 3 downto 0);
+    DIN_info    : in  std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+    Min_out     : out std_logic_vector( 9 downto 0):= "1111111111";
+    Max_out     : out std_logic_vector( 9 downto 0):= "0000000000";
+    DOUT        : out std_logic_vector(31 downto 0);
+    DOUT_ready  : out std_logic;
+    DOUT_type   : out std_logic_vector( 3 downto 0);
+    FPGA_out    : out std_logic_vector( 3 downto 0);
+    CHNL_out    : out std_logic_vector( 6 downto 0);
+    Do_Cal_out  : out std_logic;
+    stp_Lmt_out : out std_logic;
+    DOUT_info   : out std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0)
+  );
+end Memory_curr;
+
+architecture Behavioral of Memory_curr is
+
+  signal Max_EBR_out               : std_logic_vector( 9 downto 0);
+  signal Min_EBR_out               : std_logic_vector( 9 downto 0);
+  signal Q_col, Q_col_r            : std_logic_vector(20 downto 0) :='0' & x"00000";
+  signal chnl_r, chnl_2r           : std_logic_vector( 6 downto 0);
+  signal fpga_r, fpga_2r           : std_logic_vector( 3 downto 0);
+  signal DIN_r, DIN_2r             : std_logic_vector(31 downto 0);
+  signal DIN_ready_r, DIN_ready_2r : std_logic;
+  signal DIN_type_r, DIN_type_2r   : std_logic_vector( 3 downto 0);
+  signal Do_Cal_in_r, Do_Cal_in_2r : std_logic;
+  signal Q_i1                      : std_logic_vector( 5 downto 0);
+  signal Q_i2                      : std_logic_vector( 9 downto 0);
+  signal stop_Lim_r, stop_Lim_2r   : std_logic;
+  signal DIN_info_r, DIN_info_2r   : std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0) := (others => '0'); 
+  
+  component RAM_pseudo_DP_wReg_36x1k is
+    port (
+      WrAddress : in  std_logic_vector( 9 downto 0); 
+      RdAddress : in  std_logic_vector( 9 downto 0); 
+      Data      : in  std_logic_vector(35 downto 0); 
+      WE        : in  std_logic; 
+      RdClock   : in  std_logic; 
+      RdClockEn : in  std_logic; 
+      Reset     : in  std_logic; 
+      WrClock   : in  std_logic; 
+      WrClockEn : in  std_logic; 
+      Q         : out std_logic_vector(35 downto 0)
+    );
+  end component RAM_pseudo_DP_wReg_36x1k;
+
+begin
+  
+  THE_EBR_curr : RAM_pseudo_DP_wReg_36x1k
+  port map (
+    WrAddress(9 downto 6) => FPGA_write,
+    WrAddress(5 downto 0) => chnl_write(5 downto 0),
+    RdAddress(9 downto 6) => FPGA_read,
+    RdAddress(5 downto 0) => chnl_read(5 downto 0),
+    Data( 9 downto  0)    => Min,
+    Data(15 downto 10)    => (others => '0'),
+    Data(25 downto 16)    => Max,
+    Data(35 downto 26)    => (others => '0'),
+    WE                    => write, 
+    RdClock               => CLK, 
+    RdClockEn             => '1', 
+    Reset                 => RESET, 
+    WrClock               => CLK,
+    WrClockEn             => '1',
+    Q(35 downto 26)       => Q_i2,
+    Q(25 downto 16)       => Max_EBR_out,
+    Q(15 downto 10)       => Q_i1,
+    Q( 9 downto  0)       => Min_EBR_out
+  );
+
+  
+  mem : process (CLK)
+  begin
+  if rising_edge(CLK) then       
+    -- handle read/write on same Address;
+    -- delay of collision Output to sync with "normal" Q.
+    if (write = '1') and (FPGA_write = FPGA_read) and (chnl_write = chnl_read) then
+      Q_col(20)           <= '1';
+      Q_col(19 downto 10) <= Max;
+      Q_col( 9 downto  0) <= Min;
+    else   
+      Q_col <= '0' & x"00000";
+    end if;
+    -- selection between Q from collison or normal one
+    if (Q_col_r(20) = '1') then
+      Min_out <= Q_col_r( 9 downto  0);
+      Max_out <= Q_col_r(19 downto 10);
+    else
+      Min_out <= Min_EBR_out;
+      Max_out <= Max_EBR_out;
+    end if;
+    Q_col_r      <= Q_col;
+    -- Delay to sync with EBR output
+    DIN_r        <= DIN;
+    DIN_2r       <= DIN_r;
+    DOUT         <= DIN_2r;
+
+    DIN_ready_r  <= DIN_ready;
+    DIN_ready_2r <= DIN_ready_r;
+    DOUT_ready   <= DIN_ready_2r;
+
+    DIN_type_r   <= DIN_type;
+    DIN_type_2r  <= DIN_type_r;
+    DOUT_type    <= DIN_type_2r;
+    
+    DIN_info_r   <= DIN_info;
+    DIN_info_2r  <= DIN_info_r;
+    DOUT_info    <= DIN_info_2r;
+
+    fpga_r       <= FPGA_read;
+    fpga_2r      <= fpga_r;
+    FPGA_out     <= fpga_2r;
+
+    chnl_r       <= chnl_read;
+    chnl_2r      <= chnl_r;
+    CHNL_out     <= chnl_2r;
+
+    Do_Cal_in_r  <= Do_Cal_in;
+    Do_Cal_in_2r <= Do_Cal_in_r;
+    Do_Cal_out   <= Do_Cal_in_2r;
+    
+    stop_Lim_r   <= stp_Lmt_in;
+    stop_Lim_2r  <= stop_Lim_r;
+    stp_Lmt_out  <= stop_Lim_2r;
+  end if;
+  end process;
+
+  
+end Behavioral;
diff --git a/combiner_cts/code_EBR/cnt_val.vhd b/combiner_cts/code_EBR/cnt_val.vhd
new file mode 100644 (file)
index 0000000..3a7e9e3
--- /dev/null
@@ -0,0 +1,91 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+
+entity cnt_val is
+  Port (       
+    CLK          : in  std_logic;
+    RESET        : in  std_logic;
+    write        : in  std_logic;
+    FPGA_read    : in  std_logic_vector( 3 downto 0);
+    chnl_read    : in  std_logic_vector( 6 downto 0);
+    FPGA_write   : in  std_logic_vector( 3 downto 0);
+    chnl_write   : in  std_logic_vector( 6 downto 0);
+    cal_cnt      : in  unsigned(19 downto 0);
+    DIN          : in  std_logic_vector(31 downto 0);
+    DIN_ready    : in  std_logic;
+    DIN_type     : in  std_logic_vector( 3 downto 0);
+    cal_cnt_out  : out unsigned(19 downto 0)--;
+    --DOUT       : out std_logic_vector(31 downto 0);
+    --DOUT_ready : out std_logic;
+    --DOUT_type  : out std_logic_vector( 3 downto 0)--;
+    --FPGA_out   : out std_logic_vector( 3 downto 0);
+    --CHNL_out   : out std_logic_vector( 6 downto 0)
+  );
+end cnt_val;
+
+architecture Behavioral of cnt_val is
+
+  signal cal_cnt_i      : std_logic_vector(19 downto 0) :=x"00000";
+  signal Q_col, Q_col_r : std_logic_vector(20 downto 0) :='0' & x"00000";
+  signal Q_i1           : std_logic_vector(15 downto 0);
+
+  component RAM_pseudo_DP_wReg_36x1k is
+    port (
+      WrAddress : in  std_logic_vector(9 downto 0); 
+      RdAddress : in  std_logic_vector(9 downto 0); 
+      Data      : in  std_logic_vector(35 downto 0); 
+      WE        : in  std_logic; 
+      RdClock   : in  std_logic; 
+      RdClockEn : in  std_logic; 
+      Reset     : in  std_logic; 
+      WrClock   : in  std_logic; 
+      WrClockEn : in  std_logic; 
+      Q         : out std_logic_vector(35 downto 0)
+    );
+  end component RAM_pseudo_DP_wReg_36x1k;
+
+begin
+  
+  THE_EBR_curr : RAM_pseudo_DP_wReg_36x1k
+  port map (
+    WrAddress(9 downto 6) => FPGA_write,
+    WrAddress(5 downto 0) => chnl_write(5 downto 0),
+    RdAddress(9 downto 6) => FPGA_read,
+    RdAddress(5 downto 0) => chnl_read(5 downto 0),
+    Data(19 downto  0)    => std_logic_vector(cal_cnt),
+    Data(35 downto 20)    => (others => '0'),
+    WE                    => write, 
+    RdClock               => CLK, 
+    RdClockEn             => '1', 
+    Reset                 => RESET, 
+    WrClock               => CLK,
+    WrClockEn             => '1',
+    Q(35 downto 20)       => Q_i1, --F**king modelsim wants it like this
+    Q(19 downto  0)       => cal_cnt_i
+  );
+
+
+  mem : process (CLK)
+  begin
+  if rising_edge(CLK) then  
+    -- handle read/write on same Address;
+    -- delay of collision Output to sync with "normal" Q.
+    if (write = '1') and (FPGA_write = FPGA_read) and (chnl_write = chnl_read) then
+      Q_col(20)           <= '1';
+      Q_col(19 downto 0)  <= std_logic_vector(cal_cnt);
+    else   
+      Q_col <= '0' & x"00000";
+    end if;
+    -- selection between Q from collison or normal one
+    if (Q_col_r(20) = '1') then
+      cal_cnt_out <= unsigned(Q_col_r(19 downto 0));
+    else
+      cal_cnt_out <= unsigned(cal_cnt_i);
+    end if;
+    Q_col_r <= Q_col;
+  end if;
+  end process;
+end Behavioral;
+
+
diff --git a/combiner_cts/code_EBR/compare_old.vhd b/combiner_cts/code_EBR/compare_old.vhd
new file mode 100644 (file)
index 0000000..f5d7e5e
--- /dev/null
@@ -0,0 +1,58 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+library work;
+use work.trb_net_std.all;
+
+entity compare_old is
+  Port (
+    CLK        : in  std_logic;
+    DIN        : in  std_logic_vector(31 downto 0);
+    DIN_ready  : in  std_logic;
+    DIN_type   : in  std_logic_vector( 3 downto 0);
+    FPGA_in    : in  std_Logic_vector( 3 downto 0);
+    CHNL_in    : in  std_logic_vector( 6 downto 0);
+    Do_Cal_in  : in  std_Logic;
+    CHNL_out   : out std_logic_vector( 6 downto 0);
+    FPGA_out   : out std_logic_vector( 3 downto 0);
+    DOUT       : out std_logic_vector(31 downto 0);
+    DOUT_ready : out std_logic;
+    DOUT_type  : out std_logic_vector( 3 downto 0);
+    Do_Cal_out : out std_logic;
+    read       : out std_logic
+  );
+end compare_old;
+
+architecture Behavioral of compare_old is
+
+  signal FPGA_i : std_logic_vector( 3 downto 0):="0001";
+  signal CHNL_i : std_logic_vector( 6 downto 0);
+  
+begin
+
+  rd_cnt : process(CLK)
+  begin
+    if rising_edge(CLK) then  
+      if (Do_Cal_in = '1') then
+        if (FPGA_in = FPGA_i) and (CHNL_in = CHNL_i) then  -- same channel and fpga as before, no need to reread
+          read     <= '0';
+          FPGA_out <= FPGA_i;
+          CHNL_out <= CHNL_i;
+        else        -- different fpga/channel -> read again!
+          read     <= '1';
+          FPGA_i   <= FPGA_in;
+          CHNL_i   <= CHNL_in;
+          FPGA_out <= FPGA_in;
+          CHNL_out <= CHNL_in;
+        end if;
+      else
+        read       <= '0';
+      end if;
+      --loop through entity
+      DOUT       <= DIN;
+      DOUT_ready <= DIN_ready;
+      DOUT_type  <= DIN_type;
+      Do_Cal_out <= Do_Cal_in;
+    end if;
+  end process;
+
+end Behavioral;
diff --git a/combiner_cts/code_EBR/default_val.vhd b/combiner_cts/code_EBR/default_val.vhd
new file mode 100644 (file)
index 0000000..7f416de
--- /dev/null
@@ -0,0 +1,35 @@
+library IEEE;\r
+use IEEE.STD_LOGIC_1164.ALL;\r
+use IEEE.NUMERIC_STD.ALL;\r
+\r
+entity dflt_val is\r
+       Port (       \r
+               CLK        : in  std_logic;\r
+               read       : in  std_logic;\r
+               FPGA_read  : in  std_logic_vector(3 downto 0);\r
+               chnl_read  : in  std_logic_vector(6 downto 0);\r
+               dflt_out   : out std_logic\r
+       );\r
+end dflt_val;\r
+\r
+architecture Behavioral of dflt_val is\r
+\r
+       type bit_2D is array (15 downto 0, 63 downto 0) of std_logic; --(channel)\r
+       signal dflt_i   : bit_2D := (others => (others => '1'));\r
+       signal start    : std_logic := '1';\r
+  \r
+begin\r
+\r
+       dflt_cnt : process (CLK)\r
+       begin\r
+       if rising_edge(CLK) then\r
+               if (read = '1') then --read\r
+                       dflt_out  <= dflt_i(to_integer(unsigned(FPGA_read)),to_integer(unsigned(chnl_read)));\r
+                       dflt_i(to_integer(unsigned(FPGA_read)),to_integer(unsigned(chnl_read))) <= '0';\r
+               else\r
+                       dflt_out  <= '0';\r
+               end if;\r
+       end if;\r
+       end process;\r
+       \r
+end Behavioral;\r
diff --git a/combiner_cts/code_EBR/file_output.vhd b/combiner_cts/code_EBR/file_output.vhd
new file mode 100644 (file)
index 0000000..faf379c
--- /dev/null
@@ -0,0 +1,32 @@
+        library ieee;
+use ieee.std_logic_1164.all;
+
+use std.textio.all;
+use work.txt_util.all;
+
+entity file_output is
+  generic (
+           log_file:       string  := "res.log"
+          );
+  port(
+       CLK              : in std_logic;
+       x1               : in std_logic_vector(31 downto 0);
+       x2               : in std_logic_vector(31 downto 0)
+      );
+end file_output;
+
+
+architecture log_to_file of file_output is
+
+      file l_file: TEXT open write_mode is log_file;
+
+begin
+
+write : process (CLK)
+begin
+   if rising_edge(CLK) then
+print(l_file, str(x1)& " "& str(x2));
+   end if;
+end process;
+
+end log_to_file;
diff --git a/combiner_cts/code_EBR/input_env.vhd b/combiner_cts/code_EBR/input_env.vhd
new file mode 100644 (file)
index 0000000..53e0aae
--- /dev/null
@@ -0,0 +1,56 @@
+library ieee;\r
+use ieee.std_logic_1164.all;\r
+use ieee.numeric_std.all;\r
+use std.textio.all;\r
+\r
+entity input_env is\r
+port (\r
+    CLK : in std_logic;\r
+   -- WEN : in std_logic;\r
+   -- REN : in std_logic;\r
+   -- WADD : in std_logic_vector(8 downto 0);\r
+   -- RADD : in std_logic_vector(8 downto 0);\r
+   -- DIN : in std_logic_vector(639 downto 0);\r
+    DOUT : out std_logic_vector(31 downto 0)\r
+);\r
+end input_env;\r
+\r
+architecture behavioral of input_env is\r
+    type input_type is array (0 to 5) of std_logic_vector (31 downto 0);\r
+    \r
+    impure function init_input (data_file_name : in string) return\r
+        input_type is\r
+            file data_file : text is in data_file_name;\r
+            variable data_line : line;\r
+            variable bit_word : bit_vector(31 downto 0);\r
+            variable input_i : input_type;\r
+    begin\r
+        for nline in input_type'range loop\r
+            readline(data_file, data_line);\r
+            read(data_line, bit_word);\r
+            input_i(nline) := to_stdlogicvector(bit_word);\r
+        end loop;\r
+        return input_i;\r
+    end function;\r
+\r
+    signal input : input_type := init_input("C:\Users\adria\Desktop\TRB\bits.dat");\r
+   \r
+begin\r
+    process (CLK)\r
+    variable position : integer range 0 to 200 := 0;\r
+    begin\r
+      if (CLK'event and CLK = '1') then\r
+        --if WEN = '1' then\r
+        --   input(to_integer(unsigned(WADD))) <= DIN;\r
+        --end if;\r
+        --if REN = '1' then\r
+        if position > 5 then\r
+            DOUT <= "00000000000000000000000000000000";\r
+        else \r
+            DOUT <= input(position);\r
+        end if;\r
+            position := position + 1;\r
+        --end if;\r
+      end if;\r
+    end process;\r
+end behavioral;
\ No newline at end of file
diff --git a/combiner_cts/code_EBR/read_Memory.vhd b/combiner_cts/code_EBR/read_Memory.vhd
new file mode 100644 (file)
index 0000000..c8983bc
--- /dev/null
@@ -0,0 +1,116 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+library work;
+use work.trb_net_std.all;
+
+entity read_Memory is
+    generic (
+       calibration_value_max : unsigned(19 downto 0):="11111111111111111111"
+    );
+    Port ( 
+        CLK             : in  std_logic;
+        DIN             : in  std_logic_vector(31 downto 0);
+        DIN_b_r                : in  std_logic;
+        DIN_data_w     : in  std_logic;
+        DIN_data_f     : in  std_logic;
+        FPGA_in         : in  std_logic_vector( 3 downto 0);
+        chnl_in         : in  std_logic_vector(6 downto 0);
+        cal_cnt         : in  unsigned(19 downto 0);
+        dflt_cnt        : in  std_logic;
+        write_cal_cnt   : out std_logic;
+        write_dflt_cnt  : out std_logic;
+        cal_cnt_out     : out unsigned(19 downto 0);
+        dflt_cnt_out    : out std_logic;
+        read_next       : out std_logic;
+        read_curr       : out std_logic;
+        Cal_chng_flag   : out std_logic;
+        do_cal          : out std_logic;
+        FPGA            : out std_logic_vector( 3 downto 0);
+        chnl            : out std_logic_vector( 6 downto 0);
+        DIN_out         : out std_logic_vector(31 downto 0);
+        DIN_out_b_r     : out std_logic;
+        DIN_out_data_w  : out std_logic;
+        DIN_out_data_f  : out std_logic;
+        Default_val     : out std_logic--;
+        --cal_cnt_dbug    : out unsigned(19 downto 0)
+    );
+end read_Memory;
+
+architecture Behavioral of read_Memory is
+ -- type unsigned_2D is array (3 downto 0,6 downto 0) of unsigned (7 downto 0); --(channel)
+  --type bit_2D is array (3 downto 0,6 downto 0) of std_logic; --(channel)
+  --signal cal_cnt   : unsigned_2D := (others => (others => "00000000"));
+  --signal FPGA_i    : std_logic_vector(3 downto 0);
+  --signal Default_val_i : bit_2D := (others => (others => '1'));
+  signal dflt_cnt_last : std_logic;
+begin
+
+   Start_Calib : process (CLK)
+   begin
+     if rising_edge(CLK) then
+         if DIN(31) = '1' then
+            dflt_cnt_last <= dflt_cnt;
+            --Do  Calibration
+            do_cal <= '1';
+            
+            if cal_cnt = to_unsigned(0,20) then
+                --lese Wert aus Mem_next
+                if dflt_cnt = '1' then
+                    Cal_chng_flag <= '0';
+                    read_curr <= '0';
+                    write_dflt_cnt <= '1'; -- gebe dflt_cnt auch die neue /alte adresse (FPGA und channel)
+                    dflt_cnt_out <= '0';
+                    Default_val <='1';
+                else
+                  if dflt_cnt_last = '0' then
+                    write_dflt_cnt <= '0';
+                    Cal_chng_flag <= '1';
+                  end if;
+                    Default_val <='0';
+                    read_curr <= '1';
+                end if;
+                read_next <= '1';
+                cal_cnt_out <= cal_cnt + 1 ;
+            elsif cal_cnt < calibration_value_max then
+                Default_val <='0';
+                Cal_chng_flag <= '0';
+                read_next <= '1';
+                read_curr <= '1';
+                cal_cnt_out <= cal_cnt + 1 ;
+                write_dflt_cnt <= '0';
+            else
+                Default_val <= '0';
+                Cal_chng_flag <= '0';
+                read_next <= '1';
+                read_curr <= '1';
+                cal_cnt_out <= to_unsigned(0,20);--(others => '0');--"00000000000000000000";
+                write_dflt_cnt <= '1';
+                dflt_cnt_out <= '0';
+            end if;
+            write_cal_cnt <= '1';
+            chnl <= DIN(28 downto 22);
+            
+         else -- DIN(31) = '0' -> no TDC
+             write_dflt_cnt <= '0';
+             do_cal  <= '0';
+             read_next <= '0';
+             read_curr <= '0';
+             --FPGA_i  <= DIN( 3 downto 0);
+             write_cal_cnt <= '0';    
+             Default_val <='0';  
+             Cal_chng_flag <= '0';
+         end if;--DIN(31)
+         
+         DIN_out        <= DIN;
+         DIN_out_b_r    <= DIN_b_r;
+         DIN_out_data_w         <= DIN_data_w;
+         DIN_out_data_f  <= DIN_data_f;
+         
+         FPGA <= FPGA_in;
+     end if; --rising_edge
+   end process;
+   
+   
+ --FPGA <= FPGA_i;
+end Behavioral;
diff --git a/combiner_cts/code_EBR/read_cnt.vhd b/combiner_cts/code_EBR/read_cnt.vhd
new file mode 100644 (file)
index 0000000..1d459ec
--- /dev/null
@@ -0,0 +1,152 @@
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+use IEEE.NUMERIC_STD.ALL;
+library work;
+use work.trb_net_std.all;
+
+entity read_cnt is
+  generic (
+    USE_STAT_BITS     : integer range 0 to 1 := c_NO;
+    USE_DATA_WRITE    : integer range 0 to 1 := c_NO;
+    USE_DATA_FINISHED : integer range 0 to 1 := c_NO; 
+    USE_BUSY_RELEASE  : integer range 0 to 1 := c_NO );
+  port ( 
+    CLK           : in  std_logic;
+    RESET         : in  std_logic;
+    BUS_stp_Lmt   : in  std_logic;
+    BUS_Trig_type : in  std_logic_vector( 3 downto 0);
+    DIN           : in  std_logic_vector(31 downto 0);
+    DIN_ready     : in  std_logic;
+    DIN_type      : in  std_logic_vector( 3 downto 0);
+    FPGA_in       : in  std_logic_vector(15 downto 0);
+    Trigger_type  : in  std_logic_vector( 3 downto 0);
+    DIN_info                   : in  std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+    chnl          : out std_logic_vector( 6 downto 0);
+    FPGA_out      : out std_logic_vector( 3 downto 0);
+    DOUT          : out std_logic_vector(31 downto 0);
+    DOUT_ready    : out std_logic;
+    DOUT_type     : out std_logic_vector( 3 downto 0);
+    Do_Cal        : out std_logic;
+    FPGA_cnt_mntr : out std_logic_vector( 3 downto 0);
+    FPGA_mntr     : out std_logic_vector(15 downto 0);
+    stop_Limit    : out std_logic;
+    DOUT_info                  : out std_logic_vector(( 31*USE_STAT_BITS + USE_DATA_WRITE + USE_DATA_FINISHED + USE_BUSY_RELEASE) downto 0);
+    ch0_onoff     : in std_logic_vector(15 downto 0)
+  );
+end read_cnt;
+
+architecture Behavioral of read_cnt is
+
+  type    t_Fpga is array (0 to 15) of std_logic_vector(15 downto 0);
+  signal  FPGA_num  : t_Fpga := (others => (others => '0'));
+  signal  cnt       : integer range 0 to 15 := 0;
+  signal  FPGA_i    : integer range 0 to 15 := 0;
+  signal  trig_type : std_logic_vector(3 downto 0);
+
+begin
+  
+  rd_cnt : process(CLK)
+  begin
+  --ToDO:
+  -- * Find Triger=0xD (or what is set?)
+  -- * Only do Limits with Trig D // or dedicated trigger
+  -- * deactivate complete limit generation 
+  
+  if rising_edge(CLK) then
+    stop_Limit <= '1';
+    if (DIN(31) = '1') and (DIN_type = x"4") and (DIN_ready = '1') then -- real TDC_Data
+    --Trigger_type
+      chnl      <= DIN(28 downto 22);
+      FPGA_out  <= std_logic_vector(to_unsigned(FPGA_i,4));
+      if DIN(21 downto 12) /= "1111111111" then
+        Do_Cal  <= '1';
+        if ((Trigger_type = BUS_Trig_type ) or (BUS_Trig_type = "0000")) then
+          stop_Limit <= BUS_stp_Lmt;
+        end if;
+        if (DIN(28 downto 22) = "0000000") and (ch0_onoff(FPGA_i) = '0') then
+          Do_Cal <= '0';
+        end if;
+      else
+        Do_Cal  <= '0';
+      end if;
+    else
+      Do_Cal    <= '0';
+    end if;
+    DOUT        <= DIN;
+    DOUT_ready  <= DIN_ready;
+    DOUT_type   <= DIN_type;
+    DOUT_info    <= DIN_info;
+  end if;
+  end process;
+
+
+  THE_FPGA_num : process(CLK)
+  variable position : std_logic_vector( 3 downto 0);
+  variable save     : std_logic_vector(11 downto 0) := X"000";
+  begin
+  position := x"f";
+  
+  if rising_edge(CLK) then
+    if RESET = '1' then
+      cnt <= 0;
+    else
+      if DIN_ready = '1' then
+        for i in 0 to 11 loop
+          if FPGA_in = FPGA_num(i) then
+            save(i) := '1';
+          else
+            save(i) := '0';
+          end if;
+        end loop;
+        
+        if save(11 downto 4) = x"00" then
+          if save(3 downto 0) = x"0" then
+            FPGA_i <= cnt;
+            FPGA_num(cnt) <= FPGA_in;
+            cnt <= cnt + 1;
+          elsif save(0) = '1' then
+            FPGA_i <= 0;
+          elsif save(1) = '1' then
+            FPGA_i <= 1;
+          elsif save(2) = '1' then
+            FPGA_i <= 2;
+          elsif save(3) = '1' then
+            FPGA_i <= 3;
+          else
+          --ERROR
+          end if;
+        elsif save(11 downto 8) = x"0" and save(3 downto 0) = x"0" then
+          if save(4) = '1' then
+            FPGA_i <= 4;
+          elsif save(5) = '1' then
+            FPGA_i <= 5;
+          elsif save(6) = '1' then
+            FPGA_i <= 6;
+          elsif save(7) = '1' then
+            FPGA_i <= 7;
+          else
+          --ERROR
+          end if;
+        elsif save(7 downto 0) = x"00" then
+          if save(8) = '1' then
+            FPGA_i <= 8;
+          elsif save(9) = '1' then
+            FPGA_i <= 9;
+          elsif save(10) = '1' then
+            FPGA_i <= 10;
+          elsif save(11) = '1' then
+            FPGA_i <= 11;
+          else
+          --ERROR
+          end if;
+        else
+        --ERROR
+        end if;
+      end if;
+    end if;
+    FPGA_mntr     <= FPGA_num(FPGA_i);
+    FPGA_cnt_mntr <= std_logic_vector(to_unsigned(FPGA_i,4));
+  end if;  
+  end process;
+  
+end Behavioral;
\ No newline at end of file
diff --git a/combiner_cts/code_EBR/sim_tb.vhd b/combiner_cts/code_EBR/sim_tb.vhd
new file mode 100644 (file)
index 0000000..101bc33
--- /dev/null
@@ -0,0 +1,196 @@
+----------------------------------------------------------------------------------
+-- Company: 
+-- Engineer: 
+-- 
+-- Create Date: 05.01.2017 14:31:03
+-- Design Name: 
+-- Module Name: sim_tb - Behavioral
+-- Project Name: 
+-- Target Devices: 
+-- Tool Versions: 
+-- Description: 
+-- 
+-- Dependencies: 
+-- 
+-- Revision:
+-- Revision 0.01 - File Created
+-- Additional Comments:
+-- 
+----------------------------------------------------------------------------------
+
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.ALL;
+library work;
+use work.trb_net_std.all;
+-- Uncomment the following library declaration if using
+-- arithmetic functions with Signed or Unsigned values
+use IEEE.NUMERIC_STD.ALL;
+
+-- Uncomment the following library declaration if instantiating
+-- any Xilinx primitives in this code.
+--library UNISIM;
+--use UNISIM.VComponents.all;
+
+entity sim_tb is
+end sim_tb;
+
+architecture Behavioral of sim_tb is
+signal CLK,CLK_inv, Flag_Lim, Flag_LUT: std_logic := '0';
+signal DIN_i, DOUT_i : std_logic_vector(31 downto 0);
+signal DIN_out_end: std_logic_vector(31 downto 0) := (others => '0');
+signal Fine, Delta, min_Cal : std_logic_vector(9 downto 0);
+signal DIN_out_Lim, DIN_out_LUT : std_logic_vector(31 downto 0);
+signal cal_cntread_compare_old : unsigned(19 downto 0);
+signal min_curr_dbg, max_curr_dbg, min_next_dbg, max_next_dbg : std_logic_vector(9 downto 0);
+signal read_next_dbg,write_next_dbg,Default_val_dbg,write_curr_dbg : std_logic;
+signal FPGA_dbg : std_logic_vector(3 downto 0);
+signal wrt_cal_cnt_dbg,write_dflt_cnt_dbg : std_logic;
+signal cal_cnt : unsigned(19 downto 0);
+--signal cal_cng_dbg, Dflt_cnt_dbg : std_logic;
+
+constant CLK_PERIOD : time := 20 ns;
+
+signal BUS_RX : CTRLBUS_RX;
+
+begin
+--Input : entity work.input_env
+--    port map(
+--        CLK => CLK,
+--        DOUT => DIN_i
+--    ); 
+
+   Calibration : entity work.tdc_calibration
+    port map(
+        CLK  => CLK,
+        CLK_inv  => CLK_inv,
+        DIN  => DIN_i,
+        DOUT => DOUT_i,
+                   RESET       => '0',
+        DIN_TYPE => x"4",
+                   DIN_READY           => '1',
+                   DIN_STAT            => x"11111111",
+                   FPGA_in             => x"156d",
+                   DOUT_TYPE           => open,
+                   DOUT_READY  => open,
+                   DOUT_STAT           => open,
+        BUS_RX  => BUS_RX,
+        BUS_TX  => open
+        --Temp => temp,
+--         Fine => Fine,
+--         Delta => Delta,
+--         Min_Cal => min_Cal,
+--         Flag_Lim => Flag_Lim,
+--         Flag_LUT => Flag_LUT,
+--         DIN_out_Lim => DIN_out_Lim,
+--         DIN_out_LUT => DIN_out_LUT,
+--         cal_cnt_dbug => cal_cnt,
+--         min_next_dbg => min_next_dbg,
+--         max_next_dbg => max_next_dbg,
+--         min_curr_dbg => min_curr_dbg,
+--         max_curr_dbg => max_curr_dbg,
+--         --cal_cng_dbg => cal_cng_dbg,
+--         read_next_dbg => read_next_dbg,
+--         write_next_dbg => write_next_dbg,
+--         FPGA_dbg => FPGA_dbg,
+--         DIN_out_end => DIN_out_end,
+--         --Dflt_cnt_dbg => Dflt_cnt_dbg,
+--         Default_val_dbg => Default_val_dbg,
+--         write_curr_dbg => write_curr_dbg,
+--         wrt_cal_cnt_dbg => wrt_cal_cnt_dbg,
+--         write_dflt_cnt_dbg => write_dflt_cnt_dbg
+    ); 
+    
+    write : entity work.file_output
+       port map(
+            CLK => CLK,
+            x1 => DIN_out_end,
+            x2 => DOUT_i
+       ); 
+    
+
+  CLK_PROC : process is
+  begin
+     CLK <= '1';
+     CLK_inv <= '0';
+     wait for CLK_PERIOD / 2;
+     CLK_inv <= '1';
+     CLK <= '0';
+     wait for CLK_PERIOD / 2;
+  end process;
+  
+  
+  proc_Cal : process is
+    begin
+      wait for 5 ns;
+      
+      DIN_i <= b"0000000110_0000000000000000000001";
+      wait for 20 ns;
+      DIN_i <= b"1000000110_0000100001_000000000000"; --33
+      wait for 20 ns;
+      DIN_i <= b"1000000110_0000100111_000000000001"; --39
+      wait for 20 ns;
+      DIN_i <= b"1000000000_0001000010_000000000010"; --66
+      wait for 20 ns;
+      DIN_i <= b"1000000000_0000000011_000000000011"; --3
+      wait for 20 ns;
+      DIN_i <= b"1000000000_1000001100_000000000001"; --524
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000010";
+      --wait for 20 ns;
+      DIN_i <= b"1000000000_0000000100_000000000100";--4
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000001";
+      --wait for 20 ns;
+      --DIN_i.data <= "10000000000111000000000000000000";
+      --wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000001";
+      --wait for 20 ns;
+      DIN_i <= b"1000000000_0000000001_000000000001";--1
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000001";
+      --wait for 20 ns;
+      DIN_i <= b"1000000000_0000000010000000000010";--2
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000001";
+      --wait for 20 ns;
+      DIN_i <= b"1000000000_1000001010000000000011";--3
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000001";
+      --wait for 20 ns;
+      DIN_i <= b"1000000000_0000001010000000000100";--4
+      wait for 20 ns;
+      DIN_i <= b"1000000110_0000001110000000000101";--5
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000001";
+      --wait for 20 ns;
+      DIN_i <= "10000000000000000110000000000110";--6
+      wait for 20 ns;
+      DIN_i <= "10000000000000000111000000000111";--7
+      wait for 20 ns;
+      DIN_i <= "10000000000000001000000000000111";--8
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000010";
+      --wait for 20 ns;
+      DIN_i <= "10000001100000001001000000000111";--9
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000001";
+      --wait for 20 ns;
+      DIN_i <= "10000000000000001010000000000111";--10
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000010";
+      --wait for 20 ns;
+      DIN_i <= "10000001100000001011000000000111";--11
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000001";
+      --wait for 20 ns;
+      DIN_i <= "10000000000000001100000000000111";--12
+      wait for 20 ns;
+      --DIN_i.data <= "00000000000000000000000000000010";
+      --wait for 20 ns;
+      DIN_i <= "10000001100000001101000000000111";--13
+      wait for 20 ns;
+    end process;
+
+
+end Behavioral;
\ No newline at end of file
diff --git a/combiner_cts/code_EBR/transcript b/combiner_cts/code_EBR/transcript
new file mode 100644 (file)
index 0000000..37ed869
--- /dev/null
@@ -0,0 +1,22524 @@
+# //  Questa Sim
+# //  Version 10.2c_5 linux Nov 19 2013
+# //
+# //  Copyright 1991-2013 Mentor Graphics Corporation
+# //  All Rights Reserved.
+# //
+# //  THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION
+# //  WHICH IS THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS
+# //  LICENSORS AND IS SUBJECT TO LICENSE TERMS.
+# //
+vlib work
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# ** Error: (vcom-11) Could not find work.trb_net_std.
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(5): (vcom-1195) Cannot find expanded name "work.trb_net_std".
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(5): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(7): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# ** Error: (vcom-11) Could not find work.trb_net_std.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(25): (vcom-1195) Cannot find expanded name "work.trb_net_std".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(25): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(27): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Delta.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Compiling entity Delta
+# ** Error: /home/adrian/TDC_v4/Delta.vhd(35): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/file_output.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# ** Error: (vcom-11) Could not find work.txt_util.
+# ** Error: /home/adrian/TDC_v4/file_output.vhd(5): (vcom-1195) Cannot find expanded name "work.txt_util".
+# ** Error: /home/adrian/TDC_v4/file_output.vhd(5): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/file_output.vhd(7): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/input_env.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity input_env
+# -- Compiling architecture behavioral of input_env
+# ** Warning: /home/adrian/TDC_v4/input_env.vhd(23): (vcom-1194) FILE declaration was written using VHDL 1987 syntax.
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/LUT.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# ** Error: (vcom-11) Could not find work.trb_net_std.
+# ** Error: /home/adrian/TDC_v4/LUT.vhd(5): (vcom-1195) Cannot find expanded name "work.trb_net_std".
+# ** Error: /home/adrian/TDC_v4/LUT.vhd(5): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/LUT.vhd(7): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# ** Error: (vcom-11) Could not find work.trb_net_std.
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(4): (vcom-1195) Cannot find expanded name "work.trb_net_std".
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(4): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(6): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# ** Error: (vcom-11) Could not find work.trb_net_std.
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(5): (vcom-1195) Cannot find expanded name "work.trb_net_std".
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(5): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(7): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# ** Error: (vcom-11) Could not find work.trb_net_std.
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(25): (vcom-1195) Cannot find expanded name "work.trb_net_std".
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(25): Unknown expanded name.
+# -- Loading package NUMERIC_STD
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(35): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/trb_net_std.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Compiling package trb_net_std
+# -- Compiling package body trb_net_std
+# -- Loading package trb_net_std
+vcom -reportprogress 30 -work work /home/adrian/TDC_v4/txt_util.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Compiling package txt_util
+# -- Compiling package body txt_util
+# -- Loading package txt_util
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(49): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# ** Error: (vcom-11) Could not find work.calibration.
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(58): (vcom-1195) Cannot find expanded name "work.Calibration".
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(58): Unknown expanded name.
+# ** Error: (vcom-11) Could not find work.file_output.
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(86): (vcom-1195) Cannot find expanded name "work.file_output".
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(86): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(153): VHDL Compiler exiting
+vsim -voptargs=+acc work.sim_tb
+# vsim -voptargs=+acc work.sim_tb 
+# ** Note: (vsim-3812) Design is being optimized...
+# ** Error: Failed to find design unit work.sim_tb.
+# Optimization failed
+# Error loading design
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# ** Error: (vcom-11) Could not find work.read_cnt.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(161): (vcom-1195) Cannot find expanded name "work.read_cnt".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(161): Unknown expanded name.
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# ** Error: (vcom-11) Could not find work.read_memory.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(206): (vcom-1195) Cannot find expanded name "work.read_Memory".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(206): Unknown expanded name.
+# -- Loading entity Memory
+# ** Error: (vcom-11) Could not find work.cal_limits.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(273): (vcom-1195) Cannot find expanded name "work.Cal_Limits".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(273): Unknown expanded name.
+# ** Error: (vcom-11) Could not find work.lut.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(307): (vcom-1195) Cannot find expanded name "work.LUT".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(307): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(400): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/trb_net_std.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Compiling package trb_net_std
+# -- Compiling package body trb_net_std
+# -- Loading package trb_net_std
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/txt_util.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Compiling package txt_util
+# -- Compiling package body txt_util
+# -- Loading package txt_util
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/input_env.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity input_env
+# -- Compiling architecture behavioral of input_env
+# ** Warning: /home/adrian/TDC_v4/input_env.vhd(23): (vcom-1194) FILE declaration was written using VHDL 1987 syntax.
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/file_output.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package txt_util
+# -- Compiling entity file_output
+# -- Compiling architecture log_to_file of file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Delta.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Compiling entity Delta
+# ** Error: /home/adrian/TDC_v4/Delta.vhd(35): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# ** Error: (vcom-11) Could not find work.lut.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(307): (vcom-1195) Cannot find expanded name "work.LUT".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(307): Unknown expanded name.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(400): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/LUT.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity LUT
+# -- Compiling architecture lut of LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(49): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vsim -voptargs=+acc work.sim_tb
+# vsim -voptargs=+acc work.sim_tb 
+# ** Note: (vsim-3812) Design is being optimized...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+add wave  \
+sim:/sim_tb/Flag_Lim
+add wave -position insertpoint  \
+sim:/sim_tb/DIN_i
+restart
+add wave -position insertpoint  \
+sim:/sim_tb/DOUT_i
+add wave -position insertpoint  \
+sim:/sim_tb/DIN_out_end
+add wave -position insertpoint  \
+sim:/sim_tb/Fine
+restart
+add wave -position insertpoint  \
+sim:/sim_tb/DIN_i.data
+vsim -voptargs=+acc work.sim_tb
+# vsim -voptargs=+acc work.sim_tb 
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+add wave -position insertpoint  \
+sim:/sim_tb/CLK
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(49): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+vsim -voptargs=+acc work.sim_tb
+# vsim -voptargs=+acc work.sim_tb 
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.sim_tb(behavioral)#1
+add wave -position insertpoint  \
+sim:/sim_tb/CLK
+restart
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(49): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.sim_tb(behavioral)#1
+run
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(49): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(49): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+add wave -position end  sim:/sim_tb/CLK
+add wave -position end  sim:/sim_tb/DIN_i
+add wave -position end  sim:/sim_tb/DOUT_i
+add wave -position end  sim:/sim_tb/DIN_out_end
+add wave -position end  sim:/sim_tb/Fine
+add wave -position end  sim:/sim_tb/Delta
+add wave -position end  sim:/sim_tb/min_Cal
+run
+run
+run
+run
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+add wave -position 1  sim:/sim_tb/DIN_i.data
+add wave -position 2  sim:/sim_tb/DOUT_i.data
+add wave -position end  sim:/sim_tb/cal_cnt
+add wave -position end  sim:/sim_tb/min_curr_dbg
+add wave -position end  sim:/sim_tb/max_curr_dbg
+add wave -position end  sim:/sim_tb/min_next_dbg
+add wave -position end  sim:/sim_tb/max_next_dbg
+add wave -position end  sim:/sim_tb/cal_cng_dbg
+add wave -position end  sim:/sim_tb/read_next_dbg
+add wave -position end  sim:/sim_tb/write_next_dbg
+add wave -position end  sim:/sim_tb/Dflt_cnt_dbg
+add wave -position end  sim:/sim_tb/Default_val_dbg
+add wave -position end  sim:/sim_tb/write_curr_dbg
+add wave -position end  sim:/sim_tb/FPGA_dbg
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+run
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 620 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 620 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 620 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(59): near "begin": expecting STRING or IDENTIFIER or << or '('
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(63): Illegal concurrent statement.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(64): Illegal concurrent statement.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(65): (vcom-1136) Unknown identifier "a".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(65): Illegal concurrent statement.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(65): Target type (error) in variable assignment is different from expression type ieee.NUMERIC_STD.UNRESOLVED_UNSIGNED.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(65): (vcom-1136) Unknown identifier "a".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(66): (vcom-1136) Unknown identifier "a".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(66): Bad expression in right operand of infix expression "and".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(66): Type error resolving infix expression "and" as type std.STANDARD.BOOLEAN.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(66): Illegal concurrent statement.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(70): (vcom-1136) Unknown identifier "a".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(76): Illegal concurrent statement.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(84): near "process": expecting ';'
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(82): near "if": expecting PROCESS
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(102): Cannot drive signal 'cal_cnt' of mode IN.
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(102): Enumeration literal '0' is not of type ieee.NUMERIC_STD.UNSIGNED.
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(118): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(49): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(88): near "write_dflt_cnt": expecting ';'
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(119): VHDL Compiler exiting
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(88): near "write_dflt_cnt": expecting ';'
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(117): Cannot read output "cal_cnt_out".
+#      VHDL 2008 allows reading outputs.
+#      This facility is enabled by compiling with -2008.
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(118): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(117): Cannot read output "cal_cnt_out".
+#      VHDL 2008 allows reading outputs.
+#      This facility is enabled by compiling with -2008.
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(118): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(49): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# ** Error: /home/adrian/TDC_v4/read_Memory.vhd(37): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+run
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+add wave -position end  sim:/sim_tb/wrt_cal_cnt_dbg
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/read_Memory
+# ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(94): near "if": expecting PROCESS
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cnt_val has changed.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(192): (vopt-1035) Formal port "DIN_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(192): (vopt-1035) Formal port "DIN_in_b_r" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(192): (vopt-1035) Formal port "DIN_in_data_w" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(192): (vopt-1035) Formal port "DIN_in_data_f" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(255): (vopt-1035) Formal port "DIN_data" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(255): (vopt-1035) Formal port "DIN_b_r" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(255): (vopt-1035) Formal port "DIN_data_w" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(255): (vopt-1035) Formal port "DIN_data_f" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(272): (vopt-1035) Formal port "DIN_data" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(272): (vopt-1035) Formal port "DIN_b_r" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(272): (vopt-1035) Formal port "DIN_data_w" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(272): (vopt-1035) Formal port "DIN_data_f" has OPEN or no actual associated with it.
+# Optimization failed
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(298): near "DIN_data": expecting ',' or ')'
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(308): Statement cannot be labeled.
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(436): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity read_Memory
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+# Break key hit 
+vsim -voptargs=+acc work.sim_tb
+# vsim -voptargs=+acc work.sim_tb 
+# ** Note: (vsim-3812) Design is being optimized...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Loading work.read_cnt(behavioral)#1
+# Loading work.cnt_val(behavioral)#1
+# Loading work.dflt_val(behavioral)#1
+# Loading work.read_memory(behavioral)#1
+# Loading work.memory(behavioral)#1
+# Loading work.cal_limits(behavioral)#1
+# Loading work.lut(lut)#1
+# Loading work.file_output(log_to_file)#1
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 2 is out of range 436 to 563.
+#    Time: 540 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+# Optimization canceled
+add wave -position insertpoint  \
+sim:/sim_tb/Calibration/LUTs/CLK
+add wave -position end  sim:/sim_tb/Calibration/LUTs/DIN_in
+add wave -position end  sim:/sim_tb/Calibration/LUTs/Delta
+add wave -position end  sim:/sim_tb/Calibration/LUTs/min_in
+add wave -position end  sim:/sim_tb/Calibration/LUTs/DIN_in
+add wave -position end  sim:/sim_tb/Calibration/LUTs/max_in
+add wave -position end  sim:/sim_tb/Calibration/LUTs/do_cal_in
+vsim -voptargs=+acc work.sim_tb
+# vsim work.sim_tb 
+# ** Note: (vsim-3812) Design is being optimized...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+add wave -position insertpoint  \
+sim:/sim_tb/CLK
+add wave -position end  sim:/sim_tb/DIN_i.data
+add wave -position end  sim:/sim_tb/Default_val_dbg
+add wave -position end  sim:/sim_tb/Dflt_cnt_dbg
+add wave -position end  sim:/sim_tb/FPGA_dbg
+add wave -position end  sim:/sim_tb/Fine
+add wave -position end  sim:/sim_tb/cal_cnt
+add wave -position end  sim:/sim_tb/cal_cng_dbg
+add wave -position end  sim:/sim_tb/wrt_cal_cnt_dbg
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 2 is out of range 436 to 563.
+#    Time: 540 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+run
+# Cannot continue because of fatal error.
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+# Can't move the Now cursor.
+add wave -position end  sim:/sim_tb/max_curr_dbg
+add wave -position end  sim:/sim_tb/max_next_dbg
+add wave -position end  sim:/sim_tb/min_curr_dbg
+add wave -position end  sim:/sim_tb/min_next_dbg
+add wave -position end  sim:/sim_tb/read_next_dbg
+add wave -position end  sim:/sim_tb/write_curr_dbg
+add wave -position end  sim:/sim_tb/write_next_dbg
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 2 is out of range 436 to 563.
+#    Time: 540 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 5  sim:/sim_tb/min_Cal
+add wave -position 3  sim:/sim_tb/Delta
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 2 is out of range 436 to 563.
+#    Time: 540 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(34): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(34): (vcom-1136) Unknown identifier "chnl".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(35): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(35): (vcom-1136) Unknown identifier "read_cal_cnt".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(36): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(36): (vcom-1136) Unknown identifier "read_dflt_cnt".
+# ** Warning: /home/adrian/TDC_v4/compare_old.vhd(38): (vcom-1083) Implicit array operator "=" always returns FALSE (left length 10 is not equal to right length 12).
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(39): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(39): (vcom-1136) Unknown identifier "Do_Cal".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(41): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(41): (vcom-1136) Unknown identifier "Do_Cal".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(45): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(45): (vcom-1136) Unknown identifier "read_cal_cnt".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(46): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(46): (vcom-1136) Unknown identifier "read_dflt_cnt".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(47): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(47): (vcom-1136) Unknown identifier "Do_Cal".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(56): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(35): No feasible entries for infix operator "=".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(35): Bad expression in left operand of infix expression "and".
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(35): Type error resolving infix expression "and" as type std.STANDARD.BOOLEAN.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(39): Signal "FPGA_in" is type ieee.std_logic_1164.STD_LOGIC; expecting type ieee.std_logic_1164.STD_LOGIC_VECTOR.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(48): Signal "FPGA_in" is type ieee.std_logic_1164.STD_LOGIC; expecting type ieee.std_logic_1164.STD_LOGIC_VECTOR.
+# ** Error: /home/adrian/TDC_v4/compare_old.vhd(54): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(74): Target of signal assignment is not a signal.
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(75): Target of signal assignment is not a signal.
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(82): Signal "Min" is type ieee.std_logic_1164.STD_LOGIC_VECTOR; expecting type std.STANDARD.BOOLEAN.
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(82): near "!": expecting GENERATE or THEN
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(86): Signal "Max" is type ieee.std_logic_1164.STD_LOGIC_VECTOR; expecting type std.STANDARD.BOOLEAN.
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(86): near "!": expecting GENERATE or THEN
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(96): near "if": expecting ';'
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(82): Signal "Min" is type ieee.std_logic_1164.STD_LOGIC_VECTOR; expecting type std.STANDARD.BOOLEAN.
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(82): near "!": expecting GENERATE or THEN
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(86): Signal "Max" is type ieee.std_logic_1164.STD_LOGIC_VECTOR; expecting type std.STANDARD.BOOLEAN.
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(86): near "!": expecting GENERATE or THEN
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(96): near "if": expecting ';'
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(64): Variable declaration 'Max_var' not allowed in this region.
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(65): Variable declaration 'Min_var' not allowed in this region.
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(99): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(70): (vcom-1136) Unknown identifier "cal_cnt_i".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(76): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(76): (vcom-1136) Unknown identifier "cal_cnt_i".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(91): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(70): (vcom-1136) Unknown identifier "cal_cnt_i".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(76): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(76): (vcom-1136) Unknown identifier "cal_cnt_i".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(91): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(70): (vcom-1136) Unknown identifier "cal_cnt_i".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(76): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(76): (vcom-1136) Unknown identifier "cal_cnt_i".
+# ** Error: /home/adrian/TDC_v4/cnt_val.vhd(91): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(146): No feasible entries for infix operator "/=".
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(146): Type error resolving infix expression "/=" as type std.STANDARD.BOOLEAN.
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(229): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+# ** Error: /home/adrian/TDC_v4/default_val.vhd(60): near "end": expecting ';'
+# ** Error: /home/adrian/TDC_v4/default_val.vhd(67): near "process": expecting IF
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Delta.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Compiling entity Delta
+# ** Error: /home/adrian/TDC_v4/Delta.vhd(35): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(60): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# ** Error: /home/adrian/TDC_v4/Memory.vhd(60): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(21): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(21): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Warning: /home/adrian/TDC_v4/read_cnt.vhd(36): (vcom-1083) Implicit array operator "=" always returns FALSE (left length 10 is not equal to right length 12).
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(43): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(43): (vcom-1136) Unknown identifier "read_cal_cnt".
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(44): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(44): (vcom-1136) Unknown identifier "read_dflt_cnt".
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(54): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Warning: /home/adrian/TDC_v4/read_cnt.vhd(36): (vcom-1083) Implicit array operator "=" always returns FALSE (left length 10 is not equal to right length 12).
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(43): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(43): (vcom-1136) Unknown identifier "read_cal_cnt".
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(44): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(44): (vcom-1136) Unknown identifier "read_dflt_cnt".
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(54): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Warning: /home/adrian/TDC_v4/read_cnt.vhd(36): (vcom-1083) Implicit array operator "=" always returns FALSE (left length 10 is not equal to right length 12).
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(43): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(43): (vcom-1136) Unknown identifier "read_cal_cnt".
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(44): Illegal target for signal assignment.
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(44): (vcom-1136) Unknown identifier "read_dflt_cnt".
+# ** Error: /home/adrian/TDC_v4/read_cnt.vhd(54): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Warning: /home/adrian/TDC_v4/read_cnt.vhd(36): (vcom-1083) Implicit array operator "=" always returns FALSE (left length 10 is not equal to right length 12).
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Warning: /home/adrian/TDC_v4/read_cnt.vhd(36): (vcom-1083) Implicit array operator "=" always returns FALSE (left length 10 is not equal to right length 12).
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Warning: /home/adrian/TDC_v4/read_cnt.vhd(36): (vcom-1083) Implicit array operator "=" always returns FALSE (left length 10 is not equal to right length 12).
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/LUT.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity LUT
+# -- Compiling architecture lut of LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/LUT.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity LUT
+# -- Compiling architecture lut of LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# ** Error: (vcom-11) Could not find work.compare_old.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(211): (vcom-1195) Cannot find expanded name "work.compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(211): Unknown expanded name.
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(263): (vcom-1484) Unknown formal identifier "dflt".
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# ** Error: (vcom-11) Could not find work.compare_old.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(211): (vcom-1195) Cannot find expanded name "work.compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(211): Unknown expanded name.
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(263): (vcom-1484) Unknown formal identifier "dflt".
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# ** Error: (vcom-11) Could not find work.compare_old.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(211): (vcom-1195) Cannot find expanded name "work.compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(211): Unknown expanded name.
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(263): (vcom-1484) Unknown formal identifier "dflt".
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity compare_old
+# -- Compiling architecture Behavioral of compare_old
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity compare_old
+# -- Compiling architecture Behavioral of compare_old
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(263): (vcom-1484) Unknown formal identifier "dflt".
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(315): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): near "DIN_out_b_r__compare": Identifier may not contain adjacent underlines.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(343): (vcom-1136) Unknown identifier "DIN_out_b_r__compare_old".
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(393): (vcom-1031) Formal generic "cal_Limit" has OPEN or no actual associated with it.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(489): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(10): near ")": expecting FUNCTION or PROCEDURE or IMPURE or PURE
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(10): near ")": expecting FUNCTION or PROCEDURE or IMPURE or PURE
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "CLK" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "DIN_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "DIN_in_b_r" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "DIN_in_data_w" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "DIN_in_data_f" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "min_curr_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "max_curr_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "min_next_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "max_next_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "FPGA" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "chnl" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "Do_Cal_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "default_val_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "chnl_cnt_in" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(359): (vcom-1035) Formal port "new_data" has OPEN or no actual associated with it.
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(360): near "port": syntax error
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(492): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 520 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 520 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 540 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 540 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 560 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 560 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/cal_cng_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/Dflt_cnt_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 520 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 520 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 540 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 540 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 560 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 560 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/cal_cng_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/Dflt_cnt_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 520 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 520 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 540 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 540 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 560 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 560 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# Error: Save operation was not successful.
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(72): (vcom-1136) Unknown identifier "cal_cnt".
+# -- Loading package txt_util
+# -- Loading entity file_output
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(155): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(72): (vcom-1136) Unknown identifier "cal_cnt".
+# -- Loading package txt_util
+# -- Loading entity file_output
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(155): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(72): (vcom-1136) Unknown identifier "cal_cnt".
+# -- Loading package txt_util
+# -- Loading entity file_output
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(155): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(50): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(72): (vcom-1136) Unknown identifier "cal_cnt".
+# -- Loading package txt_util
+# -- Loading entity file_output
+# ** Error: /home/adrian/TDC_v4/sim_tb.vhd(155): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(51): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(51): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/cal_cng_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/Dflt_cnt_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 760 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/cnt_i
+restart
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/cal_cng_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/Dflt_cnt_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 760 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/cal_cng_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+# ** Warning: (vsim-8683) Uninitialized out port /sim_tb/Calibration/Dflt_cnt_dbg has no driver.
+# This port will contribute value (U) to the signal network.
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 760 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(52): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Warning in wave window restart: (vish-4014) No objects found matching '/sim_tb/cal_cng_dbg'. 
+# Warning in wave window restart: (vish-4014) No objects found matching '/sim_tb/Dflt_cnt_dbg'. 
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 760 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 760 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+# Causality operation skipped due to absence of debug database file
+add wave -position end sim:/sim_tb/Calibration/Cal_Limits/Default_val/*
+# (vish-4014) No objects found matching 'sim:/sim_tb/Calibration/Cal_Limits/Default_val/*'.
+add wave -position end sim:/sim_tb/Calibration/Cal_Limits/Default_val/*
+# (vish-4014) No objects found matching 'sim:/sim_tb/Calibration/Cal_Limits/Default_val/*'.
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(52): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(52): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 940 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 960 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 960 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 980 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 980 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 1180 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 940 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 960 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 960 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 980 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 980 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 1180 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(52): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(52): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 520 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 520 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 540 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 540 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 560 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 560 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 580 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 600 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 620 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 640 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 660 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 680 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 700 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 720 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(52): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity compare_old
+# -- Compiling architecture Behavioral of compare_old
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(52): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+# ** Warning: /home/adrian/TDC_v4/read_cnt.vhd(36): (vcom-1083) Implicit array operator "=" always returns FALSE (left length 10 is not equal to right length 12).
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# ** Warning: [4] /home/adrian/TDC_v4/sim_tb.vhd(52): (vcom-1207) An abstract literal and an identifier must have a separator between them.
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(444): (vcom-1136) Unknown identifier "FPGA_compare_old".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(460): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/min_next_i
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/max_next_i
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/min_curr_i
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/max_curr_i
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Fatal: (vsim-3421) Value 256 is out of range 436 to 563.
+#    Time: 480 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Fatal: (vsim-3421) Value 256 is out of range 436 to 563.
+#    Time: 480 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+add wave -position end  sim:/sim_tb/Calibration/max_out_LUT
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+add wave -position end  sim:/sim_tb/Calibration/write_dflt_cnt
+run
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+add wave -position end  sim:/sim_tb/Calibration/Default_val_Mem
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+add wave -position end  sim:/sim_tb/Calibration/Mem_next/new_data
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+add wave -position end  sim:/sim_tb/Calibration/ent_dflt_val/dflt_i
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(58): near ";": syntax error
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(59): near ";": syntax error
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(247): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_dflt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Warning in wave window restart: (vish-4014) No objects found matching '/sim_tb/Calibration/write_dflt_cnt'. 
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/txt_util.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Compiling package txt_util
+# -- Compiling package body txt_util
+# -- Loading package txt_util
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/trb_net_std.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Compiling package trb_net_std
+# -- Compiling package body trb_net_std
+# -- Loading package trb_net_std
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/LUT.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity LUT
+# -- Compiling architecture lut of LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/input_env.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity input_env
+# -- Compiling architecture behavioral of input_env
+# ** Warning: /home/adrian/TDC_v4/input_env.vhd(23): (vcom-1194) FILE declaration was written using VHDL 1987 syntax.
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/file_output.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package txt_util
+# -- Compiling entity file_output
+# -- Compiling architecture log_to_file of file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Delta.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Compiling entity Delta
+# ** Error: /home/adrian/TDC_v4/Delta.vhd(35): near ")": expecting IDENTIFIER
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity compare_old
+# -- Compiling architecture Behavioral of compare_old
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+add wave -position end  sim:/sim_tb/write_dflt_cnt_dbg
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+add wave -position end  sim:/sim_tb/Calibration/FPGA_Lim
+add wave -position end  sim:/sim_tb/Calibration/FPGA_out_compare_old
+add wave -position end  sim:/sim_tb/Calibration/chnl_Lim
+add wave -position end  sim:/sim_tb/Calibration/CHNL_out_compare_old
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 460 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 480 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 500 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 400 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+add wave -position 5  sim:/sim_tb/Calibration/Cal_Limits/max_out
+add wave -position 6  sim:/sim_tb/Calibration/Cal_Limits/min_out
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+add wave -position 16  sim:/sim_tb/Calibration/write_curr
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 740 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 760 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 780 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 800 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+add wave -position 26  sim:/sim_tb/Calibration/do_cal_LIM
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+add wave -position 26  sim:/sim_tb/Calibration/Do_Cal_Memory
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# ** Warning: (vopt-13) Recompile work.calibration(behavioral) because work.cal_limits has changed.
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 720 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/max_out
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/min_out
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/Delta_i
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 720 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position end  sim:/sim_tb/Calibration/Default_val_Mem
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 1 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/LUT.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity LUT
+# -- Compiling architecture lut of LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 1 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position end  sim:/sim_tb/Calibration/new_data_Memory
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/max_curr_in
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/min_curr_in
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position end  sim:/sim_tb/Calibration/Cal_Limits/chnl
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position end  sim:/sim_tb/Calibration/Mem_curr/Min
+add wave -position end  sim:/sim_tb/Calibration/Mem_curr/Max
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/compare_old.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity compare_old
+# -- Compiling architecture Behavioral of compare_old
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/LUT.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity LUT
+# -- Compiling architecture lut of LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_cnt.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_cnt
+# -- Compiling architecture Behavioral of read_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/read_Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity read_Memory
+# -- Compiling architecture Behavioral of read_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position end  sim:/sim_tb/Calibration/Mem_curr/chnl_read
+add wave -position end  sim:/sim_tb/Calibration/Mem_curr/chnl_write
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 440 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 480 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 70 is out of range 436 to 563.
+#    Time: 480 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 70 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 70 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 67 is out of range 436 to 563.
+#    Time: 640 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 67 is out of range 436 to 563.
+#    Time: 640 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+add wave -position end  sim:/sim_tb/Calibration/cal_cnt_out
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+add wave -position end  sim:/sim_tb/Calibration/ent_cnt_val/cal_cnt
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+add wave -position end  sim:/sim_tb/Calibration/ent_cnt_val/cal_cnt_out
+add wave -position end  sim:/sim_tb/Calibration/cal_cnt_out
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 67 is out of range 436 to 563.
+#    Time: 640 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+add wave -position end  sim:/sim_tb/Calibration/ent_cnt_val/chnl_write
+add wave -position end  sim:/sim_tb/Calibration/write_chnl_cnt
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(82): near "chnl_out": expecting ';'
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(257): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/cnt_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity cnt_val
+# -- Compiling architecture Behavioral of cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."/=": metavalue detected, returning TRUE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 540 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 200 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 540 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 37  sim:/sim_tb/Calibration/min_next_Lim
+add wave -position 38  sim:/sim_tb/Calibration/max_next_Lim
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 540 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 385 is out of range 436 to 563.
+#    Time: 540 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 560 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 160 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 67 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 67 is out of range 436 to 563.
+#    Time: 720 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 67 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 25  sim:/sim_tb/Calibration/Cal_Limits/FPGA
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 67 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 40 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 60 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 80 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 67 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 31 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 480 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 68 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 68 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 68 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 68 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 66 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 66 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 32 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 31  sim:/sim_tb/Calibration/Mem_next/Max
+add wave -position 32  sim:/sim_tb/Calibration/Mem_next/Min
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 32 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 18  sim:/sim_tb/Calibration/Cal_Limits/min_next_in
+add wave -position 19  sim:/sim_tb/Calibration/Cal_Limits/max_next_in
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 240 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 260 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 32 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 31 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 5 is out of range 436 to 563.
+#    Time: 600 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 280 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 5 is out of range 436 to 563.
+#    Time: 600 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 5 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 5 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 6 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 6 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 26  sim:/sim_tb/Calibration/Cal_Limits/cnt_ii
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 27  sim:/sim_tb/Calibration/Cal_Limits/min_next_in
+add wave -position 28  sim:/sim_tb/Calibration/Cal_Limits/max_next_in
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(298): near "else": expecting END
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(337): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 9 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 9 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 8 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 8 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 27  sim:/sim_tb/Calibration/Cal_Limits/chnl_ii
+add wave -position 26  sim:/sim_tb/Calibration/Cal_Limits/chnl
+add wave -position 28  sim:/sim_tb/Calibration/Cal_Limits/chnl_i
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 380 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 9 is out of range 436 to 563.
+#    Time: 420 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 7 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 9 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 6 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 38  sim:/sim_tb/Calibration/Mem_next/Max_out
+add wave -position 39  sim:/sim_tb/Calibration/Mem_next/Min_out
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(274): No feasible entries for infix operator "=".
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(274): Bad expression in right operand of infix expression "and".
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(274): Type error resolving infix expression "and" as type std.STANDARD.BOOLEAN.
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(338): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 16  sim:/sim_tb/Calibration/read_compare_old
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 43  sim:/sim_tb/Calibration/Mem_curr/Max_out
+add wave -position 44  sim:/sim_tb/Calibration/Mem_curr/Min_out
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 340 is out of range 436 to 563.
+#    Time: 220 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 45  sim:/sim_tb/Calibration/Do_Cal_Memory
+add wave -position 45  sim:/sim_tb/Calibration/Do_Cal_compare_old
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 340 is out of range 436 to 563.
+#    Time: 220 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 340 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 46  sim:/sim_tb/Calibration/FPGA_out_compare_old
+add wave -position 47  sim:/sim_tb/Calibration/FPGA_Lim
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 19  sim:/sim_tb/Calibration/Cal_Limits/chnl_ii
+add wave -position 19  sim:/sim_tb/Calibration/Cal_Limits/cnt_ii
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(198): near "if": expecting ';'
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(343): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(204): near "else": expecting END
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(343): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(212): near "else": expecting END
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(343): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(212): near "else": expecting END
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(343): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(216): near "process": expecting IF
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(221): Illegal sequential statement.
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(343): near "Behavioral": expecting IF
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 560 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 220 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 280 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 300 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 320 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 340 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 360 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 380 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 420 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 440 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 37 is out of range 436 to 563.
+#    Time: 560 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(199): near "max_next_i": expecting THEN
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(219): near "if": expecting PROCESS
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD.">=": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 180 ns  Iteration: 1  Instance: /sim_tb/Calibration/Cal_Limits
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 360 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 69 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 1 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 37 is out of range 436 to 563.
+#    Time: 340 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 1 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(329): near "else": expecting END
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(373): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 64 is out of range 436 to 563.
+#    Time: 760 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 18  sim:/sim_tb/Calibration/Do_Cal_Memory
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 28  sim:/sim_tb/Calibration/Cal_Limits/use_old
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/default_val.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity dflt_val
+# -- Compiling architecture Behavioral of dflt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(367): near ")": syntax error
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(369): Statement cannot be labeled.
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(464): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+add wave -position 30  sim:/sim_tb/Calibration/Cal_Limits/FPGA_out
+add wave -position 32  sim:/sim_tb/Calibration/Cal_Limits/chnl_out
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(370): (vcom-1484) Unknown formal identifier "chnl_out_write".
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(371): (vcom-1484) Unknown formal identifier "FPGA_out_write".
+# -- Loading entity LUT
+# ** Error: /home/adrian/TDC_v4/Calibration.vhd(469): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 100 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 62 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 21  sim:/sim_tb/Calibration/Cal_Limits/cnt_iii
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 24  sim:/sim_tb/Calibration/Cal_Limits/max_next_iii
+add wave -position 24  sim:/sim_tb/Calibration/Cal_Limits/max_next_ii
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 24  sim:/sim_tb/Calibration/Cal_Limits/min_curr_ii
+add wave -position 26  sim:/sim_tb/Calibration/Cal_Limits/min_curr_iii
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 24  sim:/sim_tb/Calibration/Cal_Limits/min_next_ii
+add wave -position 26  sim:/sim_tb/Calibration/Cal_Limits/min_next_iii
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 65 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Warning in wave window restart: (vish-4014) No objects found matching '/sim_tb/Calibration/Cal_Limits/min_next_iii'. 
+# Warning in wave window restart: (vish-4014) No objects found matching '/sim_tb/Calibration/Cal_Limits/max_next_iii'. 
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 4 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+# Warning in wave window restart: (vish-4014) No objects found matching '/sim_tb/Calibration/Cal_Limits/cnt_iii'. 
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 27  sim:/sim_tb/Calibration/Cal_Limits/max_curr_ii
+add wave -position 27  sim:/sim_tb/Calibration/Cal_Limits/min_curr_ii
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 52  sim:/sim_tb/Calibration/Mem_curr/Min_out
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Memory.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Compiling entity Memory
+# -- Compiling architecture Behavioral of Memory
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 60  sim:/sim_tb/Calibration/Cal_Limits/chnl_out_write
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 700 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 660 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 11 is out of range 436 to 563.
+#    Time: 660 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 12 is out of range 436 to 563.
+#    Time: 680 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 6 is out of range 436 to 563.
+#    Time: 220 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 6 is out of range 436 to 563.
+#    Time: 220 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 240 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 260 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+# Error: invalid command name "::.main_pane.dataflow.interior.cs.body.pw.df.c"
+step
+# Cannot continue because of fatal error.
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/Cal_Limits.vhd 164 Process Mem_next
+# 
+# Error: invalid command name "::.main_pane.dataflow.interior.cs.body.pw.df.c"
+# Error: invalid command name "::.main_pane.dataflow.interior.cs.body.pw.df.c"
+# Error: invalid command name "::.main_pane.dataflow.interior.cs.body.pw.df.c"
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+add wave -position 41  sim:/sim_tb/Calibration/ent_cnt_val/cal_cnt
+add wave -position 42  sim:/sim_tb/Calibration/ent_cnt_val/FPGA_read
+add wave -position 43  sim:/sim_tb/Calibration/ent_cnt_val/FPGA_write
+add wave -position 44  sim:/sim_tb/Calibration/ent_cnt_val/chnl_read
+add wave -position 45  sim:/sim_tb/Calibration/ent_cnt_val/chnl_write
+add wave -position 46  sim:/sim_tb/Calibration/write_chnl_cnt
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(93): near ":": expecting ';'
+# ** Error: /home/adrian/TDC_v4/Cal_Limits.vhd(380): VHDL Compiler exiting
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+restart
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 140 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_curr
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Fatal: (vsim-3421) Value 33 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 6 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Calibration.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Calibration
+# -- Compiling architecture Behavioral of Calibration
+# -- Loading entity read_cnt
+# -- Loading entity compare_old
+# -- Loading entity cnt_val
+# -- Loading entity dflt_val
+# -- Loading entity Memory
+# -- Loading entity Cal_Limits
+# -- Loading entity LUT
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 6 is out of range 436 to 563.
+#    Time: 400 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Fatal: (vsim-3421) Value 3 is out of range 436 to 563.
+#    Time: 300 ns  Iteration: 1  Process: /sim_tb/Calibration/LUTs/proc_slope File: /home/adrian/TDC_v4/LUT.vhd
+# Fatal error in Process proc_slope at /home/adrian/TDC_v4/LUT.vhd line 86
+# 
+# HDL call sequence:
+# Stopped at /home/adrian/TDC_v4/LUT.vhd 86 Process proc_slope
+# 
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/sim_tb.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Loading package NUMERIC_STD
+# -- Compiling entity sim_tb
+# -- Compiling architecture Behavioral of sim_tb
+# -- Loading entity Calibration
+# -- Loading package txt_util
+# -- Loading entity file_output
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+vcom -reportprogress 300 -work work /home/adrian/TDC_v4/Cal_Limits.vhd
+# QuestaSim vcom 10.2c_5 Compiler 2013.11 Nov 19 2013
+# -- Loading package STANDARD
+# -- Loading package TEXTIO
+# -- Loading package std_logic_1164
+# -- Loading package NUMERIC_STD
+# -- Loading package std_logic_arith
+# -- Loading package STD_LOGIC_UNSIGNED
+# -- Loading package trb_net_std
+# -- Compiling entity Cal_Limits
+# -- Compiling architecture Behavioral of Cal_Limits
+restart
+# ** Note: (vsim-3813) Design is being optimized due to module recompilation...
+# Loading std.standard
+# Loading std.textio(body)
+# Loading ieee.std_logic_1164(body)
+# Loading ieee.std_logic_arith(body)
+# Loading ieee.std_logic_unsigned(body)
+# Loading work.trb_net_std(body)
+# Loading ieee.numeric_std(body)
+# Loading work.txt_util(body)
+# Loading work.sim_tb(behavioral)#1
+# Loading work.calibration(behavioral)#1
+run
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 0 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD."<": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.">": metavalue detected, returning FALSE
+#    Time: 20 ns  Iteration: 1  Instance: /sim_tb/Calibration/LUTs
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/Mem_next
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
+# ** Warning: NUMERIC_STD.TO_INTEGER: metavalue detected, returning 0
+#    Time: 120 ns  Iteration: 1  Instance: /sim_tb/Calibration/ent_cnt_val
diff --git a/combiner_cts/code_EBR/trb_net_std.vhd b/combiner_cts/code_EBR/trb_net_std.vhd
new file mode 100644 (file)
index 0000000..8e8087d
--- /dev/null
@@ -0,0 +1,433 @@
+-- std package
+library ieee;
+USE IEEE.std_logic_1164.ALL;
+USE IEEE.std_logic_ARITH.ALL;           --> should be replaced with the ieee
+USE IEEE.std_logic_UNSIGNED.ALL;        --> standard package ieee.numeric_std
+
+package trb_net_std is
+
+  type channel_config_t is array(0 to 3) of integer;
+  type array_32_t is array(integer range <>) of std_logic_vector(31 downto 0);
+  type multiplexer_config_t is array(0 to 2**3-1) of integer;
+
+--Trigger types
+  constant TRIG_PHYS         : std_logic_vector(3 downto 0) := x"1";
+  constant TRIG_MDC_CAL      : std_logic_vector(3 downto 0) := x"9";
+  constant TRIG_SHW_CAL      : std_logic_vector(3 downto 0) := x"A";
+  constant TRIG_SHW_PED      : std_logic_vector(3 downto 0) := x"B";
+--Trigger Info
+  constant TRIG_SUPPRESS_BIT : integer range 0 to 15 := 0;
+
+
+
+-- some basic definitions for the whole network
+-----------------------------------------------
+
+  constant c_DATA_WIDTH        : integer   := 16;
+  constant c_NUM_WIDTH         : integer   := 3;
+  constant c_MUX_WIDTH         : integer   := 3; --!!!
+
+
+--assigning channel names
+  constant c_TRG_LVL1_CHANNEL  : integer := 0;
+  constant c_DATA_CHANNEL      : integer := 1;
+  constant c_IPU_CHANNEL       : integer := 1;
+  constant c_UNUSED_CHANNEL    : integer := 2;
+  constant c_SLOW_CTRL_CHANNEL : integer := 3;
+
+--api_type generic
+  constant c_API_ACTIVE   : integer := 1;
+  constant c_API_PASSIVE  : integer := 0;
+
+--sbuf_version generic
+  constant c_SBUF_FULL     : integer := 0;
+  constant c_SBUF_FAST     : integer := 0;
+  constant c_SBUF_HALF     : integer := 1;
+  constant c_SBUF_SLOW     : integer := 1;
+  constant c_SECURE_MODE   : integer := 1;
+  constant c_NON_SECURE_MODE : integer := 0;
+
+--fifo_depth
+  constant c_FIFO_NONE     : integer := 0;
+  constant c_FIFO_2PCK     : integer := 1;
+  constant c_FIFO_SMALL    : integer := 1;
+  constant c_FIFO_4PCK     : integer := 2;
+  constant c_FIFO_MEDIUM   : integer := 2;
+  constant c_FIFO_8PCK     : integer := 3;
+  constant c_FIFO_BIG      : integer := 3;
+  constant c_FIFO_BRAM     : integer := 6;
+  constant c_FIFO_BIGGEST  : integer := 6;
+  constant c_FIFO_INFTY    : integer := 7;
+
+--simple logic
+  constant c_YES  : integer := 1;
+  constant c_NO   : integer := 0;
+  constant c_MONITOR : integer := 2;
+
+
+--standard values
+  constant std_SBUF_VERSION     : integer := c_SBUF_FULL;
+  constant std_IBUF_SECURE_MODE : integer := c_SECURE_MODE;
+  constant std_USE_ACKNOWLEDGE  : integer := c_YES;
+  constant std_USE_REPLY_CHANNEL: integer := c_YES;
+  constant std_FIFO_DEPTH       : integer := c_FIFO_BRAM;
+  constant std_DATA_COUNT_WIDTH : integer := 7; --max 7
+  constant std_TERM_SECURE_MODE : integer := c_YES;
+  constant std_MUX_SECURE_MODE  : integer := c_NO;
+  constant std_FORCE_REPLY      : integer := c_YES;
+  constant cfg_USE_CHECKSUM      : channel_config_t   := (c_NO,c_YES,c_NO,c_YES);
+  constant cfg_USE_ACKNOWLEDGE   : channel_config_t   := (c_YES,c_YES,c_NO,c_YES);
+  constant cfg_FORCE_REPLY       : channel_config_t   := (c_YES,c_YES,c_YES,c_YES);
+  constant cfg_USE_REPLY_CHANNEL : channel_config_t   := (c_YES,c_YES,c_YES,c_YES);
+  constant c_MAX_IDLE_TIME_PER_PACKET : integer := 24;
+  constant std_multipexer_config : multiplexer_config_t := (others => c_NO);
+
+--packet types
+  constant TYPE_DAT : std_logic_vector(2 downto 0) := "000";
+  constant TYPE_HDR : std_logic_vector(2 downto 0) := "001";
+  constant TYPE_EOB : std_logic_vector(2 downto 0) := "010";
+  constant TYPE_TRM : std_logic_vector(2 downto 0) := "011";
+  constant TYPE_ACK : std_logic_vector(2 downto 0) := "101";
+  constant TYPE_ILLEGAL : std_logic_vector(2 downto 0) := "111";
+
+--Media interface error codes
+  constant ERROR_OK     : std_logic_vector(2 downto 0) := "000"; --transmission ok
+  constant ERROR_ENCOD  : std_logic_vector(2 downto 0) := "001"; --transmission error by encoding
+  constant ERROR_RECOV  : std_logic_vector(2 downto 0) := "010"; --transmission error, reconstructed
+  constant ERROR_FATAL  : std_logic_vector(2 downto 0) := "011"; --transmission error, fatal
+  constant ERROR_WAIT   : std_logic_vector(2 downto 0) := "110"; --link awaiting initial response
+  constant ERROR_NC     : std_logic_vector(2 downto 0) := "111"; --media not connected
+
+
+--special addresses
+  constant ILLEGAL_ADDRESS   : std_logic_vector(15 downto 0) := x"0000";
+  constant BROADCAST_ADDRESS : std_logic_vector(15 downto 0) := x"ffff";
+
+--command definitions
+  constant LINK_STARTUP_WORD : std_logic_vector(15 downto 0) := x"e110";
+  constant SET_ADDRESS : std_logic_vector(15 downto 0) := x"5EAD";
+  constant ACK_ADDRESS : std_logic_vector(15 downto 0) := x"ACAD";
+  constant READ_ID     : std_logic_vector(15 downto 0) := x"5E1D";
+
+--common registers
+  --maximum: 4, because of regio implementation
+  constant std_COMSTATREG  : integer := 10;
+  constant std_COMCTRLREG  : integer := 3;
+    --needed address width for common registers
+  constant std_COMneededwidth : integer := 4;
+  constant c_REGIO_ADDRESS_WIDTH : integer := 16;
+  constant c_REGIO_REGISTER_WIDTH : integer := 32;
+  constant c_REGIO_REG_WIDTH : integer := 32;
+  constant c_regio_timeout_bit : integer := 5;
+
+--RegIO operation dtype
+  constant c_network_control_type : std_logic_vector(3 downto 0) := x"F";
+  constant c_read_register_type   : std_logic_vector(3 downto 0) := x"8";
+  constant c_write_register_type  : std_logic_vector(3 downto 0) := x"9";
+  constant c_read_multiple_type   : std_logic_vector(3 downto 0) := x"A";
+  constant c_write_multiple_type  : std_logic_vector(3 downto 0) := x"B";
+
+  constant c_BUS_HANDLER_MAX_PORTS : integer := 64;
+  type c_BUS_HANDLER_ADDR_t is array(0 to c_BUS_HANDLER_MAX_PORTS) of std_logic_vector(15 downto 0);
+  type c_BUS_HANDLER_WIDTH_t is array(0 to c_BUS_HANDLER_MAX_PORTS) of integer range 0 to 16;
+
+
+--Names of 16bit words
+  constant c_H0 : std_logic_vector(2 downto 0) := "100";
+  constant c_F0 : std_logic_vector(2 downto 0) := "000";
+  constant c_F1 : std_logic_vector(2 downto 0) := "001";
+  constant c_F2 : std_logic_vector(2 downto 0) := "010";
+  constant c_F3 : std_logic_vector(2 downto 0) := "011";
+
+  constant c_H0_next : std_logic_vector(2 downto 0) := "011";
+  constant c_F0_next : std_logic_vector(2 downto 0) := "100";
+  constant c_F1_next : std_logic_vector(2 downto 0) := "000";
+  constant c_F2_next : std_logic_vector(2 downto 0) := "001";
+  constant c_F3_next : std_logic_vector(2 downto 0) := "010";
+
+  constant c_max_word_number : std_logic_vector(2 downto 0) := "100";
+  --constant VERSION_NUMBER_TIME  : std_logic_vector(31 downto 0)   := conv_std_logic_vector(1234567890,32);
+
+
+  type CTRLBUS_TX is record
+    data       : std_logic_vector(31 downto 0);
+    ack        : std_logic;
+    wack,rack  : std_logic; --for the old-fashioned guys
+    unknown    : std_logic;
+    nack       : std_logic;
+  end record;
+
+  type CTRLBUS_RX is record
+    data       : std_logic_vector(31 downto 0);
+    addr       : std_logic_vector(15 downto 0);
+    write      : std_logic;
+    read       : std_logic;
+    timeout    : std_logic;
+  end record; 
+
+  
+  type READOUT_RX is record 
+    data_valid         : std_logic;
+    valid_timing_trg   : std_logic;
+    valid_notiming_trg : std_logic;
+    invalid_trg        : std_logic;
+    --
+    trg_type           : std_logic_vector( 3 downto 0);
+    trg_number         : std_logic_vector(15 downto 0);
+    trg_code           : std_logic_vector( 7 downto 0);
+    trg_information    : std_logic_vector(23 downto 0);
+    trg_int_number     : std_logic_vector(15 downto 0);    
+    --
+    trg_multiple       : std_logic;
+    trg_timeout        : std_logic;
+    trg_spurious       : std_logic;
+    trg_missing        : std_logic;
+    trg_spike          : std_logic;
+    --
+    buffer_almost_full : std_logic;
+  end record; 
+  
+  
+  type READOUT_TX is record
+    busy_release  : std_logic;
+    statusbits    : std_logic_vector(31 downto 0);
+    data          : std_logic_vector(31 downto 0);
+    data_write    : std_logic;
+    data_finished : std_logic;
+  end record;
+    
+  
+  type TIMERS is record
+    microsecond         : std_logic_vector (31 downto 0); --global time, microseconds
+    clock               : std_logic_vector ( 7 downto 0); --local time running with chip frequency
+    last_trigger        : std_logic_vector (31 downto 0); --local time, resetted with each trigger
+    tick_ms             : std_logic;
+    tick_us             : std_logic;
+    network_address     : std_logic_vector (15 downto 0);
+    temperature         : std_logic_vector (11 downto 0);
+    uid                 : std_logic_vector (63 downto 0);
+  end record;
+    
+  type MED2INT is record
+    data      : std_logic_vector(15 downto 0);
+    packet_num: std_logic_vector(2 downto 0);
+    dataready : std_logic;
+    tx_read   : std_logic;
+    stat_op   : std_logic_vector(15 downto 0);
+    clk_half  : std_logic;
+    clk_full  : std_logic;
+  end record;
+
+  type INT2MED is record
+    data      : std_logic_vector(15 downto 0);
+    packet_num: std_logic_vector(2 downto 0);
+    dataready : std_logic;
+    ctrl_op   : std_logic_vector(15 downto 0);
+  end record;
+  
+  type API_RX_REC is record
+    data           : std_logic_vector(15 downto 0);
+    packet_num     : std_logic_vector(2 downto 0);
+    dataready      : std_logic;
+    dtype          : std_logic_vector(3 downto 0);
+    running        : std_logic;
+    seq_num        : std_logic_vector(7 downto 0);
+    read_tx        : std_logic;
+  end record;  
+
+  type API_TX_REC is record
+    data           : std_logic_vector(15 downto 0);
+    packet_num     : std_logic_vector(2 downto 0);
+    dataready      : std_logic;
+    short_transfer : std_logic;
+    dtype          : std_logic_vector(3 downto 0);
+    error_pattern  : std_logic_vector(31 downto 0);
+    send           : std_logic;
+    read_rx        : std_logic;
+  end record;  
+  
+  
+  type std_logic_vector_array_36 is array (integer range <>) of std_logic_vector(35 downto 0);
+  type std_logic_vector_array_32 is array (integer range <>) of std_logic_vector(31 downto 0);
+  type std_logic_vector_array_31 is array (integer range <>) of std_logic_vector(30 downto 0);
+  type std_logic_vector_array_24 is array (integer range <>) of std_logic_vector(23 downto 0);
+  type std_logic_vector_array_11 is array (integer range <>) of std_logic_vector(10 downto 0);
+  type std_logic_vector_array_8  is array (integer range <>) of std_logic_vector(7 downto 0);
+  type int_array_t is array(integer range <>) of integer;
+
+  type ctrlbus_tx_array_t  is array (integer range <>) of CTRLBUS_TX;
+  type ctrlbus_rx_array_t  is array (integer range <>) of CTRLBUS_RX;
+  type readout_tx_array_t  is array (integer range <>) of READOUT_TX;
+  type med2int_array_t     is array (integer range <>) of MED2INT;
+  type int2med_array_t     is array (integer range <>) of INT2MED;
+    
+--function declarations
+  function and_all (arg : std_logic_vector)
+    return std_logic;
+  function or_all  (arg : std_logic_vector)
+    return std_logic;
+  function all_zero (arg : std_logic_vector)
+    return std_logic;
+  function xor_all  (arg : std_logic_vector)
+    return std_logic;
+
+  function get_bit_position  (arg : std_logic_vector)
+    return integer;
+
+  function is_time_reached  (timer : integer; time : integer; period : integer)
+    return std_logic;
+
+  function MAX(x : integer; y : integer)
+    return integer;
+
+  function Log2( input:integer ) return integer;
+  function count_ones( input:std_logic_vector ) return integer;
+  function minimum (LEFT, RIGHT: INTEGER) return INTEGER;
+  function maximum (LEFT, RIGHT: INTEGER) return INTEGER;
+
+
+end package trb_net_std;
+
+package body trb_net_std is
+
+  function and_all (arg : std_logic_vector)
+    return std_logic is
+    variable tmp : std_logic := '1';
+    begin
+      tmp := '1';
+      for i in arg'range loop
+        tmp := tmp and arg(i);
+      end loop;  -- i
+      return tmp;
+  end function and_all;
+
+  function or_all (arg : std_logic_vector)
+    return std_logic is
+    variable tmp : std_logic := '1';
+    begin
+      tmp := '0';
+      for i in arg'range loop
+        tmp := tmp or arg(i);
+      end loop;  -- i
+      return tmp;
+  end function or_all;
+
+  function all_zero (arg : std_logic_vector)
+    return std_logic is
+        variable tmp : std_logic := '1';
+        begin
+      for i in arg'range loop
+                 tmp := not arg(i);
+        exit when tmp = '0';
+      end loop;  -- i
+      return tmp;
+  end function all_zero;
+
+  function xor_all (arg : std_logic_vector)
+    return std_logic is
+    variable tmp : std_logic := '0';
+    begin
+      tmp := '0';
+      for i in arg'range loop
+        tmp := tmp xor arg(i);
+      end loop;  -- i
+      return tmp;
+  end function xor_all;
+
+  function get_bit_position (arg : std_logic_vector)
+    return integer is
+    variable tmp : integer := 0;
+    begin
+      tmp := 0;
+      for i in  arg'range loop
+        if arg(i) = '1' then
+          return i;
+        end if;
+        --exit when arg(i) = '1';
+      end loop;  -- i
+      return 0;
+  end get_bit_position;
+
+  function is_time_reached  (timer : integer; time : integer; period : integer)
+    return std_logic is
+    variable i : integer range 0 to 1 := 0;
+    variable t : std_logic_vector(27 downto 0) := conv_std_logic_vector(timer,28);
+    begin
+      i := 0;
+      if period = 10 then
+        case time is
+          when 1300000000 => if t(27) = '1' then i := 1; end if;
+          when 640000 => if t(16) = '1' then i := 1; end if;
+          when 80000  => if t(13) = '1' then i := 1; end if;
+          when 10000  => if t(10) = '1' then i := 1; end if;
+          when 1200   => if t(7)  = '1' then i := 1; end if;
+          when others => if timer >= time/period then i := 1; end if;
+        end case;
+      elsif period = 40 then
+        case time is
+          when 1300000000 => if t(25) = '1' then i := 1; end if;
+          when 640000 => if t(14) = '1' then i := 1; end if;
+          when 80000  => if t(11) = '1' then i := 1; end if;
+          when 10000  => if t(8) = '1' then i := 1; end if;
+          when 1200   => if t(5)  = '1' then i := 1; end if;
+          when others => if timer >= time/period then i := 1; end if;
+        end case;
+      else
+        if timer = time/period then i := 1; end if;
+      end if;
+      if i = 1 then  return '1'; else return '0'; end if;
+    end is_time_reached;
+
+  function MAX(x : integer; y : integer)
+    return integer is
+    begin
+      if x > y then
+        return x;
+      else
+        return y;
+      end if;
+    end MAX;
+
+
+  function Log2( input:integer ) return integer is
+    variable temp,log:integer;
+    begin
+      temp:=input;
+      log:=0;
+      while (temp /= 0) loop
+      temp:=temp/2;
+      log:=log+1;
+      end loop;
+      return log;
+      end function log2;
+
+  function count_ones( input:std_logic_vector ) return integer is
+    variable temp:std_logic_vector(input'range);
+    begin
+      temp := (others => '0');
+      for i in input'range loop
+--        if input(i) = '1' then
+          temp := temp + input(i);
+--        end if;
+      end loop;
+      return conv_integer(temp);
+      end function count_ones;
+
+      
+function minimum (LEFT, RIGHT: INTEGER) return INTEGER is
+  begin
+    if LEFT < RIGHT then return LEFT;
+    else return RIGHT;
+    end if;
+  end function;        
+
+function maximum (LEFT, RIGHT: INTEGER) return INTEGER is
+  begin
+    if LEFT > RIGHT then return LEFT;
+    else return RIGHT;
+    end if;
+  end function;       
+  
+end package body trb_net_std;
+
diff --git a/combiner_cts/code_EBR/txt_util.vhd b/combiner_cts/code_EBR/txt_util.vhd
new file mode 100644 (file)
index 0000000..aaccd41
--- /dev/null
@@ -0,0 +1,582 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use std.textio.all;
+
+
+package txt_util is
+
+    -- prints a message to the screen
+    procedure print(text: string);
+
+    -- prints the message when active
+    -- useful for debug switches
+    procedure print(active: boolean; text: string);
+
+    -- converts std_logic into a character
+    function chr(sl: std_logic) return character;
+
+    -- converts std_logic into a string (1 to 1)
+    function str(sl: std_logic) return string;
+
+    -- converts std_logic_vector into a string (binary base)
+    function str(slv: std_logic_vector) return string;
+
+    -- converts boolean into a string
+    function str(b: boolean) return string;
+
+    -- converts an integer into a single character
+    -- (can also be used for hex conversion and other bases)
+    function chr(int: integer) return character;
+
+    -- converts integer into string using specified base
+    function str(int: integer; base: integer) return string;
+
+    -- converts integer to string, using base 10
+    function str(int: integer) return string;
+
+    -- convert std_logic_vector into a string in hex format
+    function hstr(slv: std_logic_vector) return string;
+
+
+    -- functions to manipulate strings
+    -----------------------------------
+
+    -- convert a character to upper case
+    function to_upper(c: character) return character;
+
+    -- convert a character to lower case
+    function to_lower(c: character) return character;
+
+    -- convert a string to upper case
+    function to_upper(s: string) return string;
+
+    -- convert a string to lower case
+    function to_lower(s: string) return string;
+
+   
+    
+    -- functions to convert strings into other formats
+    --------------------------------------------------
+    
+    -- converts a character into std_logic
+    function to_std_logic(c: character) return std_logic; 
+    
+    -- converts a string into std_logic_vector
+    function to_std_logic_vector(s: string) return std_logic_vector; 
+
+
+  
+    -- file I/O
+    -----------
+       
+    -- read variable length string from input file
+    procedure str_read(file in_file: TEXT; 
+                       res_string: out string);
+        
+    -- print string to a file and start new line
+    procedure print(file out_file: TEXT;
+                    new_string: in  string);
+    
+    -- print character to a file and start new line
+    procedure print(file out_file: TEXT;
+                    char:       in  character);
+                    
+end txt_util;
+
+
+
+
+package body txt_util is
+
+
+
+
+   -- prints text to the screen
+
+   procedure print(text: string) is
+     variable msg_line: line;
+     begin
+       write(msg_line, text);
+       writeline(output, msg_line);
+   end print;
+
+
+
+
+   -- prints text to the screen when active
+
+   procedure print(active: boolean; text: string)  is
+     begin
+      if active then
+         print(text);
+      end if;
+   end print;
+
+
+   -- converts std_logic into a character
+
+   function chr(sl: std_logic) return character is
+    variable c: character;
+    begin
+      case sl is
+         when 'U' => c:= 'U';
+         when 'X' => c:= 'X';
+         when '0' => c:= '0';
+         when '1' => c:= '1';
+         when 'Z' => c:= 'Z';
+         when 'W' => c:= 'W';
+         when 'L' => c:= 'L';
+         when 'H' => c:= 'H';
+         when '-' => c:= '-';
+      end case;
+    return c;
+   end chr;
+
+
+
+   -- converts std_logic into a string (1 to 1)
+
+   function str(sl: std_logic) return string is
+    variable s: string(1 to 1);
+    begin
+        s(1) := chr(sl);
+        return s;
+   end str;
+
+
+
+   -- converts std_logic_vector into a string (binary base)
+   -- (this also takes care of the fact that the range of
+   --  a string is natural while a std_logic_vector may
+   --  have an integer range)
+
+   function str(slv: std_logic_vector) return string is
+     variable result : string (1 to slv'length);
+     variable r : integer;
+   begin
+     r := 1;
+     for i in slv'range loop
+        result(r) := chr(slv(i));
+        r := r + 1;
+     end loop;
+     return result;
+   end str;
+
+
+   function str(b: boolean) return string is
+
+    begin
+       if b then
+          return "true";
+      else
+        return "false";
+       end if;
+    end str;
+
+
+   -- converts an integer into a character
+   -- for 0 to 9 the obvious mapping is used, higher
+   -- values are mapped to the characters A-Z
+   -- (this is usefull for systems with base > 10)
+   -- (adapted from Steve Vogwell's posting in comp.lang.vhdl)
+
+   function chr(int: integer) return character is
+    variable c: character;
+   begin
+        case int is
+          when  0 => c := '0';
+          when  1 => c := '1';
+          when  2 => c := '2';
+          when  3 => c := '3';
+          when  4 => c := '4';
+          when  5 => c := '5';
+          when  6 => c := '6';
+          when  7 => c := '7';
+          when  8 => c := '8';
+          when  9 => c := '9';
+          when 10 => c := 'A';
+          when 11 => c := 'B';
+          when 12 => c := 'C';
+          when 13 => c := 'D';
+          when 14 => c := 'E';
+          when 15 => c := 'F';
+          when 16 => c := 'G';
+          when 17 => c := 'H';
+          when 18 => c := 'I';
+          when 19 => c := 'J';
+          when 20 => c := 'K';
+          when 21 => c := 'L';
+          when 22 => c := 'M';
+          when 23 => c := 'N';
+          when 24 => c := 'O';
+          when 25 => c := 'P';
+          when 26 => c := 'Q';
+          when 27 => c := 'R';
+          when 28 => c := 'S';
+          when 29 => c := 'T';
+          when 30 => c := 'U';
+          when 31 => c := 'V';
+          when 32 => c := 'W';
+          when 33 => c := 'X';
+          when 34 => c := 'Y';
+          when 35 => c := 'Z';
+          when others => c := '?';
+        end case;
+        return c;
+    end chr;
+
+
+
+   -- convert integer to string using specified base
+   -- (adapted from Steve Vogwell's posting in comp.lang.vhdl)
+
+   function str(int: integer; base: integer) return string is
+
+    variable temp:      string(1 to 10);
+    variable num:       integer;
+    variable abs_int:   integer;
+    variable len:       integer := 1;
+    variable power:     integer := 1;
+
+   begin
+
+    -- bug fix for negative numbers
+    abs_int := abs(int);
+
+    num     := abs_int;
+
+    while num >= base loop                     -- Determine how many
+      len := len + 1;                          -- characters required
+      num := num / base;                       -- to represent the
+    end loop ;                                 -- number.
+
+    for i in len downto 1 loop                 -- Convert the number to
+      temp(i) := chr(abs_int/power mod base);  -- a string starting
+      power := power * base;                   -- with the right hand
+    end loop ;                                 -- side.
+
+    -- return result and add sign if required
+    if int < 0 then
+       return '-'& temp(1 to len);
+     else
+       return temp(1 to len);
+    end if;
+
+   end str;
+
+
+  -- convert integer to string, using base 10
+  function str(int: integer) return string is
+
+   begin
+
+    return str(int, 10) ;
+
+   end str;
+
+
+
+   -- converts a std_logic_vector into a hex string.
+   function hstr(slv: std_logic_vector) return string is
+       variable hexlen: integer;
+       variable longslv : std_logic_vector(67 downto 0) := (others => '0');
+       variable hex : string(1 to 16);
+       variable fourbit : std_logic_vector(3 downto 0);
+     begin
+       hexlen := (slv'left+1)/4;
+       if (slv'left+1) mod 4 /= 0 then
+         hexlen := hexlen + 1;
+       end if;
+       longslv(slv'left downto 0) := slv;
+       for i in (hexlen -1) downto 0 loop
+         fourbit := longslv(((i*4)+3) downto (i*4));
+         case fourbit is
+           when "0000" => hex(hexlen -I) := '0';
+           when "0001" => hex(hexlen -I) := '1';
+           when "0010" => hex(hexlen -I) := '2';
+           when "0011" => hex(hexlen -I) := '3';
+           when "0100" => hex(hexlen -I) := '4';
+           when "0101" => hex(hexlen -I) := '5';
+           when "0110" => hex(hexlen -I) := '6';
+           when "0111" => hex(hexlen -I) := '7';
+           when "1000" => hex(hexlen -I) := '8';
+           when "1001" => hex(hexlen -I) := '9';
+           when "1010" => hex(hexlen -I) := 'A';
+           when "1011" => hex(hexlen -I) := 'B';
+           when "1100" => hex(hexlen -I) := 'C';
+           when "1101" => hex(hexlen -I) := 'D';
+           when "1110" => hex(hexlen -I) := 'E';
+           when "1111" => hex(hexlen -I) := 'F';
+           when "ZZZZ" => hex(hexlen -I) := 'z';
+           when "UUUU" => hex(hexlen -I) := 'u';
+           when "XXXX" => hex(hexlen -I) := 'x';
+           when others => hex(hexlen -I) := '?';
+         end case;
+       end loop;
+       return hex(1 to hexlen);
+     end hstr;
+
+
+
+   -- functions to manipulate strings
+   -----------------------------------
+
+
+   -- convert a character to upper case
+
+   function to_upper(c: character) return character is
+
+      variable u: character;
+
+    begin
+
+       case c is
+        when 'a' => u := 'A';
+        when 'b' => u := 'B';
+        when 'c' => u := 'C';
+        when 'd' => u := 'D';
+        when 'e' => u := 'E';
+        when 'f' => u := 'F';
+        when 'g' => u := 'G';
+        when 'h' => u := 'H';
+        when 'i' => u := 'I';
+        when 'j' => u := 'J';
+        when 'k' => u := 'K';
+        when 'l' => u := 'L';
+        when 'm' => u := 'M';
+        when 'n' => u := 'N';
+        when 'o' => u := 'O';
+        when 'p' => u := 'P';
+        when 'q' => u := 'Q';
+        when 'r' => u := 'R';
+        when 's' => u := 'S';
+        when 't' => u := 'T';
+        when 'u' => u := 'U';
+        when 'v' => u := 'V';
+        when 'w' => u := 'W';
+        when 'x' => u := 'X';
+        when 'y' => u := 'Y';
+        when 'z' => u := 'Z';
+        when others => u := c;
+    end case;
+
+      return u;
+
+   end to_upper;
+
+
+   -- convert a character to lower case
+
+   function to_lower(c: character) return character is
+
+      variable l: character;
+
+    begin
+
+       case c is
+        when 'A' => l := 'a';
+        when 'B' => l := 'b';
+        when 'C' => l := 'c';
+        when 'D' => l := 'd';
+        when 'E' => l := 'e';
+        when 'F' => l := 'f';
+        when 'G' => l := 'g';
+        when 'H' => l := 'h';
+        when 'I' => l := 'i';
+        when 'J' => l := 'j';
+        when 'K' => l := 'k';
+        when 'L' => l := 'l';
+        when 'M' => l := 'm';
+        when 'N' => l := 'n';
+        when 'O' => l := 'o';
+        when 'P' => l := 'p';
+        when 'Q' => l := 'q';
+        when 'R' => l := 'r';
+        when 'S' => l := 's';
+        when 'T' => l := 't';
+        when 'U' => l := 'u';
+        when 'V' => l := 'v';
+        when 'W' => l := 'w';
+        when 'X' => l := 'x';
+        when 'Y' => l := 'y';
+        when 'Z' => l := 'z';
+        when others => l := c;
+    end case;
+
+      return l;
+
+   end to_lower;
+
+
+
+   -- convert a string to upper case
+
+   function to_upper(s: string) return string is
+
+     variable uppercase: string (s'range);
+
+   begin
+
+     for i in s'range loop
+        uppercase(i):= to_upper(s(i));
+     end loop;
+     return uppercase;
+
+   end to_upper;
+
+
+
+   -- convert a string to lower case
+
+   function to_lower(s: string) return string is
+
+     variable lowercase: string (s'range);
+
+   begin
+
+     for i in s'range loop
+        lowercase(i):= to_lower(s(i));
+     end loop;
+     return lowercase;
+
+   end to_lower;
+
+
+
+-- functions to convert strings into other types
+
+
+-- converts a character into a std_logic
+
+function to_std_logic(c: character) return std_logic is 
+    variable sl: std_logic;
+    begin
+      case c is
+        when 'U' => 
+           sl := 'U'; 
+        when 'X' =>
+           sl := 'X';
+        when '0' => 
+           sl := '0';
+        when '1' => 
+           sl := '1';
+        when 'Z' => 
+           sl := 'Z';
+        when 'W' => 
+           sl := 'W';
+        when 'L' => 
+           sl := 'L';
+        when 'H' => 
+           sl := 'H';
+        when '-' => 
+           sl := '-';
+        when others =>
+           sl := 'X'; 
+    end case;
+   return sl;
+  end to_std_logic;
+
+
+-- converts a string into std_logic_vector
+
+function to_std_logic_vector(s: string) return std_logic_vector is 
+  variable slv: std_logic_vector(s'high-s'low downto 0);
+  variable k: integer;
+begin
+   k := s'high-s'low;
+  for i in s'range loop
+     slv(k) := to_std_logic(s(i));
+     k      := k - 1;
+  end loop;
+  return slv;
+end to_std_logic_vector;                                       
+                                       
+                                       
+                                       
+                                       
+                                       
+                                       
+----------------
+--  file I/O  --
+----------------
+
+
+
+-- read variable length string from input file
+     
+procedure str_read(file in_file: TEXT; 
+                   res_string: out string) is
+       
+       variable l:         line;
+       variable c:         character;
+       variable is_string: boolean;
+       
+   begin
+           
+     readline(in_file, l);
+     -- clear the contents of the result string
+     for i in res_string'range loop
+         res_string(i) := ' ';
+     end loop;   
+     -- read all characters of the line, up to the length  
+     -- of the results string
+     for i in res_string'range loop
+        read(l, c, is_string);
+        res_string(i) := c;
+        if not is_string then -- found end of line
+           exit;
+        end if;   
+     end loop; 
+                     
+end str_read;
+
+
+-- print string to a file
+procedure print(file out_file: TEXT;
+                new_string: in  string) is
+       
+       variable l: line;
+       
+   begin
+      
+     write(l, new_string);
+     writeline(out_file, l);
+                     
+end print;
+
+
+-- print character to a file and start new line
+procedure print(file out_file: TEXT;
+                char: in  character) is
+       
+       variable l: line;
+       
+   begin
+      
+     write(l, char);
+     writeline(out_file, l);
+                     
+end print;
+
+
+
+-- appends contents of a string to a file until line feed occurs
+-- (LF is considered to be the end of the string)
+
+procedure str_write(file out_file: TEXT; 
+                    new_string: in  string) is
+ begin
+      
+   for i in new_string'range loop
+      print(out_file, new_string(i));
+      if new_string(i) = LF then -- end of string
+         exit;
+      end if;
+   end loop;               
+                     
+end str_write;
+
+
+
+
+end txt_util;
diff --git a/combiner_cts/combiner.lpf b/combiner_cts/combiner.lpf
new file mode 100644 (file)
index 0000000..6d5a39d
--- /dev/null
@@ -0,0 +1,71 @@
+COMMERCIAL ;
+BLOCK RESETPATHS ;
+BLOCK ASYNCPATHS ;
+BLOCK RD_DURING_WR_PATHS ;
+
+SYSCONFIG MCCLK_FREQ = 20;
+
+FREQUENCY PORT CLOCK_PLL 200 MHz;
+FREQUENCY PORT CLOCK_PCLK 200 MHz;
+
+
+FREQUENCY NET "THE_MEDIA*/clk_rx_full" 200 MHz; # HOLD_MARGIN 500 ps 
+FREQUENCY NET "THE_MEDIA*/clk_tx_full" 200 MHz; # HOLD_MARGIN 500 ps 
+
+
+
+LOCATE COMP          "THE_MEDIA_INTERFACE/gen_pcs0.THE_SERDES/PCSD_INST"  SITE "PCSC" ;
+LOCATE COMP          "THE_MEDIA_4_DOWN_A/THE_SERDES/PCSD_INST"  SITE "PCSA" ;
+LOCATE COMP          "THE_MEDIA_4_DOWN_B/THE_SERDES/PCSD_INST" SITE "PCSB" ;
+LOCATE COMP          "THE_MEDIA_4_DOWN_D/THE_SERDES/PCSD_INST" SITE "PCSD" ;
+
+REGION               "MEDIA_A" "R80C91D" 35 36;
+REGION               "MEDIA_B" "R80C55D" 35 36;
+REGION               "MEDIA_C" "R80C127D" 35 36;
+REGION               "MEDIA_D" "R80C19D" 35 36;
+
+
+#REGION               "MEDIA_DOWN1" "R93C10D" 22 160;
+LOCATE UGROUP        "THE_MEDIA_4_DOWN_A/media_interface_group" REGION "MEDIA_A" ;
+LOCATE UGROUP        "THE_MEDIA_4_DOWN_B/media_interface_group" REGION "MEDIA_B" ;
+LOCATE UGROUP        "THE_MEDIA_4_DOWN_D/media_interface_group" REGION "MEDIA_D" ;
+LOCATE UGROUP        "THE_MEDIA_INTERFACE/media_interface_group" REGION "MEDIA_C" ;
+
+
+
+
+MULTICYCLE TO CELL      "THE_MEDIA*/sci*" 20 ns;
+MULTICYCLE FROM CELL    "THE_MEDIA*/sci*" 20 ns;
+MULTICYCLE TO CELL      "THE_MEDIA*/PROC_SCI_CTRL.wa*" 20 ns;
+BLOCK PATH TO   CLKNET  "THE_MEDIA*/sci_write_i";
+BLOCK PATH FROM CLKNET  "THE_MEDIA*/sci_write_i";
+BLOCK PATH TO   CLKNET  "THE_MEDIA*/sci_read_i";
+BLOCK PATH FROM CLKNET  "THE_MEDIA*/sci_read_i";
+MULTICYCLE TO CLKNET    "THE_MEDIA*/sci_read_i" 15 ns; 
+MULTICYCLE FROM CLKNET  "THE_MEDIA*/sci_read_i" 15 ns; 
+MULTICYCLE TO CLKNET    "THE_MEDIA*/sci_write_i" 15 ns; 
+MULTICYCLE FROM CLKNET  "THE_MEDIA*/sci_write_i" 15 ns; 
+
+MULTICYCLE FROM CELL "THE_MEDIA*/gen_control.*.gen_used_control.THE_MED_CONTROL/THE_RX_FSM/cs*"            TO CELL   "THE_MEDIA*/THE_SCI_READER/*" 20 ns;
+
+MULTICYCLE TO ASIC  "THE_MEDIA*/THE_SERDES/PCSD_INST" PIN SCIRD 15 ns;
+MAXDELAY   TO ASIC  "THE_MEDIA*/THE_SERDES/PCSD_INST" PIN SCIRD 15 ns;
+
+
+#If these signals do not exist, somebody messed around with the design...
+MULTICYCLE TO CELL   "THE_TOOLS/THE_SPI_RELOAD_THE_SPI_MASTER_THE_SPI_SLIM_tx_sreg_oregio[*]" 20 ns;
+MULTICYCLE TO CELL   "THE_CLOCK_RESET/THE_RESET_HANDLER/final_reset*" 20 ns;
+# # # # MULTICYCLE FROM CELL "THE_CLOCK_RESET/gen_norecov_clock.clear_n_i" 20 ns;
+MULTICYCLE TO CELL   "THE_CLOCK_RESET/THE_RESET_HANDLER/trb_reset_pulse*" 20 ns;
+MULTICYCLE FROM CELL "THE_CLOCK_RESET/clear_n_i" 20 ns;
+# # # # MULTICYCLE FROM CELL "THE_CLOCK_RESET/THE_RESET_HANDLER/final_reset*" 30 ns;
+GSR_NET NET "GSR_N"; 
+
+BLOCK PATH TO   PORT "LED*";
+BLOCK PATH TO   PORT "SFP*";
+BLOCK PATH FROM PORT "SFP*";
+BLOCK PATH TO   PORT "PROGRAMN";
+BLOCK PATH TO   PORT "TEMPSENS";
+BLOCK PATH FROM PORT "TEMPSENS";
+BLOCK PATH TO   PORT "TEST_LINE";
+
diff --git a/combiner_cts/combiner.prj b/combiner_cts/combiner.prj
new file mode 100644 (file)
index 0000000..3d8fe96
--- /dev/null
@@ -0,0 +1,240 @@
+
+# implementation: "workdir"
+impl -add workdir -type fpga
+
+# device options
+set_option -technology LATTICE-ECP3
+set_option -part LFE3_150EA
+set_option -package FN1156C
+set_option -speed_grade -8
+set_option -part_companion ""
+
+# compilation/mapping options
+set_option -default_enum_encoding sequential
+set_option -symbolic_fsm_compiler 1
+set_option -top_module "combiner"
+set_option -resource_sharing false
+
+# map options
+set_option -frequency 120
+set_option -fanout_limit 100
+set_option -disable_io_insertion 0
+set_option -retiming 1
+set_option -pipe 1
+set_option -force_gsr false
+set_option -fixgatedclocks 3
+set_option -fixgeneratedclocks 3
+set_option -compiler_compatible true
+
+set_option -max_parallel_jobs 3
+#set_option -automatic_compile_point 1
+#set_option -continue_on_error 1
+set_option -resolve_multiple_driver 1
+
+# simulation options
+set_option -write_verilog 0
+set_option -write_vhdl 1
+
+# automatic place and route (vendor) options
+set_option -write_apr_constraint 0
+
+# set result format/file last
+project -result_format "edif"
+project -result_file "workdir/combiner.edf"
+
+#implementation attributes
+
+set_option -vlog_std v2001
+set_option -project_relative_includes 1
+impl -active "workdir"
+
+####################
+
+#CTS
+add_file -vhdl -lib work "../../trb3/cts/source/cts_pkg.vhd"
+#add_file -vhdl -lib work "../../trb3/cts/source/m26_sensor_etm.vhd"
+#add_file -vhdl -lib work "../../trb3/cts/source/mbs_master.vhd"
+#add_file -vhdl -lib work "../../trb3/cts/source/timestamp_generator.vhd"
+add_file -vhdl -lib work "../../trb3/cts/source/cts_fifo.vhd"
+add_file -vhdl -lib work "../../trb3/cts/source/cts_trg_input.vhd"
+add_file -vhdl -lib work "../../trb3/cts/source/cts_trg_coin.vhd"
+add_file -vhdl -lib work "../../trb3/cts/source/cts_trg_pseudorand_pulser.vhd"
+add_file -vhdl -lib work "../../trb3/cts/source/cts_trigger.vhd"
+add_file -vhdl -lib work "../../trb3/cts/source/cts.vhd"
+
+#Packages
+add_file -vhdl -lib work "workdir/version.vhd"
+add_file -vhdl -lib work "config.vhd"
+add_file -vhdl -lib work "../../trb3/base/trb3_components.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_std.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_hub_func.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_components.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net_gbe_protocols.vhd"
+add_file -vhdl -lib work "../../trbnet/gbe_trb/base/trb_net_gbe_components.vhd"
+
+#Basic Infrastructure
+add_file -vhdl -lib work "../cores/pll_200_100.vhd"
+add_file -vhdl -lib work "../../trb3sc/cores/pll_in240_out200.vhd"
+add_file -vhdl -lib work "../../trb3sc/cores/pll_in240_out240.vhd"
+add_file -vhdl -lib work "../../trb3/base/cores/pll_200_4.vhd"
+add_file -vhdl -lib work "../code/clock_reset_handler_combiner.vhd"
+add_file -vhdl -lib work "../../trbnet/special/trb_net_reset_handler.vhd"
+add_file -vhdl -lib work "../../trbnet/special/spi_flash_and_fpga_reload_record.vhd"
+add_file -vhdl -lib work "../../trb3/base/code/sedcheck.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/priority_arbiter.vhd"
+
+
+#Fifos
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/spi_dpram_32_to_8.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/lattice_ecp3_fifo_18x1k.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/trb_net16_fifo_arch.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/lattice_ecp3_fifo_16bit_dualport.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/trb_net_fifo_16bit_bram_dualport.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/lattice_ecp2m_fifo.vhd" 
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_36x256_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_36x512_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_36x1k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_36x2k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_36x4k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_36x8k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_36x16k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_36x32k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_18x256_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_18x512_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_18x1k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_18x2k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_18x8k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_9x2k_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp2m/fifo/fifo_var_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_19x16_obuf.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/lattice_ecp3_fifo_16x16_dualport.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/lattice_ecp3_fifo_18x16_dualport.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/lattice_ecp3_fifo_18x16_dualport_oreg.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/ram_18x256_oreg.vhd"
+add_file -vhdl -lib work "./core/FIFO_36x64.vhd"
+
+#Flash & Reload, Tools
+add_file -vhdl -lib work "../../trbnet/special/slv_register.vhd"
+add_file -vhdl -lib work "../../trbnet/special/spi_master.vhd"
+add_file -vhdl -lib work "../../trbnet/special/spi_slim.vhd"
+add_file -vhdl -lib work "../../trbnet/special/spi_databus_memory.vhd"
+add_file -vhdl -lib work "../../trbnet/special/fpga_reboot.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/trb3sc_tools.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/debuguart.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/lcd.vhd"
+add_file -vhdl -lib work "../../trbnet/special/uart.vhd"
+add_file -vhdl -lib work "../../trbnet/special/uart_rec.vhd"
+add_file -vhdl -lib work "../../trbnet/special/uart_trans.vhd"
+add_file -vhdl -lib work "../../trbnet/special/spi_ltc2600.vhd"
+add_file -vhdl -lib work "../../dirich/code/ltc2600_handler.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/load_settings.vhd"
+add_file -vhdl -lib work "../../trb3sc/code/spi_master_generic.vhd"
+add_file -vhdl -lib work "../../trb3/base/code/input_to_trigger_logic_record.vhd"
+add_file -vhdl -lib work "../../trb3/base/code/input_statistics.vhd"
+
+#SlowControl files
+add_file -vhdl -lib work "../../trbnet/trb_net16_regio_bus_handler.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_regio_bus_handler_record.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_regIO.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_onewire.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_addresses.vhd"
+
+#Media interface
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/med_sync_define.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/rx_control.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/tx_control.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/rx_reset_fsm.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/tx_reset_fsm.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/sci_reader.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/sync/med_sync_control.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp3_sfp/serdes_sync_0.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp3_sfp/serdes_sync_3.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp3_sfp/serdes_sync_4.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/ecp3_sfp/serdes_sync_4_slave3.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/med_ecp3_sfp_sync.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/med_ecp3_sfp_sync_4.vhd"
+add_file -vhdl -lib work "../../trbnet/media_interfaces/med_ecp3_sfp_sync_4_slave3.vhd"
+
+#TrbNet Endpoint
+add_file -vhdl -lib work "../../trbnet/trb_net16_term_buf.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_CRC.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_CRC8.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/rom_16x8.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/ram.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/pulse_sync.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/state_sync.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/ram_16x8_dp.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/ram_16x16_dp.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/ram_dp.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_term.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_sbuf.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_sbuf5.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_sbuf6.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_sbuf.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_priority_encoder.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_dummy_fifo.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_dummy_fifo.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_term_ibuf.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_priority_arbiter.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net_pattern_gen.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_obuf_nodata.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_obuf.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_ibuf.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_api_base.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_iobuf.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_io_multiplexer.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_trigger.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_ipudata.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_endpoint_hades_full.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/signal_sync.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/ram_dp_rw.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/pulse_stretch.vhd"
+
+#Hub
+add_file -vhdl -lib work "../../trbnet/trb_net16_api_ipu_streaming.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_hub_streaming_port.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_hub_streaming_port_sctrl_cts.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_api_ipu_streaming_internal.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_hub_base.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_hub_logic_2.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_hub_ipu_logic.vhd"
+add_file -vhdl -lib work "../../trbnet/basics/wide_adder_17x16.vhd"
+add_file -vhdl -lib work "../../trbnet/lattice/ecp3/fifo/fifo_19x16.vhd"
+
+add_file -vhdl -lib work "../../trbnet/special/handler_lvl1.vhd"
+add_file -vhdl -lib work "../../trbnet/special/handler_data.vhd"
+add_file -vhdl -lib work "../../trbnet/special/handler_ipu.vhd"
+add_file -vhdl -lib work "../../trbnet/special/handler_trigger_and_data.vhd"
+add_file -vhdl -lib work "../../trbnet/trb_net16_endpoint_hades_full_handler_record.vhd"
+add_file -vhdl -lib work "../../trbnet/special/bus_register_handler.vhd"
+
+#TDC Calibration
+#add_file -vhdl -lib work "./code/Calibration.vhd"
+#add_file -vhdl -lib work "./code/Cal_Limits_v2.vhd"
+#add_file -vhdl -lib work "./code/cnt_val.vhd"
+#add_file -vhdl -lib work "./code/default_val.vhd"
+#add_file -vhdl -lib work "./code/LUT.vhd"
+#add_file -vhdl -lib work "./code/Memory.vhd"
+#add_file -vhdl -lib work "./code/Memory_curr.vhd"
+#add_file -vhdl -lib work "./code/read_cnt.vhd"
+#add_file -vhdl -lib work "./code/compare_old.vhd"
+#add_file -vhdl -lib work "./code/Calc_output.vhd"
+
+add_file -vhdl -lib work "./code_EBR/Calibration.vhd"
+add_file -vhdl -lib work "./code_EBR/Cal_Limits_v2.vhd"
+add_file -vhdl -lib work "./code_EBR/cnt_val.vhd"
+add_file -vhdl -lib work "./code_EBR/default_val.vhd"
+add_file -vhdl -lib work "./code_EBR/LUT.vhd"
+add_file -vhdl -lib work "./code_EBR/Memory.vhd"
+add_file -vhdl -lib work "./code_EBR/Memory_curr.vhd"
+add_file -vhdl -lib work "./code_EBR/read_cnt.vhd"
+add_file -vhdl -lib work "./code_EBR/compare_old.vhd"
+add_file -vhdl -lib work "./code_EBR/Calc_output.vhd"
+
+add_file -vhdl -lib work "./core/RAM_pseudo_DP_wReg_36x1k.vhd"
+
+add_file -vhdl -lib work "./combiner.vhd"
+add_file -fpga_constraint "./synplify.fdc"
+
+
+
diff --git a/combiner_cts/combiner.vhd b/combiner_cts/combiner.vhd
new file mode 100644 (file)
index 0000000..5548af8
--- /dev/null
@@ -0,0 +1,961 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+library work;
+use work.version.all;
+use work.config.all;
+use work.trb_net_std.all;
+use work.trb_net_components.all;
+use work.trb3_components.all;
+use work.trb_net16_hub_func.all;
+use work.trb_net_gbe_components.all;
+use work.med_sync_define.all;
+use work.cts_pkg.all;
+
+entity combiner is
+  port(
+    CLOCK_PCLK           : in    std_logic; 
+    CLOCK_PLL            : in    std_logic;
+
+    TRIGGER_IN           : in    std_logic;
+    TRIGGER_OUT          : out   std_logic;
+    TRIGGER_TO_CTS       : out   std_logic;
+    
+    --Additional IO
+    RJ_CLOCK             : inout std_logic_vector( 3 downto 0); --1 not available here
+    RJ_TRIG              : inout std_logic_vector( 2 downto 1); --0,3 not available here
+    POWER_BOARD_IO       : inout std_logic_vector( 4 downto 1);
+    RJ45_SIG_1           : in    std_logic;
+    RJ45_SIG_2           : out    std_logic;
+    RJ45_SIG_3           : out    std_logic;
+    RJ45_SIG_4           : out    std_logic;
+    RJ45_SIG_5           : out    std_logic;
+    --RJ45_SIG             : in    std_logic_vector( 5 downto 2);
+    
+    --Lines to slaves
+    BACK_MASTER_READY    : out   std_logic_vector(12 downto 1); --sig_1
+    BACK_SLAVE_READY     : in    std_logic_vector(12 downto 1); --sig_2
+    BACK_TRIG1           : in    std_logic_vector(12 downto 1); --sig_3
+    BACK_TRIG2           : in    std_logic_vector(12 downto 1); --sig_4
+    BACK_LDO_EN          : out   std_logic_vector(12 downto 1); --en_ldo
+    BACK_SPARE           : inout std_logic_vector(12 downto 1); --sig_5
+    
+    --LED
+    LED_GREEN            : out   std_logic;
+    LED_YELLOW           : out   std_logic;
+    LED_ORANGE           : out   std_logic;
+    LED_RED              : out   std_logic;
+    LED_RJ_GREEN         : out   std_logic_vector( 1 downto 0); --0: clock, 1:trigger
+    LED_RJ_RED           : out   std_logic_vector( 1 downto 0);
+    LED_SFP_GREEN        : out   std_logic;
+    LED_SFP_RED          : out   std_logic;
+    
+    --SFP
+    SFP_LOS              : in    std_logic;
+    SFP_MOD0             : in    std_logic;  
+    SFP_MOD1             : inout std_logic := 'Z';
+    SFP_MOD2             : inout std_logic := 'Z';
+    SFP_TX_DIS           : out   std_logic := '0';  
+    
+    --Switch
+    CLOCK_SELECT_IN      : in    std_logic;
+    TRIGGER_SEL_OUT      : out   std_logic_vector( 2 downto 1); --1 to FPGA, 2 to Backplane, 
+                                                                --'0' from FPGA, '1' from connector                              
+    --ADC
+    ADC_CLK              : out   std_logic;
+    ADC_CS               : out   std_logic;
+    ADC_DIN              : out   std_logic;
+    ADC_DOUT             : in    std_logic;
+
+    --Flash, 1-wire, Reload
+    FLASH_CLK            : out   std_logic;
+    FLASH_CS             : out   std_logic;
+    FLASH_IN             : out   std_logic;
+    FLASH_OUT            : in    std_logic;
+    PROGRAMN             : out   std_logic;
+    TEMPSENS             : inout std_logic;
+    POWER_GOOD           : in    std_logic;
+    
+    --Test Connectors
+    TEST_LINE            : inout std_logic_vector(18 downto 1);
+    TEST_JTAG            : out   std_logic_vector(20 downto 7)
+    );
+
+  attribute syn_useioff                  : boolean;
+  attribute syn_useioff of FLASH_CLK  : signal is true;
+  attribute syn_useioff of FLASH_CS   : signal is true;
+  attribute syn_useioff of FLASH_IN   : signal is true;
+  attribute syn_useioff of FLASH_OUT  : signal is true;
+
+end entity;
+
+architecture arch of combiner is
+  attribute syn_keep     : boolean;
+  attribute syn_preserve : boolean;
+  
+  signal clk_sys, clk_full, clk_full_osc   : std_logic;
+  signal GSR_N       : std_logic;
+  signal reset_i     : std_logic;
+  signal clear_i     : std_logic;
+  
+  signal time_counter      : unsigned(31 downto 0) := (others => '0');
+  signal led               : std_logic_vector(1 downto 0);
+  signal debug_clock_reset : std_logic_vector(31 downto 0);
+  signal trigger_select_i  : std_logic_vector(1 downto 0);
+  signal select_i          : std_logic_vector(1 downto 0);
+  signal led_off_i         : std_logic;
+  signal enable_ldo_i      : std_logic_vector(11 downto 0);
+
+  signal spi_cs, spi_miso, spi_mosi, spi_clk : std_logic_vector(15 downto 0);
+  --Media Interface
+  signal med2int           : med2int_array_t(0 to INTERFACE_NUM); -- 1 more due to uplink
+  signal int2med           : int2med_array_t(0 to INTERFACE_NUM); -- 1 more due to uplink
+  signal med_stat_debug    : std_logic_vector (1*64-1  downto 0);
+  
+  signal ctrlbus_rx, bustools_rx, bustc_rx, bus_master_out, handlerbus_rx, busdebug_rx,  bustdccal_rx, buscts_rx   : CTRLBUS_RX;
+  signal ctrlbus_tx, bustools_tx, bustc_tx, bus_master_in , busdebug_tx  , bustdccal_tx, buscts_tx                : CTRLBUS_TX;
+  
+  signal bussci_tx : ctrlbus_tx_array_t(0 to 3);
+  signal bussci_rx : ctrlbus_rx_array_t(0 to 3);
+  
+  signal common_stat_reg         : std_logic_vector(std_COMSTATREG*32-1 downto 0) := (others => '0');
+  signal common_ctrl_reg         : std_logic_vector(std_COMCTRLREG*32-1 downto 0);
+  
+  signal sed_error_i    : std_logic;
+  signal bus_master_active : std_logic;
+  
+  signal uart_tx, uart_rx : std_logic;
+
+  signal timer          : TIMERS;
+  signal lcd_data       : std_logic_vector(511 downto 0);
+  signal header_io      : std_logic_vector(10 downto  1);
+  
+  attribute syn_keep of GSR_N     : signal is true;
+  attribute syn_preserve of GSR_N : signal is true;  
+
+
+  signal med_dataready_out    : std_logic_vector (INTERFACE_NUM-1 downto 0);
+  signal med_data_out         : std_logic_vector (INTERFACE_NUM*c_DATA_WIDTH-1 downto 0);
+  signal med_packet_num_out   : std_logic_vector (INTERFACE_NUM*c_NUM_WIDTH-1 downto 0);
+  signal med_read_in          : std_logic_vector (INTERFACE_NUM-1 downto 0);
+  signal med_dataready_in     : std_logic_vector (INTERFACE_NUM-1 downto 0);
+  signal med_data_in          : std_logic_vector (INTERFACE_NUM*c_DATA_WIDTH-1 downto 0);
+  signal med_packet_num_in    : std_logic_vector (INTERFACE_NUM*c_NUM_WIDTH-1 downto 0);
+  signal med_read_out         : std_logic_vector (INTERFACE_NUM-1 downto 0);
+  signal med_stat_op          : std_logic_vector (INTERFACE_NUM*16-1 downto 0);
+  signal med_ctrl_op          : std_logic_vector (INTERFACE_NUM*16-1 downto 0);
+  signal rdack, wrack         : std_logic;  
+  signal back_master_ready_i  : std_logic_vector(12 downto 1);
+  signal back_slave_ready_i   : std_logic_vector(12 downto 1);
+  signal master_ready_override_i : std_logic_vector(12 downto 1);
+  
+  signal monitor_inputs_i     : std_logic_vector(MONITOR_INPUT_NUM-1 downto 0);
+  signal trig_gen_out_i       : std_logic_vector(TRIG_GEN_OUTPUT_NUM-1 downto 0);
+  signal trigger_busy_i              : std_logic;
+  signal cts_trigger_out             : std_logic;
+  
+  signal gbe_cts_number                   : std_logic_vector(15 downto 0);
+  signal gbe_cts_code                     : std_logic_vector(7 downto 0);
+  signal gbe_cts_information              : std_logic_vector(7 downto 0);
+  signal gbe_cts_start_readout            : std_logic;
+  signal gbe_cts_readout_type             : std_logic_vector(3 downto 0);
+  signal gbe_cts_readout_finished         : std_logic;
+  signal gbe_cts_status_bits              : std_logic_vector(31 downto 0);
+  signal gbe_fee_data                     : std_logic_vector(15 downto 0);
+  signal gbe_fee_dataready                : std_logic;
+  signal gbe_fee_read                     : std_logic;
+  signal gbe_fee_status_bits              : std_logic_vector(31 downto 0);
+  signal gbe_fee_busy                     : std_logic;  
+
+  signal gsc_init_data, gsc_reply_data : std_logic_vector(15 downto 0);
+  signal gsc_init_read, gsc_reply_read : std_logic;
+  signal gsc_init_dataready, gsc_reply_dataready : std_logic;
+  signal gsc_init_packet_num, gsc_reply_packet_num : std_logic_vector(2 downto 0);
+  signal gsc_busy : std_logic;
+
+  signal cts_rdo_trg_status_bits_cts : std_logic_vector(31 downto 0) := (others => '0');
+  signal cts_rdo_data                : std_logic_vector(31 downto 0);
+  signal cts_rdo_write               : std_logic;
+  signal cts_rdo_finished            : std_logic;
+
+  signal cts_ext_trigger             : std_logic;
+  signal cts_ext_status              : std_logic_vector(31 downto 0) := (others => '0');
+  signal cts_ext_control             : std_logic_vector(31 downto 0);
+  signal cts_ext_debug               : std_logic_vector(31 downto 0);
+  signal cts_ext_header              : std_logic_vector(1 downto 0) := "00";
+
+  signal cts_rdo_additional_data            : std_logic_vector(32*cts_rdo_additional_ports-1 downto 0);
+  signal cts_rdo_additional_write           : std_logic_vector(cts_rdo_additional_ports-1 downto 0) := (others => '0');
+  signal cts_rdo_additional_finished        : std_logic_vector(cts_rdo_additional_ports-1 downto 0) := (others => '1');
+  signal cts_rdo_trg_status_bits_additional : std_logic_vector(32*cts_rdo_additional_ports-1 downto 0) := (others => '0');
+  
+  signal cts_rdo_additional : readout_tx_array_t(0 to cts_rdo_additional_ports-1);
+  signal cts_rdo_rx : READOUT_RX;
+
+  signal cts_addon_triggers_in       : std_logic_vector(ADDON_LINE_COUNT-1 downto 0);
+--   signal cts_addon_activity_i,
+--         cts_addon_selected_i        : std_logic_vector(6 downto 0);
+        
+--   signal cts_periph_trigger_i        : std_logic_vector(19 downto 0);
+--   signal cts_output_multiplexers_i   : std_logic_vector(CTS_OUTPUT_MULTIPLEXERS - 1 downto 0);
+
+--   signal cts_periph_lines_i   : std_logic_vector(CTS_OUTPUT_INPUTS - 1 downto 0);
+
+  signal cts_trg_send                : std_logic;
+  signal cts_trg_type                : std_logic_vector(3 downto 0);
+  signal cts_trg_number              : std_logic_vector(15 downto 0);
+  signal cts_trg_information         : std_logic_vector(23 downto 0);
+  signal cts_trg_code                : std_logic_vector(7 downto 0);
+  signal cts_trg_status_bits         : std_logic_vector(31 downto 0);
+  signal cts_trg_busy                : std_logic;
+
+  signal cts_ipu_send                : std_logic;
+  signal cts_ipu_type                : std_logic_vector(3 downto 0);
+  signal cts_ipu_number              : std_logic_vector(15 downto 0);
+  signal cts_ipu_information         : std_logic_vector(7 downto 0);
+  signal cts_ipu_code                : std_logic_vector(7 downto 0);
+  signal cts_ipu_status_bits         : std_logic_vector(31 downto 0);
+  signal cts_ipu_busy                : std_logic;
+
+
+
+begin
+
+---------------------------------------------------------------------------
+-- Clock & Reset Handling
+---------------------------------------------------------------------------
+THE_CLOCK_RESET :  entity work.clock_reset_handler
+  port map(
+    CLOCK_IN        => CLOCK_PCLK,
+    RESET_FROM_NET  => med2int(12).stat_op(13),
+    CLOCK_SELECT_IN => CLOCK_SELECT_IN,
+    
+    BUS_RX          => bustc_rx,
+    BUS_TX          => bustc_tx,
+
+    RESET_OUT       => reset_i,
+    CLEAR_OUT       => clear_i,
+    GSR_OUT         => GSR_N,
+    
+    RAW_CLK_OUT     => open,
+    SYS_CLK_OUT     => clk_sys,
+    REF_CLK_OUT     => clk_full_osc,
+    
+    DEBUG_OUT       => debug_clock_reset
+    );
+
+---------------------------------------------------------------------------
+-- TrbNet Uplink
+---------------------------------------------------------------------------
+
+THE_MEDIA_INTERFACE : entity work.med_ecp3_sfp_sync
+  generic map(
+    SERDES_NUM    => 0,
+    IS_SYNC_SLAVE => c_YES
+    )
+  port map(
+    CLK_REF_FULL       => med2int(12).clk_full,
+    CLK_INTERNAL_FULL  => clk_full_osc,
+    SYSCLK        => clk_sys,
+    RESET         => reset_i,
+    CLEAR         => clear_i,
+    --Internal Connection
+    MEDIA_MED2INT => med2int(12),
+    MEDIA_INT2MED => int2med(12),
+
+    --Sync operation
+    RX_DLM      => open,
+    RX_DLM_WORD => open,
+    TX_DLM      => open,
+    TX_DLM_WORD => open,
+
+    --SFP Connection
+    SD_PRSNT_N_IN  => SFP_MOD0,
+    SD_LOS_IN      => SFP_LOS,
+    SD_TXDIS_OUT   => SFP_TX_DIS,
+    --Control Interface
+    BUS_RX         => bussci_rx(2),
+    BUS_TX         => bussci_tx(2),
+    -- Status and control port
+    STAT_DEBUG     => med_stat_debug(63 downto 0),
+    CTRL_DEBUG     => open
+    );
+    
+---------------------------------------------------------------------------
+-- TrbNet Downlink
+---------------------------------------------------------------------------
+
+THE_MEDIA_4_DOWN_A : entity work.med_ecp3_sfp_sync_4
+  generic map(
+    IS_SYNC_SLAVE   => (c_NO, c_NO, c_NO, c_NO),
+    IS_USED         => (c_YES,c_YES,c_YES,c_YES)
+    )
+  port map(
+    CLK_REF_FULL       => clk_full_osc, --med2int(0).clk_full,
+    CLK_INTERNAL_FULL  => clk_full_osc,
+    SYSCLK             => clk_sys,
+    RESET              => reset_i,
+    CLEAR              => clear_i,
+    
+    --Internal Connection
+    MEDIA_MED2INT(0)   => med2int(6),
+    MEDIA_MED2INT(1)   => med2int(7),
+    MEDIA_MED2INT(2)   => med2int(10),
+    MEDIA_MED2INT(3)   => med2int(11),
+    MEDIA_INT2MED(0)   => int2med(6),
+    MEDIA_INT2MED(1)   => int2med(7),
+    MEDIA_INT2MED(2)   => int2med(10),
+    MEDIA_INT2MED(3)   => int2med(11),
+
+    --Sync operation
+    RX_DLM             => open,
+    RX_DLM_WORD        => open,
+    TX_DLM             => open,
+    TX_DLM_WORD        => open,
+    
+    --SFP Connection
+    SD_PRSNT_N_IN(0)  => back_slave_ready_i(7),
+    SD_PRSNT_N_IN(1)  => back_slave_ready_i(8),
+    SD_PRSNT_N_IN(2)  => back_slave_ready_i(11),
+    SD_PRSNT_N_IN(3)  => back_slave_ready_i(12),
+    SD_LOS_IN(0)      => back_slave_ready_i(7),
+    SD_LOS_IN(1)      => back_slave_ready_i(8),
+    SD_LOS_IN(2)      => back_slave_ready_i(11),
+    SD_LOS_IN(3)      => back_slave_ready_i(12),
+    SD_TXDIS_OUT(0)   => back_master_ready_i(7),
+    SD_TXDIS_OUT(1)   => back_master_ready_i(8),
+    SD_TXDIS_OUT(2)   => back_master_ready_i(11),
+    SD_TXDIS_OUT(3)   => back_master_ready_i(12),
+    
+    --Control Interface
+    BUS_RX             => bussci_rx(0),
+    BUS_TX             => bussci_tx(0),
+
+    -- Status and control port
+    STAT_DEBUG         => open, --med_stat_debug(63 downto 0),
+    CTRL_DEBUG         => open
+  );   
+
+
+THE_MEDIA_4_DOWN_B : entity work.med_ecp3_sfp_sync_4
+  generic map(
+    IS_SYNC_SLAVE   => (c_NO, c_NO, c_NO, c_NO),
+    IS_USED         => (c_YES,c_YES,c_YES,c_YES)
+    )
+  port map(
+    CLK_REF_FULL       => clk_full_osc, --med2int(0).clk_full,
+    CLK_INTERNAL_FULL  => clk_full_osc,
+    SYSCLK             => clk_sys,
+    RESET              => reset_i,
+    CLEAR              => clear_i,
+    
+    --Internal Connection
+    MEDIA_MED2INT(0)   => med2int(8),
+    MEDIA_MED2INT(1)   => med2int(9),
+    MEDIA_MED2INT(2)   => med2int(3),
+    MEDIA_MED2INT(3)   => med2int(2),
+    MEDIA_INT2MED(0)   => int2med(8),
+    MEDIA_INT2MED(1)   => int2med(9),
+    MEDIA_INT2MED(2)   => int2med(3),
+    MEDIA_INT2MED(3)   => int2med(2),
+
+    --Sync operation
+    RX_DLM             => open,
+    RX_DLM_WORD        => open,
+    TX_DLM             => open,
+    TX_DLM_WORD        => open,
+    
+    --SFP Connection
+    SD_PRSNT_N_IN(0)  => back_slave_ready_i(9),
+    SD_PRSNT_N_IN(1)  => back_slave_ready_i(10),
+    SD_PRSNT_N_IN(2)  => back_slave_ready_i(4),
+    SD_PRSNT_N_IN(3)  => back_slave_ready_i(3),
+    SD_LOS_IN(0)      => back_slave_ready_i(9),
+    SD_LOS_IN(1)      => back_slave_ready_i(10),
+    SD_LOS_IN(2)      => back_slave_ready_i(4),
+    SD_LOS_IN(3)      => back_slave_ready_i(3),
+    SD_TXDIS_OUT(0)   => back_master_ready_i(9),
+    SD_TXDIS_OUT(1)   => back_master_ready_i(10),
+    SD_TXDIS_OUT(2)   => back_master_ready_i(4),
+    SD_TXDIS_OUT(3)   => back_master_ready_i(3),
+    
+    --Control Interface
+    BUS_RX             => bussci_rx(1),
+    BUS_TX             => bussci_tx(1),
+
+    -- Status and control port
+    STAT_DEBUG         => open, --med_stat_debug(63 downto 0),
+    CTRL_DEBUG         => open
+  ); 
+
+
+THE_MEDIA_4_DOWN_D : entity work.med_ecp3_sfp_sync_4
+  generic map(
+    IS_SYNC_SLAVE   => (c_NO, c_NO, c_NO, c_NO),
+    IS_USED         => (c_YES,c_YES,c_YES,c_YES)
+    )
+  port map(
+    CLK_REF_FULL       => clk_full_osc, --med2int(0).clk_full,
+    CLK_INTERNAL_FULL  => clk_full_osc,
+    SYSCLK             => clk_sys,
+    RESET              => reset_i,
+    CLEAR              => clear_i,
+    
+    --Internal Connection
+    MEDIA_MED2INT(0)   => med2int(5),
+    MEDIA_MED2INT(1)   => med2int(4),
+    MEDIA_MED2INT(2)   => med2int(1),
+    MEDIA_MED2INT(3)   => med2int(0),
+    MEDIA_INT2MED(0)   => int2med(5),
+    MEDIA_INT2MED(1)   => int2med(4),
+    MEDIA_INT2MED(2)   => int2med(1),
+    MEDIA_INT2MED(3)   => int2med(0),
+
+    --Sync operation
+    RX_DLM             => open,
+    RX_DLM_WORD        => open,
+    TX_DLM             => open,
+    TX_DLM_WORD        => open,
+    
+    --SFP Connection
+    SD_PRSNT_N_IN(0)  => back_slave_ready_i(6),
+    SD_PRSNT_N_IN(1)  => back_slave_ready_i(5),
+    SD_PRSNT_N_IN(2)  => back_slave_ready_i(2),
+    SD_PRSNT_N_IN(3)  => back_slave_ready_i(1),
+    SD_LOS_IN(0)      => back_slave_ready_i(6),
+    SD_LOS_IN(1)      => back_slave_ready_i(5),
+    SD_LOS_IN(2)      => back_slave_ready_i(2),
+    SD_LOS_IN(3)      => back_slave_ready_i(1),
+    SD_TXDIS_OUT(0)   => back_master_ready_i(6),
+    SD_TXDIS_OUT(1)   => back_master_ready_i(5),
+    SD_TXDIS_OUT(2)   => back_master_ready_i(2),
+    SD_TXDIS_OUT(3)   => back_master_ready_i(1),
+    
+    --Control Interface
+    BUS_RX             => bussci_rx(3),
+    BUS_TX             => bussci_tx(3),
+
+    -- Status and control port
+    STAT_DEBUG         => open, --med_stat_debug(63 downto 0),
+    CTRL_DEBUG         => open
+  );   
+
+  
+BACK_MASTER_READY <= back_master_ready_i or master_ready_override_i;
+back_slave_ready_i <= BACK_SLAVE_READY;
+  
+--------------------------------------------------------------------------
+-- Hub
+---------------------------------------------------------------------------
+  THE_HUB : trb_net16_hub_streaming_port_sctrl_cts
+    generic map(
+      INIT_ADDRESS                  => INIT_ADDRESS,
+      MII_NUMBER                    => INTERFACE_NUM,
+      MII_IS_UPLINK                 => MII_IS_UPLINK,
+      MII_IS_DOWNLINK               => MII_IS_DOWNLINK,
+      MII_IS_UPLINK_ONLY            => MII_IS_UPLINK_ONLY,
+      HARDWARE_VERSION              => HARDWARE_INFO,
+      INCLUDED_FEATURES             => INCLUDED_FEATURES,
+      INIT_ENDPOINT_ID              => x"0000",
+      BROADCAST_BITMASK             => x"7E",
+      CLOCK_FREQUENCY               => CLOCK_FREQUENCY,
+      USE_ONEWIRE                   => c_YES,
+      BROADCAST_SPECIAL_ADDR        => BROADCAST_SPECIAL_ADDR,
+      RDO_ADDITIONAL_PORT           => cts_rdo_additional_ports,
+      RDO_DATA_BUFFER_DEPTH         => EVENT_BUFFER_SIZE,
+      RDO_DATA_BUFFER_FULL_THRESH   => 2**EVENT_BUFFER_SIZE-EVENT_MAX_SIZE,
+      RDO_HEADER_BUFFER_DEPTH       => 9,
+      RDO_HEADER_BUFFER_FULL_THRESH => 2**9-16
+      --COMPILE_TIME        => std_logic_vector(to_unsigned(VERSION_NUMBER_TIME,32))
+      )
+    port map (
+      CLK    => clk_sys,
+      RESET  => reset_i,
+      CLK_EN => '1',
+
+      -- Media interfacces ---------------------------------------------------------------
+      MED_DATAREADY_OUT(INTERFACE_NUM*1-1 downto 0)  => med_dataready_out(INTERFACE_NUM*1-1 downto 0),
+      MED_DATA_OUT(INTERFACE_NUM*16-1 downto 0)      => med_data_out(INTERFACE_NUM*16-1 downto 0),
+      MED_PACKET_NUM_OUT(INTERFACE_NUM*3-1 downto 0) => med_packet_num_out(INTERFACE_NUM*3-1 downto 0),
+      MED_READ_IN(INTERFACE_NUM*1-1 downto 0)        => med_read_in(INTERFACE_NUM*1-1 downto 0),
+      MED_DATAREADY_IN(INTERFACE_NUM*1-1 downto 0)   => med_dataready_in(INTERFACE_NUM*1-1 downto 0),
+      MED_DATA_IN(INTERFACE_NUM*16-1 downto 0)       => med_data_in(INTERFACE_NUM*16-1 downto 0),
+      MED_PACKET_NUM_IN(INTERFACE_NUM*3-1 downto 0)  => med_packet_num_in(INTERFACE_NUM*3-1 downto 0),
+      MED_READ_OUT(INTERFACE_NUM*1-1 downto 0)       => med_read_out(INTERFACE_NUM*1-1 downto 0),
+      MED_STAT_OP(INTERFACE_NUM*16-1 downto 0)       => med_stat_op(INTERFACE_NUM*16-1 downto 0),
+      MED_CTRL_OP(INTERFACE_NUM*16-1 downto 0)       => med_ctrl_op(INTERFACE_NUM*16-1 downto 0),
+
+     -- Gbe Read-out Path ---------------------------------------------------------------
+      --Event information coming from CTS for GbE
+      GBE_CTS_NUMBER_OUT          => gbe_cts_number,
+      GBE_CTS_CODE_OUT            => gbe_cts_code,
+      GBE_CTS_INFORMATION_OUT     => gbe_cts_information,
+      GBE_CTS_READOUT_TYPE_OUT    => gbe_cts_readout_type,
+      GBE_CTS_START_READOUT_OUT   => gbe_cts_start_readout,
+      --Information sent to CTS
+      GBE_CTS_READOUT_FINISHED_IN => gbe_cts_readout_finished,
+      GBE_CTS_STATUS_BITS_IN      => gbe_cts_status_bits,
+      -- Data from Frontends
+      GBE_FEE_DATA_OUT            => gbe_fee_data,
+      GBE_FEE_DATAREADY_OUT       => gbe_fee_dataready,
+      GBE_FEE_READ_IN             => gbe_fee_read,
+      GBE_FEE_STATUS_BITS_OUT     => gbe_fee_status_bits,
+      GBE_FEE_BUSY_OUT            => gbe_fee_busy,
+
+      -- CTS Request Sending -------------------------------------------------------------
+      --LVL1 trigger
+      CTS_TRG_SEND_IN         => cts_trg_send,
+      CTS_TRG_TYPE_IN         => cts_trg_type,
+      CTS_TRG_NUMBER_IN       => cts_trg_number,
+      CTS_TRG_INFORMATION_IN  => cts_trg_information,
+      CTS_TRG_RND_CODE_IN     => cts_trg_code,
+      CTS_TRG_STATUS_BITS_OUT => cts_trg_status_bits,
+      CTS_TRG_BUSY_OUT        => cts_trg_busy,
+      --IPU Channel
+      CTS_IPU_SEND_IN         => cts_ipu_send,
+      CTS_IPU_TYPE_IN         => cts_ipu_type,
+      CTS_IPU_NUMBER_IN       => cts_ipu_number,
+      CTS_IPU_INFORMATION_IN  => cts_ipu_information,
+      CTS_IPU_RND_CODE_IN     => cts_ipu_code,
+      -- Receiver port
+      CTS_IPU_STATUS_BITS_OUT => cts_ipu_status_bits,
+      CTS_IPU_BUSY_OUT        => cts_ipu_busy,
+
+      -- CTS Data Readout ----------------------------------------------------------------
+      --Trigger to CTS out
+      RDO_TRIGGER_IN             => cts_trigger_out,
+      RDO_TRG_DATA_VALID_OUT     => cts_rdo_rx.data_valid,
+      RDO_VALID_TIMING_TRG_OUT   => cts_rdo_rx.valid_timing_trg,
+      RDO_VALID_NOTIMING_TRG_OUT => cts_rdo_rx.valid_notiming_trg,
+      RDO_INVALID_TRG_OUT        => cts_rdo_rx.invalid_trg,
+      RDO_TRG_TYPE_OUT           => cts_rdo_rx.trg_type,
+      RDO_TRG_CODE_OUT           => cts_rdo_rx.trg_code,
+      RDO_TRG_INFORMATION_OUT    => cts_rdo_rx.trg_information,
+      RDO_TRG_NUMBER_OUT         => cts_rdo_rx.trg_number,
+
+      --Data from CTS in
+      RDO_TRG_STATUSBITS_IN        => cts_rdo_trg_status_bits_cts,
+      RDO_DATA_IN                  => cts_rdo_data,
+      RDO_DATA_WRITE_IN            => cts_rdo_write,
+      RDO_DATA_FINISHED_IN         => cts_rdo_finished,
+      --Data from additional modules
+      RDO_ADDITIONAL_STATUSBITS_IN => cts_rdo_trg_status_bits_additional,
+      RDO_ADDITIONAL_DATA          => cts_rdo_additional_data,
+      RDO_ADDITIONAL_WRITE         => cts_rdo_additional_write,
+      RDO_ADDITIONAL_FINISHED      => cts_rdo_additional_finished,
+
+      -- Slow Control --------------------------------------------------------------------
+      COMMON_STAT_REGS    => common_stat_reg,
+      COMMON_CTRL_REGS    => common_ctrl_reg,
+      ONEWIRE             => TEMPSENS,
+      ONEWIRE_MONITOR_IN  => open,
+      MY_ADDRESS_OUT      => timer.network_address,
+      UNIQUE_ID_OUT       => timer.uid,
+      TIMER_TICKS_OUT(0)  => timer.tick_us,
+      TIMER_TICKS_OUT(1)  => timer.tick_ms,
+      TEMPERATURE_OUT     => timer.temperature,
+      EXTERNAL_SEND_RESET => '0',--reset_via_gbe,
+
+      REGIO_ADDR_OUT            => ctrlbus_rx.addr,
+      REGIO_READ_ENABLE_OUT     => ctrlbus_rx.read,
+      REGIO_WRITE_ENABLE_OUT    => ctrlbus_rx.write,
+      REGIO_DATA_OUT            => ctrlbus_rx.data,
+      REGIO_DATA_IN             => ctrlbus_tx.data,
+      REGIO_DATAREADY_IN        => rdack,
+      REGIO_NO_MORE_DATA_IN     => ctrlbus_tx.nack,
+      REGIO_WRITE_ACK_IN        => wrack,
+      REGIO_UNKNOWN_ADDR_IN     => ctrlbus_tx.unknown,
+      REGIO_TIMEOUT_OUT         => ctrlbus_rx.timeout,
+      
+      --Gbe Sctrl Input
+      GSC_INIT_DATAREADY_IN    => gsc_init_dataready,
+      GSC_INIT_DATA_IN         => gsc_init_data,
+      GSC_INIT_PACKET_NUM_IN   => gsc_init_packet_num,
+      GSC_INIT_READ_OUT        => gsc_init_read,
+      GSC_REPLY_DATAREADY_OUT  => gsc_reply_dataready,
+      GSC_REPLY_DATA_OUT       => gsc_reply_data,
+      GSC_REPLY_PACKET_NUM_OUT => gsc_reply_packet_num,
+      GSC_REPLY_READ_IN        => gsc_reply_read,
+      GSC_BUSY_OUT             => gsc_busy,
+
+      --status and control ports
+      HUB_STAT_CHANNEL => open,
+      HUB_STAT_GEN     => open,
+      MPLEX_CTRL       => (others => '0'),
+      MPLEX_STAT       => open,
+      STAT_REGS        => open,
+      STAT_CTRL_REGS   => open,
+
+      --Fixed status and control ports
+      STAT_DEBUG => open,
+      CTRL_DEBUG => (others => '0')
+      );
+      
+  gen_addition_ports : for i in 0 to cts_rdo_additional_ports-1 generate
+    cts_rdo_additional_data(31 + i*32 downto 32*i)            <= cts_rdo_additional(i).data;
+    cts_rdo_trg_status_bits_additional(31 + i*32 downto 32*i) <= cts_rdo_additional(i).statusbits;
+    
+    cts_rdo_additional_write(i)                               <= cts_rdo_additional(i).data_write;
+    cts_rdo_additional_finished(i)                            <= cts_rdo_additional(i).data_finished;
+  end generate;
+  
+  gen_media_record : for i in 0 to INTERFACE_NUM-1 generate
+    med_data_in(i*16+15 downto i*16)    <= med2int(i).data;
+    med_packet_num_in(i*3+2 downto i*3) <= med2int(i).packet_num;
+    med_dataready_in(i)                 <= med2int(i).dataready;
+    med_read_in(i)                      <= med2int(i).tx_read;
+    med_stat_op(i*16+15 downto i*16)    <= med2int(i).stat_op;
+    
+    int2med(i).data         <= med_data_out(i*16+15 downto i*16);    
+    int2med(i).packet_num   <= med_packet_num_out(i*3+2 downto i*3);
+    int2med(i).dataready    <= med_dataready_out(i);
+    int2med(i).ctrl_op      <= med_ctrl_op(i*16+15 downto i*16);
+  end generate;
+  
+  rdack <= ctrlbus_tx.ack or ctrlbus_tx.rack;
+  wrack <= ctrlbus_tx.ack or ctrlbus_tx.wack;
+  
+ THE_CTS : CTS
+   generic map (
+     EXTERNAL_TRIGGER_ID => ETM_ID,  -- fill in trigger logic enumeration id of external trigger logic
+     PLATTFORM => 1, --TRB3sc+KEL+RJ45
+     OUTPUT_MULTIPLEXERS => CTS_OUTPUT_MULTIPLEXERS,
+     ADDON_GROUPS      => 1,
+     ADDON_GROUP_UPPER => (1, others => 0)
+     )
+   port map (
+     CLK   => clk_sys,
+     RESET => reset_i,
+
+     TRIGGER_BUSY_OUT   => trigger_busy_i,
+     TIME_REFERENCE_OUT => cts_trigger_out,
+
+     ADDON_TRIGGERS_IN        => cts_addon_triggers_in,
+     ADDON_GROUP_ACTIVITY_OUT => open,
+     ADDON_GROUP_SELECTED_OUT => open,
+
+     EXT_TRIGGER_IN     => cts_ext_trigger,
+     EXT_STATUS_IN      => cts_ext_status,
+     EXT_CONTROL_OUT    => cts_ext_control,
+     EXT_HEADER_BITS_IN => cts_ext_header,
+     EXT_FORCE_TRIGGER_INFO_IN => (others => '0'),
+
+     PERIPH_TRIGGER_IN => (others => '0'),
+
+     OUTPUT_MULTIPLEXERS_OUT => open,
+
+     CTS_TRG_SEND_OUT        => cts_trg_send,
+     CTS_TRG_TYPE_OUT        => cts_trg_type,
+     CTS_TRG_NUMBER_OUT      => cts_trg_number,
+     CTS_TRG_INFORMATION_OUT => cts_trg_information,
+     CTS_TRG_RND_CODE_OUT    => cts_trg_code,
+     CTS_TRG_STATUS_BITS_IN  => cts_trg_status_bits,
+     CTS_TRG_BUSY_IN         => cts_trg_busy,
+
+     CTS_IPU_SEND_OUT        => cts_ipu_send,
+     CTS_IPU_TYPE_OUT        => cts_ipu_type,
+     CTS_IPU_NUMBER_OUT      => cts_ipu_number,
+     CTS_IPU_INFORMATION_OUT => cts_ipu_information,
+     CTS_IPU_RND_CODE_OUT    => cts_ipu_code,
+     CTS_IPU_STATUS_BITS_IN  => cts_ipu_status_bits,
+     CTS_IPU_BUSY_IN         => cts_ipu_busy,
+
+     CTS_REGIO_ADDR_IN          => buscts_rx.addr,
+     CTS_REGIO_DATA_IN          => buscts_rx.data,
+     CTS_REGIO_READ_ENABLE_IN   => buscts_rx.read,
+     CTS_REGIO_WRITE_ENABLE_IN  => buscts_rx.write,
+     CTS_REGIO_DATA_OUT         => buscts_tx.data,
+     CTS_REGIO_DATAREADY_OUT    => buscts_tx.rack,
+     CTS_REGIO_WRITE_ACK_OUT    => buscts_tx.wack,
+     CTS_REGIO_UNKNOWN_ADDR_OUT => buscts_tx.unknown,
+
+     LVL1_TRG_DATA_VALID_IN     => cts_rdo_rx.data_valid,
+     LVL1_VALID_TIMING_TRG_IN   => cts_rdo_rx.valid_timing_trg,
+     LVL1_VALID_NOTIMING_TRG_IN => cts_rdo_rx.valid_notiming_trg,
+     LVL1_INVALID_TRG_IN        => cts_rdo_rx.invalid_trg,
+
+     FEE_TRG_STATUSBITS_OUT => cts_rdo_trg_status_bits_cts,
+     FEE_DATA_OUT           => cts_rdo_data,
+     FEE_DATA_WRITE_OUT     => cts_rdo_write,
+     FEE_DATA_FINISHED_OUT  => cts_rdo_finished
+     );   
+
+  cts_addon_triggers_in(1 downto 0) <= trig_gen_out_i when rising_edge(clk_sys);
+
+  buscts_tx.nack <= '0';
+  buscts_tx.ack  <= '0';
+        
+  
+
+---------------------------------------------------------------------------
+-- Bus Handler
+---------------------------------------------------------------------------
+  THE_BUS_HANDLER : entity work.trb_net16_regio_bus_handler_record
+    generic map(
+      PORT_NUMBER      => 9,
+      PORT_ADDRESSES   => (0 => x"d000", 1 => x"d300", 2 => x"b000", 3 => x"b200", 4 => x"b400", 5 => x"b600", 6 => x"e000", 7 => x"ef00", 8 => x"a000", others => x"0000"),
+      PORT_ADDR_MASK   => (0 => 12,      1 => 1,       2 => 9,       3 => 9,       4 => 9,       5 => 9      , 6 => 12     , 7 => 8      , 8 => 11     , others => 0),
+      PORT_MASK_ENABLE => 1
+      )
+    port map(
+      CLK   => clk_sys,
+      RESET => reset_i,
+
+      REGIO_RX  => handlerbus_rx,
+      REGIO_TX  => ctrlbus_tx,
+      
+      BUS_RX(0) => bustools_rx, --Flash, SPI, UART, ADC, SED
+      BUS_RX(1) => bustc_rx,    --Clock switch
+      BUS_RX(2) => bussci_rx(0),   --SCI Serdes
+      BUS_RX(3) => bussci_rx(1),
+      BUS_RX(4) => bussci_rx(2),
+      BUS_RX(5) => bussci_rx(3),
+      BUS_RX(6) => bustdccal_rx,
+      BUS_RX(7) => busdebug_rx,
+      BUS_RX(8) => buscts_rx,
+      BUS_TX(0) => bustools_tx,
+      BUS_TX(1) => bustc_tx,
+      BUS_TX(2) => bussci_tx(0),
+      BUS_TX(3) => bussci_tx(1),
+      BUS_TX(4) => bussci_tx(2),
+      BUS_TX(5) => bussci_tx(3),
+      BUS_TX(6) => bustdccal_tx,
+      BUS_TX(7) => busdebug_tx,
+      BUS_TX(8) => buscts_tx,
+      STAT_DEBUG => open
+      );
+
+--   THE_DEBUG : process begin
+--   wait until rising_edge(clk_sys);
+--   busdebug_tx.ack     <= '0';
+--   busdebug_tx.nack    <= '0';
+--   busdebug_tx.unknown <= '0';
+--   
+--   if busdebug_rx.read = '1' then
+--     if busdebug_rx.addr(7 downto 0) = x"00" then
+--       busdebug_tx.data <= FSM_state_RX;
+--     end if;
+--     if busdebug_rx.addr(7 downto 0) = x"01" then
+--       busdebug_tx.data <= FSM_state_TX;
+--     end if;
+--     if busdebug_rx.addr(7 downto 0) = x"02" then
+--       busdebug_tx.data(0) <= pckr_fifo_empty;
+--       busdebug_tx.data(3 downto 1) <= (others => '0');
+--       busdebug_tx.data(4) <= pckr_fifo_full;
+--       busdebug_tx.data(15 downto 5) <= (others => '0');
+--       busdebug_tx.data(31 downto 16) <= WCNT_i;
+--     end if;
+--     if busdebug_rx.addr(7 downto 0) = x"03" then
+--       busdebug_tx.data <= fifo_data_out(31 DOWNTO 0);
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"04" then
+--       busdebug_tx.data(0)      <= fee_dataready;
+--       busdebug_tx.data( 3 downto  1) <= (others => '0');
+--       busdebug_tx.data(4)      <= fee_read;
+--       busdebug_tx.data( 7 downto  5) <= (others => '0');
+--       busdebug_tx.data(8)      <= fee_busy;
+--       busdebug_tx.data(11 downto  9) <= (others => '0');
+--       busdebug_tx.data(12)      <= cts_start_readout;
+--       busdebug_tx.data(15 downto 13) <= (others => '0');
+--       busdebug_tx.data(31 downto 16) <= fee_data;
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"05" then
+--       busdebug_tx.data           <= pckr_Data;
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"06" then
+--       busdebug_tx.data( 3 downto  0) <= pckr_Data_type;
+--       busdebug_tx.data(31 downto  4) <= (others => '0');
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"07" then
+--       busdebug_tx.data(15 downto  0) <= std_logic_vector(DEBUG_EvtLength);
+--       busdebug_tx.data(31 downto 16) <= (others => '0');
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"08" then
+--       busdebug_tx.data <= std_logic_vector(DEBUG_cts_read);
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"09" then
+--       busdebug_tx.data(0) <= DEBUG_enable_fifo_rdEn;
+--       busdebug_tx.data(1) <= DEBUG_cts_dataready;
+--       busdebug_tx.data(31 downto  2) <= (others => '0');
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"0A" then
+--       busdebug_tx.data(15 downto  0) <= pckr_Data_Length_Ev;
+--       busdebug_tx.data(31 downto 16) <= (others => '0');
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"0B" then
+--       busdebug_tx.data(15 downto  0) <= pckr_Data_Source;
+--       busdebug_tx.data(31 downto 16) <= (others => '0');
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"0C" then
+--       busdebug_tx.data( 0) <= MUX_cal_sw;
+--       busdebug_tx.data(31 downto  1) <= (others => '0');
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"0D" then
+--       busdebug_tx.data(23 downto  0) <= DEBUG_read_enable_fifo_vnt(23 downto 0);
+--       busdebug_tx.data(24) <= cts_dataready;
+--       busdebug_tx.data(27 downto 25) <= (others => '0');
+--       busdebug_tx.data(28) <= already_asked;
+--       busdebug_tx.data(31 downto 29) <= (others => '0');
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"0E" then
+--       busdebug_tx.data <= cts_data;
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"0F" then
+--       busdebug_tx.data(15 downto  0) <= cts_length;
+--       busdebug_tx.data(31 downto 15) <= (others => '0');
+--     end if;
+--     
+--     if busdebug_rx.addr( 7 downto 0) = x"10" then
+--       busdebug_tx.data(30 downto  0) <= DEBUG_read_enable_fifo_cnt(30 downto  0);
+--       busdebug_tx.data(31) <= rd_enabled;
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"11" then
+--       busdebug_tx.data(30 downto  0) <= DEBUG_read_enable_fifo_vnt1(30 downto  0);
+--       busdebug_tx.data(31) <= cts_read;
+--     end if;
+--     if busdebug_rx.addr( 7 downto 0) = x"12" then
+--       busdebug_tx.data <= DEBUG_read_enable_fifo_cnt2;
+--     end if;
+--     
+--     if busdebug_rx.addr( 7 downto 0) = x"13" then
+--       busdebug_tx.data(15 downto  0) <= FPGA;
+--       busdebug_tx.data(31 downto 16) <= (others => '0');
+--     end if;
+--     
+--   busdebug_tx.ack <= '1';
+--   elsif busdebug_rx.write = '1' then
+--   --additional_reg_i <= busdebug_rx.data(additional_reg_i'left downto 0);
+--     if busdebug_rx.addr( 7 downto 0) = x"0C" then
+--       MUX_cal_sw  <= busdebug_rx.data(0);
+--     end if;
+--   busdebug_tx.ack <= '1';
+--   end if;
+--   end process;
+      
+  handlerbus_rx <= ctrlbus_rx when bus_master_active = '0' else bus_master_out;         
+      
+---------------------------------------------------------------------------
+-- Control Tools
+---------------------------------------------------------------------------
+  THE_TOOLS: entity work.trb3sc_tools 
+    port map(
+      CLK         => clk_sys,
+      RESET       => reset_i,
+      
+      --Flash & Reload
+      FLASH_CS    => FLASH_CS,
+      FLASH_CLK   => FLASH_CLK,
+      FLASH_IN    => FLASH_OUT,
+      FLASH_OUT   => FLASH_IN,
+      PROGRAMN    => PROGRAMN,
+      REBOOT_IN   => common_ctrl_reg(15),
+      --SPI
+      SPI_CS_OUT  => spi_cs,  
+      SPI_MOSI_OUT=> spi_mosi,
+      SPI_MISO_IN => spi_miso,
+      SPI_CLK_OUT => spi_clk,
+      --Header
+      HEADER_IO   => header_io,
+      ADDITIONAL_REG(0)           => led_off_i,
+      ADDITIONAL_REG(2 downto 1)  => trigger_select_i,
+      ADDITIONAL_REG(15 downto 4) => master_ready_override_i,
+      ADDITIONAL_REG(27 downto 16)=> enable_ldo_i,
+      --LCD
+      LCD_DATA_IN => lcd_data,
+      --ADC
+      ADC_CS      => ADC_CS,
+      ADC_MOSI    => ADC_DIN,
+      ADC_MISO    => ADC_DOUT,
+      ADC_CLK     => ADC_CLK,
+      --Trigger & Monitor 
+      MONITOR_INPUTS   => monitor_inputs_i(25 downto 0),
+      TRIG_GEN_INPUTS  => monitor_inputs_i(23 downto 0),
+      TRIG_GEN_OUTPUTS => trig_gen_out_i,      
+     --SED
+      SED_ERROR_OUT => sed_error_i,
+      --Slowcontrol
+      BUS_RX     => bustools_rx,
+      BUS_TX     => bustools_tx,
+      --Control master for default settings
+      BUS_MASTER_IN  => ctrlbus_tx,
+      BUS_MASTER_OUT => bus_master_out,
+      BUS_MASTER_ACTIVE => bus_master_active,        
+      DEBUG_OUT  => open
+      );      
+      
+
+  
+---------------------------------------------------------------------------
+-- LED
+---------------------------------------------------------------------------
+  --LED are green, orange, red, yellow, white(2), rj_green(2), rj_red(2), sfp_green(2), sfp_red(2)
+  LED_GREEN            <= debug_clock_reset(0) or led_off_i;   
+  LED_ORANGE           <= debug_clock_reset(1) or led_off_i;
+  LED_RED              <= not sed_error_i or led_off_i;
+  LED_YELLOW           <= debug_clock_reset(2) or led_off_i;
+
+  LED_SFP_GREEN        <= not med2int(12).stat_op(9) or led_off_i;  --SFP Link Status
+  LED_SFP_RED          <= not (med2int(12).stat_op(10) or med2int(12).stat_op(11)) or led_off_i;  --SFP RX/TX
+  
+  LED_RJ_GREEN         <= (CLOCK_SELECT_IN or led_off_i) & (not trigger_select_i(0) or led_off_i);
+  LED_RJ_RED           <= (not reset_i or led_off_i) & (not trigger_select_i(1) or led_off_i);
+  
+
+  TRIGGER_SEL_OUT(1) <= trigger_select_i(0); -- older version: not
+  TRIGGER_SEL_OUT(2) <= trigger_select_i(1); -- older version: not
+  BACK_LDO_EN <= not enable_ldo_i;
+  BACK_SPARE <= (others => 'Z'); --this is programn on dirich!
+  
+---------------------------------------------------------------------------
+-- LCD Data to display
+---------------------------------------------------------------------------  
+--   lcd_data(15 downto 0)    <= timer.network_address;
+--   lcd_data(47 downto 16)   <= timer.microsecond;
+--   lcd_data(79 downto 48)   <= std_logic_vector(to_unsigned(VERSION_NUMBER_TIME,32));
+--   lcd_data(91 downto 80)   <= timer.temperature;
+--   lcd_data(95 downto 92)   <= x"0";
+--   lcd_data(159 downto 96)  <= timer.uid;
+--   lcd_data(511 downto 160) <= (others => '0');  
+  
+---------------------------------------------------------------------------
+-- Monitoring & Trigger
+---------------------------------------------------------------------------  
+
+  --TRIGGER_TO_CTS <= trig_gen_out_i(1);
+  --RJ45_SIG_4     <= trig_gen_out_i(0);
+  TRIGGER_OUT    <= RJ45_SIG_1;
+  
+  monitor_inputs_i(11 downto  0) <= BACK_TRIG1;
+  monitor_inputs_i(23 downto 12) <= BACK_TRIG2;
+  monitor_inputs_i(25 downto 24) <= trig_gen_out_i(1 downto 0);
+  
+  
+---------------------------------------------------------------------------
+-- Test Circuits
+---------------------------------------------------------------------------
+  process begin
+    wait until rising_edge(clk_sys);
+    time_counter <= time_counter + 1; 
+    if reset_i = '1' then
+      time_counter <= (others => '0');
+    end if;
+  end process;  
+
+  
+ TEST_LINE(10 downto 1) <= header_io;
+ TEST_LINE(18 downto 11) <= (others => '0');
+ TEST_JTAG(20 downto 7)  <= (others => '0');
+ POWER_BOARD_IO(1) <= spi_clk(6);
+ POWER_BOARD_IO(2) <= spi_mosi(6);
+ POWER_BOARD_IO(3) <= spi_cs(6);
+ spi_miso(5) <= POWER_BOARD_IO(4);
+ spi_miso(6) <= POWER_BOARD_IO(4);
+end architecture;
+
+
+
diff --git a/combiner_cts/compile.pl b/combiner_cts/compile.pl
new file mode 120000 (symlink)
index 0000000..8a19aa6
--- /dev/null
@@ -0,0 +1 @@
+../../trb3sc/scripts/compile.pl
\ No newline at end of file
diff --git a/combiner_cts/config.vhd b/combiner_cts/config.vhd
new file mode 100644 (file)
index 0000000..cee64cc
--- /dev/null
@@ -0,0 +1,162 @@
+library ieee;
+USE IEEE.std_logic_1164.ALL;
+use ieee.numeric_std.all;
+use work.trb_net_std.all;
+use work.trb_net16_hub_func.all;
+
+package config is
+
+
+------------------------------------------------------------------------------
+--Begin of design configuration
+------------------------------------------------------------------------------
+
+--Runs with 120 MHz instead of 100 MHz     
+    constant USE_120_MHZ            : integer := c_NO; 
+    constant USE_EXTERNAL_CLOCK     : integer := c_YES; --'no' not implemented.
+    constant CLOCK_FAST_SELECT      : integer := c_YES; --fast clock select (135us) or slow (280ms)?
+    
+--Use sync mode, RX clock for all parts of the FPGA
+    constant USE_RXCLOCK            : integer := c_NO;
+   
+--Address settings   
+    constant INIT_ADDRESS           : std_logic_vector := x"F3DC";
+    constant BROADCAST_SPECIAL_ADDR : std_logic_vector := x"52";
+   
+    constant INCLUDE_ADC           : integer  := c_NO;
+    constant INCLUDE_UART           : integer  := c_YES;
+    constant INCLUDE_SPI            : integer  := c_YES;
+    constant INCLUDE_LCD            : integer  := c_NO;
+    constant INCLUDE_DEBUG_INTERFACE: integer  := c_YES;
+    
+    --input monitor and trigger generation logic
+    constant INCLUDE_TRIGGER_LOGIC  : integer  := c_YES;
+    constant INCLUDE_STATISTICS     : integer  := c_YES;
+    constant TRIG_GEN_INPUT_NUM     : integer  := 24;
+    constant TRIG_GEN_OUTPUT_NUM    : integer  := 2;
+    constant MONITOR_INPUT_NUM      : integer  := 26;
+
+    constant INCLUDE_GBE            : integer  := c_NO;
+    constant INCLUDE_CALIBRATION    : integer  := c_NO;
+    
+    constant GEN_BUSY_OUTPUT : integer := c_NO;
+    
+    constant TRIGGER_COIN_COUNT      : integer := 1;
+    constant TRIGGER_PULSER_COUNT    : integer := 3;
+    constant TRIGGER_RAND_PULSER     : integer := 1;
+    constant TRIGGER_ADDON_COUNT     : integer := 4;
+    constant PERIPH_TRIGGER_COUNT    : integer := 0;      
+    constant ADDON_LINE_COUNT        : integer := 2;--44;    
+    constant CTS_OUTPUT_MULTIPLEXERS : integer := 1;
+    
+    constant INCLUDE_TDC                 : integer := c_NO;
+    constant INCLUDE_TIMESTAMP_GENERATOR : integer := c_NO;
+
+    constant INCLUDE_ETM : integer range c_NO to c_YES := c_NO;
+    type ETM_CHOICE_type is (ETM_CHOICE_MBS_VULOM, ETM_CHOICE_MAINZ_A2, ETM_CHOICE_CBMNET, ETM_CHOICE_M26);
+    constant ETM_CHOICE : ETM_CHOICE_type := ETM_CHOICE_MBS_VULOM;
+    constant ETM_ID : std_logic_vector(7 downto 0);
+    
+    constant cts_rdo_additional_ports : integer := 2;-- INCLUDE_TDC + INCLUDE_TIMESTAMP_GENERATOR + INCLUDE_ETM; --for TDC
+    
+    --constant CFG_MODE : integer := c_NO;--*2 + USE_BACKPLANE;
+  
+               --constant INTERFACE_NUM        : integer := INTERFACE_NUM_ARR(CFG_MODE);
+               --constant IS_UPLINK            : hub_ct  := IS_UPLINK_ARR(CFG_MODE);
+               --constant IS_DOWNLINK          : hub_ct  := IS_DOWNLINK_ARR(CFG_MODE);
+               --constant IS_UPLINK_ONLY       : hub_ct  := IS_UPLINK_ONLY_ARR(CFG_MODE); 
+    
+------------------------------------------------------------------------------
+--End of design configuration
+------------------------------------------------------------------------------
+
+  type data_t is array (0 to 1023) of std_logic_vector(7 downto 0);
+  constant LCD_DATA : data_t := (
+      x"36",x"48",x"3A",x"55",x"29",x"2A",x"00",x"00", --config don't touch
+      x"00",x"EF",x"2B",x"00",x"00",x"01",x"3F",x"2C", --config don't touch
+      x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00", --config don't touch
+      x"00",x"00",x"00",x"00",x"00",x"00",x"00",x"00", --config don't touch
+      
+      x"54", x"72", x"62", x"33", x"73", x"63", x"0a",
+      x"0a",
+      x"41", x"64", x"64", x"72", x"65", x"73", x"73", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"80",                     x"0a",                            
+      x"55", x"49", x"44", x"20", x"20", x"89",                      x"88",                      x"87",                      x"86",                     x"0a", 
+      x"43", x"6f", x"6d", x"70", x"69", x"6c", x"65", x"54", x"69", x"6d", x"65", x"20", x"20", x"84",                      x"83",                     x"0a", 
+      x"54", x"69", x"6d", x"65", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"20", x"82",                      x"81",                     x"0a",
+      x"54", x"65", x"6d", x"70", x"65", x"72", x"61", x"74", x"75", x"72", x"65", x"20", x"20", x"20", x"20", x"20", x"20", x"85",                     x"0a",
+      others => x"00");
+
+
+
+
+ constant INTERFACE_NUM       : integer := 12;
+ constant MII_IS_UPLINK       : hub_mii_config_t := (0,0,0,0, 0,0,0,0, 0,0,0,0, 1,1,1,0,0);
+ constant MII_IS_DOWNLINK     : hub_mii_config_t := (1,1,1,1, 1,1,1,1, 1,1,1,1, 1,0,0,0,0);
+ constant MII_IS_UPLINK_ONLY  : hub_mii_config_t := (0,0,0,0, 0,0,0,0, 0,0,0,0, 0,1,1,0,0);
+
+ constant EVENT_BUFFER_SIZE       : integer range 9 to 13 := 13; -- size of the event buffer, 2**N
+ constant EVENT_MAX_SIZE          : integer := 1023;             --maximum event size. Should not exceed 
+------------------------------------------------------------------------------
+--Select settings by configuration 
+------------------------------------------------------------------------------
+    type intlist_t is array(0 to 7) of integer;
+    type hw_info_t is array(0 to 7) of unsigned(31 downto 0);
+    constant HW_INFO_BASE            : unsigned(31 downto 0) := x"97000000";
+    
+    constant CLOCK_FREQUENCY_ARR  : intlist_t := (100,120, others => 0);
+    constant MEDIA_FREQUENCY_ARR  : intlist_t := (200,240, others => 0);
+                          
+  --declare constants, filled in body                          
+    constant HARDWARE_INFO        : std_logic_vector(31 downto 0);
+    constant CLOCK_FREQUENCY      : integer;
+    constant MEDIA_FREQUENCY      : integer;
+    constant INCLUDED_FEATURES      : std_logic_vector(63 downto 0);
+    
+    
+end;
+
+package body config is
+--compute correct configuration mode
+  
+  constant HARDWARE_INFO        : std_logic_vector(31 downto 0) := std_logic_vector(
+                                      HW_INFO_BASE );
+  constant CLOCK_FREQUENCY      : integer := CLOCK_FREQUENCY_ARR(USE_120_MHZ);
+  constant MEDIA_FREQUENCY      : integer := MEDIA_FREQUENCY_ARR(USE_120_MHZ);
+
+  function etm_id_func return std_logic_vector is
+   variable res : unsigned(7 downto 0);
+  begin
+   res := x"00";
+   if INCLUDE_ETM=c_YES then
+      res := x"60";
+      res := res + TO_UNSIGNED(ETM_CHOICE_type'pos(ETM_CHOICE), 4);
+   end if;
+   return std_logic_vector(res);
+  end function;
+  
+  constant ETM_ID : std_logic_vector(7 downto 0) := etm_id_func;
+  
+function generateIncludedFeatures return std_logic_vector is
+  variable t : std_logic_vector(63 downto 0);
+  begin
+    t               := (others => '0');
+    t(63 downto 56) := std_logic_vector(to_unsigned(1,8)); --table version 1
+--     t(16 downto 16) := std_logic_vector(to_unsigned(USE_ETHERNET,1));
+    t(17 downto 17) := std_logic_vector(to_unsigned(INCLUDE_GBE,1)); --sctrl via GbE
+    t(23 downto 23) := std_logic_vector(to_unsigned(INCLUDE_GBE,1));
+    t(26 downto 24) := std_logic_vector(to_unsigned(1,3)); --num SFPs with TrbNet
+    t(40 downto 40) := std_logic_vector(to_unsigned(INCLUDE_LCD,1));
+    t(42 downto 42) := std_logic_vector(to_unsigned(INCLUDE_SPI,1));
+    t(43 downto 43) := std_logic_vector(to_unsigned(INCLUDE_UART,1));
+    t(44 downto 44) := std_logic_vector(to_unsigned(INCLUDE_STATISTICS,1));
+    t(51 downto 48) := std_logic_vector(to_unsigned(INCLUDE_TRIGGER_LOGIC,4));
+    t(52 downto 52) := std_logic_vector(to_unsigned(USE_120_MHZ,1));
+    t(53 downto 53) := std_logic_vector(to_unsigned(USE_RXCLOCK,1));
+    t(54 downto 54) := std_logic_vector(to_unsigned(USE_EXTERNAL_CLOCK,1));
+    return t;
+  end function;  
+
+  constant INCLUDED_FEATURES : std_logic_vector(63 downto 0) := generateIncludedFeatures;    
+
+end package body;
diff --git a/combiner_cts/config_compile_frankfurt.pl b/combiner_cts/config_compile_frankfurt.pl
new file mode 100644 (file)
index 0000000..c92c501
--- /dev/null
@@ -0,0 +1,20 @@
+TOPNAME                      => "combiner",
+lm_license_file_for_synplify => "27020\@jspc29", #"27000\@lxcad01.gsi.de";
+lm_license_file_for_par      => "1702\@jspc29",
+lattice_path                 => '/d/jspc29/lattice/diamond/3.9_x64',
+synplify_path                => '/d/jspc29/lattice/synplify/K-2015.09/',
+# synplify_command             => "/d/jspc29/lattice/diamond/3.7_x64/bin/lin64/synpwrap -fg -options",
+#synplify_command             => "/d/jspc29/lattice/synplify/J-2014.09-SP2/bin/synplify_premier_dp",
+#synplify_command             => "ssh -p 52238 jmichel\@cerberus \"cd /home/jmichel/git/dirich/combiner/workdir; LM_LICENSE_FILE=27000\@lxcad01.gsi.de /opt/synplicity/L-2016.09-1/bin/synplify_premier_dp -batch ../combiner.prj\" #",
+nodelist_file                => 'nodelist_frankfurt.txt',
+
+
+#Include only necessary lpf files
+#pinout_file                  => '', #name of pin-out file, if not equal TOPNAME
+include_TDC                  => 0,
+include_GBE                  => 0,
+
+#Report settings
+firefox_open                 => 0,
+twr_number_of_errors         => 20,
+
diff --git a/combiner_cts/config_compile_gsi.pl b/combiner_cts/config_compile_gsi.pl
new file mode 100644 (file)
index 0000000..09a3f13
--- /dev/null
@@ -0,0 +1,26 @@
+#Familyname  => 'ECP5UM',
+#Devicename  => 'LFE5UM-85F',
+#Package     => 'CABGA381',
+#Speedgrade  => '8',
+
+TOPNAME                      => "combiner",
+lm_license_file_for_synplify => "27000\@lxcad03.gsi.de",
+lm_license_file_for_par      => "1702\@hadeb05.gsi.de",
+lattice_path                 => '/opt/lattice/diamond/3.11_x64/',
+synplify_path                => '/opt/synplicity/O-2018.09-SP1',
+#synplify_command             => "/opt/lattice/diamond/3.5_x64/bin/lin64/synpwrap -fg -options",
+#synplify_command             => "/opt/synplicity/O-2018.09-SP1/bin/synplify_premier_dp",
+
+nodelist_file                => '../nodes_lxhadeb07.txt',
+
+
+#Include only necessary lpf files
+pinout_file                  => 'combiner', #name of pin-out file, if not equal TOPNAME
+include_TDC                  => 0,
+include_GBE                  => 0,
+
+#Report settings
+firefox_open                 => 0,
+twr_number_of_errors         => 20,
+#no_ltxt2ptxt                 => 1,  #if there is no serdes being used
+#make_jed                     => 1,
diff --git a/combiner_cts/config_compile_gsi.pl_orig b/combiner_cts/config_compile_gsi.pl_orig
new file mode 100644 (file)
index 0000000..4a4edb6
--- /dev/null
@@ -0,0 +1,22 @@
+#Familyname  => 'ECP5UM',
+#Devicename  => 'LFE5UM-85F',
+#Package     => 'CABGA381',
+#Speedgrade  => '8',
+
+TOPNAME                      => "combiner",
+lm_license_file_for_synplify => "27000\@lxcad03.gsi.de",
+lm_license_file_for_par      => "1702\@hadeb05.gsi.de",
+lattice_path                 => '/opt/lattice/diamond/3.8_x64',
+synplify_path                => '/opt/synplicity/K-2015.09',
+##synplify_command             => "/opt/lattice/diamond/3.5_x64/bin/lin64/synpwrap -fg -options",
+#synplify_command             => "/opt/synplicity/K-2015.09/bin/synplify_premier_dp",
+
+nodelist_file                => '../nodes_lxhadeb07.txt',
+#pinout_file                  => 'dirich',
+
+    
+include_TDC                  => 0,
+include_GBE                  => 0,
+
+firefox_open                 => 0,
+twr_number_of_errors         => 20,
diff --git a/combiner_cts/core/FIFO_36x128.ipx b/combiner_cts/core/FIFO_36x128.ipx
new file mode 100644 (file)
index 0000000..455cd64
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<DiamondModule name="FIFO_36x128" module="FIFO" VendorName="Lattice Semiconductor Corporation" generator="IPexpress" date="2018 07 18 14:24:23.368" version="5.1" type="Module" synthesis="synplify" source_format="VHDL">
+  <Package>
+               <File name="FIFO_36x128.lpc" type="lpc" modified="2018 07 18 14:24:04.000"/>
+               <File name="FIFO_36x128.vhd" type="top_level_vhdl" modified="2018 07 18 14:24:04.000"/>
+               <File name="FIFO_36x128_tmpl.vhd" type="template_vhdl" modified="2018 07 18 14:24:04.000"/>
+               <File name="tb_FIFO_36x128_tmpl.vhd" type="testbench_vhdl" modified="2018 07 18 14:24:04.000"/>
+  </Package>
+</DiamondModule>
diff --git a/combiner_cts/core/FIFO_36x128.lpc b/combiner_cts/core/FIFO_36x128.lpc
new file mode 100644 (file)
index 0000000..e957cf9
--- /dev/null
@@ -0,0 +1,48 @@
+[Device]
+Family=latticeecp3
+PartType=LFE3-150EA
+PartName=LFE3-150EA-8FN672C
+SpeedGrade=8
+Package=FPBGA672
+OperatingCondition=COM
+Status=P
+
+[IP]
+VendorName=Lattice Semiconductor Corporation
+CoreType=LPM
+CoreStatus=Demo
+CoreName=FIFO
+CoreRevision=5.1
+ModuleName=FIFO_36x128
+SourceFormat=VHDL
+ParameterFileVersion=1.0
+Date=07/18/2018
+Time=14:24:04
+
+[Parameters]
+Verilog=0
+VHDL=1
+EDIF=1
+Destination=Synplicity
+Expression=BusA(0 to 7)
+Order=Big Endian [MSB:LSB]
+IO=0
+FIFOImp=EBR Based
+Depth=128
+Width=36
+regout=0
+CtrlByRdEn=0
+EmpFlg=1
+PeMode=Static - Dual Threshold
+PeAssert=2
+PeDeassert=4
+FullFlg=1
+PfMode=Static - Dual Threshold
+PfAssert=126
+PfDeassert=124
+RDataCount=0
+EnECC=0
+EnFWFT=0
+
+[Command]
+cmd_line= -w -n FIFO_36x128 -lang vhdl -synth synplify -bus_exp 7 -bb -arch ep5c00 -type fifoblk -addr_width 7 -data_width 36 -num_words 128 -no_enable -pe 2 -pe2 4 -pf 126 -pf2 124
diff --git a/combiner_cts/core/FIFO_36x128.vhd b/combiner_cts/core/FIFO_36x128.vhd
new file mode 100644 (file)
index 0000000..2d4ee0a
--- /dev/null
@@ -0,0 +1,764 @@
+-- VHDL netlist generated by SCUBA Diamond (64-bit) 3.7.1.502
+-- Module  Version: 5.1
+--/home/soft/lattice/diamond/3.7_x64/ispfpga/bin/lin64/scuba -w -n FIFO_36x128 -lang vhdl -synth synplify -bus_exp 7 -bb -arch ep5c00 -type ebfifo -depth 128 -width 36 -depth 128 -no_enable -pe 2 -pe2 4 -pf 126 -pf2 124 
+
+-- Wed Jul 18 14:24:04 2018
+
+library IEEE;
+use IEEE.std_logic_1164.all;
+-- synopsys translate_off
+library ecp3;
+use ecp3.components.all;
+-- synopsys translate_on
+
+entity FIFO_36x128 is
+    port (
+        Data: in  std_logic_vector(35 downto 0); 
+        Clock: in  std_logic; 
+        WrEn: in  std_logic; 
+        RdEn: in  std_logic; 
+        Reset: in  std_logic; 
+        Q: out  std_logic_vector(35 downto 0); 
+        Empty: out  std_logic; 
+        Full: out  std_logic; 
+        AlmostEmpty: out  std_logic; 
+        AlmostFull: out  std_logic);
+end FIFO_36x128;
+
+architecture Structure of FIFO_36x128 is
+
+    -- internal signal declarations
+    signal invout_2: std_logic;
+    signal invout_1: std_logic;
+    signal rden_i_inv: std_logic;
+    signal invout_0: std_logic;
+    signal r_nw_inv: std_logic;
+    signal r_nw: std_logic;
+    signal fcnt_en_inv: std_logic;
+    signal fcnt_en: std_logic;
+    signal empty_i: std_logic;
+    signal empty_d: std_logic;
+    signal full_i: std_logic;
+    signal full_d: std_logic;
+    signal ae: std_logic;
+    signal ae_d: std_logic;
+    signal af: std_logic;
+    signal af_d: std_logic;
+    signal ifcount_0: std_logic;
+    signal ifcount_1: std_logic;
+    signal bdcnt_bctr_ci: std_logic;
+    signal ifcount_2: std_logic;
+    signal ifcount_3: std_logic;
+    signal co0: std_logic;
+    signal ifcount_4: std_logic;
+    signal ifcount_5: std_logic;
+    signal co1: std_logic;
+    signal ifcount_6: std_logic;
+    signal ifcount_7: std_logic;
+    signal co3: std_logic;
+    signal co2: std_logic;
+    signal cmp_ci: std_logic;
+    signal rden_i: std_logic;
+    signal co0_1: std_logic;
+    signal co1_1: std_logic;
+    signal co2_1: std_logic;
+    signal cmp_le_1: std_logic;
+    signal cmp_le_1_c: std_logic;
+    signal cmp_ci_1: std_logic;
+    signal co0_2: std_logic;
+    signal co1_2: std_logic;
+    signal co2_2: std_logic;
+    signal wren_i: std_logic;
+    signal wren_i_inv: std_logic;
+    signal cmp_ge_d1: std_logic;
+    signal cmp_ge_d1_c: std_logic;
+    signal iwcount_0: std_logic;
+    signal iwcount_1: std_logic;
+    signal w_ctr_ci: std_logic;
+    signal wcount_0: std_logic;
+    signal wcount_1: std_logic;
+    signal iwcount_2: std_logic;
+    signal iwcount_3: std_logic;
+    signal co0_3: std_logic;
+    signal wcount_2: std_logic;
+    signal wcount_3: std_logic;
+    signal iwcount_4: std_logic;
+    signal iwcount_5: std_logic;
+    signal co1_3: std_logic;
+    signal wcount_4: std_logic;
+    signal wcount_5: std_logic;
+    signal iwcount_6: std_logic;
+    signal iwcount_7: std_logic;
+    signal co3_1: std_logic;
+    signal co2_3: std_logic;
+    signal wcount_6: std_logic;
+    signal wcount_7: std_logic;
+    signal ircount_0: std_logic;
+    signal ircount_1: std_logic;
+    signal r_ctr_ci: std_logic;
+    signal rcount_0: std_logic;
+    signal rcount_1: std_logic;
+    signal ircount_2: std_logic;
+    signal ircount_3: std_logic;
+    signal co0_4: std_logic;
+    signal rcount_2: std_logic;
+    signal rcount_3: std_logic;
+    signal ircount_4: std_logic;
+    signal ircount_5: std_logic;
+    signal co1_4: std_logic;
+    signal rcount_4: std_logic;
+    signal rcount_5: std_logic;
+    signal ircount_6: std_logic;
+    signal ircount_7: std_logic;
+    signal co3_2: std_logic;
+    signal co2_4: std_logic;
+    signal rcount_6: std_logic;
+    signal rcount_7: std_logic;
+    signal cmp_ci_2: std_logic;
+    signal co0_5: std_logic;
+    signal co1_5: std_logic;
+    signal co2_5: std_logic;
+    signal ae_set_d: std_logic;
+    signal ae_set_d_c: std_logic;
+    signal cmp_ci_3: std_logic;
+    signal co0_6: std_logic;
+    signal co1_6: std_logic;
+    signal co2_6: std_logic;
+    signal ae_clr_d: std_logic;
+    signal ae_clr_d_c: std_logic;
+    signal cmp_ci_4: std_logic;
+    signal co0_7: std_logic;
+    signal co1_7: std_logic;
+    signal co2_7: std_logic;
+    signal af_set_d: std_logic;
+    signal af_set_d_c: std_logic;
+    signal cmp_ci_5: std_logic;
+    signal fcnt_en_inv_inv: std_logic;
+    signal cnt_con: std_logic;
+    signal fcount_0: std_logic;
+    signal fcount_1: std_logic;
+    signal co0_8: std_logic;
+    signal cnt_con_inv: std_logic;
+    signal fcount_2: std_logic;
+    signal fcount_3: std_logic;
+    signal co1_8: std_logic;
+    signal fcount_4: std_logic;
+    signal fcount_5: std_logic;
+    signal co2_8: std_logic;
+    signal scuba_vhi: std_logic;
+    signal fcount_6: std_logic;
+    signal fcount_7: std_logic;
+    signal af_clr_d: std_logic;
+    signal af_clr_d_c: std_logic;
+    signal scuba_vlo: std_logic;
+
+    -- local component declarations
+    component AGEB2
+        port (A0: in  std_logic; A1: in  std_logic; B0: in  std_logic; 
+            B1: in  std_logic; CI: in  std_logic; GE: out  std_logic);
+    end component;
+    component ALEB2
+        port (A0: in  std_logic; A1: in  std_logic; B0: in  std_logic; 
+            B1: in  std_logic; CI: in  std_logic; LE: out  std_logic);
+    end component;
+    component AND2
+        port (A: in  std_logic; B: in  std_logic; Z: out  std_logic);
+    end component;
+    component CU2
+        port (CI: in  std_logic; PC0: in  std_logic; PC1: in  std_logic; 
+            CO: out  std_logic; NC0: out  std_logic; NC1: out  std_logic);
+    end component;
+    component CB2
+        port (CI: in  std_logic; PC0: in  std_logic; PC1: in  std_logic; 
+            CON: in  std_logic; CO: out  std_logic; NC0: out  std_logic; 
+            NC1: out  std_logic);
+    end component;
+    component FADD2B
+        port (A0: in  std_logic; A1: in  std_logic; B0: in  std_logic; 
+            B1: in  std_logic; CI: in  std_logic; COUT: out  std_logic; 
+            S0: out  std_logic; S1: out  std_logic);
+    end component;
+    component FD1P3DX
+        port (D: in  std_logic; SP: in  std_logic; CK: in  std_logic; 
+            CD: in  std_logic; Q: out  std_logic);
+    end component;
+    component FD1S3BX
+        port (D: in  std_logic; CK: in  std_logic; PD: in  std_logic; 
+            Q: out  std_logic);
+    end component;
+    component FD1S3DX
+        port (D: in  std_logic; CK: in  std_logic; CD: in  std_logic; 
+            Q: out  std_logic);
+    end component;
+    component INV
+        port (A: in  std_logic; Z: out  std_logic);
+    end component;
+    component ROM16X1A
+        generic (INITVAL : in std_logic_vector(15 downto 0));
+        port (AD3: in  std_logic; AD2: in  std_logic; AD1: in  std_logic; 
+            AD0: in  std_logic; DO0: out  std_logic);
+    end component;
+    component VHI
+        port (Z: out  std_logic);
+    end component;
+    component VLO
+        port (Z: out  std_logic);
+    end component;
+    component XOR2
+        port (A: in  std_logic; B: in  std_logic; Z: out  std_logic);
+    end component;
+    component PDPW16KC
+        generic (GSR : in String; CSDECODE_R : in String; 
+                CSDECODE_W : in String; REGMODE : in String; 
+                DATA_WIDTH_R : in Integer; DATA_WIDTH_W : in Integer);
+        port (DI0: in  std_logic; DI1: in  std_logic; DI2: in  std_logic; 
+            DI3: in  std_logic; DI4: in  std_logic; DI5: in  std_logic; 
+            DI6: in  std_logic; DI7: in  std_logic; DI8: in  std_logic; 
+            DI9: in  std_logic; DI10: in  std_logic; DI11: in  std_logic; 
+            DI12: in  std_logic; DI13: in  std_logic; 
+            DI14: in  std_logic; DI15: in  std_logic; 
+            DI16: in  std_logic; DI17: in  std_logic; 
+            DI18: in  std_logic; DI19: in  std_logic; 
+            DI20: in  std_logic; DI21: in  std_logic; 
+            DI22: in  std_logic; DI23: in  std_logic; 
+            DI24: in  std_logic; DI25: in  std_logic; 
+            DI26: in  std_logic; DI27: in  std_logic; 
+            DI28: in  std_logic; DI29: in  std_logic; 
+            DI30: in  std_logic; DI31: in  std_logic; 
+            DI32: in  std_logic; DI33: in  std_logic; 
+            DI34: in  std_logic; DI35: in  std_logic; 
+            ADW0: in  std_logic; ADW1: in  std_logic; 
+            ADW2: in  std_logic; ADW3: in  std_logic; 
+            ADW4: in  std_logic; ADW5: in  std_logic; 
+            ADW6: in  std_logic; ADW7: in  std_logic; 
+            ADW8: in  std_logic; BE0: in  std_logic; BE1: in  std_logic; 
+            BE2: in  std_logic; BE3: in  std_logic; CEW: in  std_logic; 
+            CLKW: in  std_logic; CSW0: in  std_logic; 
+            CSW1: in  std_logic; CSW2: in  std_logic; 
+            ADR0: in  std_logic; ADR1: in  std_logic; 
+            ADR2: in  std_logic; ADR3: in  std_logic; 
+            ADR4: in  std_logic; ADR5: in  std_logic; 
+            ADR6: in  std_logic; ADR7: in  std_logic; 
+            ADR8: in  std_logic; ADR9: in  std_logic; 
+            ADR10: in  std_logic; ADR11: in  std_logic; 
+            ADR12: in  std_logic; ADR13: in  std_logic; 
+            CER: in  std_logic; CLKR: in  std_logic; CSR0: in  std_logic; 
+            CSR1: in  std_logic; CSR2: in  std_logic; RST: in  std_logic; 
+            DO0: out  std_logic; DO1: out  std_logic; 
+            DO2: out  std_logic; DO3: out  std_logic; 
+            DO4: out  std_logic; DO5: out  std_logic; 
+            DO6: out  std_logic; DO7: out  std_logic; 
+            DO8: out  std_logic; DO9: out  std_logic; 
+            DO10: out  std_logic; DO11: out  std_logic; 
+            DO12: out  std_logic; DO13: out  std_logic; 
+            DO14: out  std_logic; DO15: out  std_logic; 
+            DO16: out  std_logic; DO17: out  std_logic; 
+            DO18: out  std_logic; DO19: out  std_logic; 
+            DO20: out  std_logic; DO21: out  std_logic; 
+            DO22: out  std_logic; DO23: out  std_logic; 
+            DO24: out  std_logic; DO25: out  std_logic; 
+            DO26: out  std_logic; DO27: out  std_logic; 
+            DO28: out  std_logic; DO29: out  std_logic; 
+            DO30: out  std_logic; DO31: out  std_logic; 
+            DO32: out  std_logic; DO33: out  std_logic; 
+            DO34: out  std_logic; DO35: out  std_logic);
+    end component;
+    attribute MEM_LPC_FILE : string; 
+    attribute MEM_INIT_FILE : string; 
+    attribute RESETMODE : string; 
+    attribute GSR : string; 
+    attribute MEM_LPC_FILE of pdp_ram_0_0_0 : label is "FIFO_36x128.lpc";
+    attribute MEM_INIT_FILE of pdp_ram_0_0_0 : label is "";
+    attribute RESETMODE of pdp_ram_0_0_0 : label is "SYNC";
+    attribute GSR of FF_27 : label is "ENABLED";
+    attribute GSR of FF_26 : label is "ENABLED";
+    attribute GSR of FF_25 : label is "ENABLED";
+    attribute GSR of FF_24 : label is "ENABLED";
+    attribute GSR of FF_23 : label is "ENABLED";
+    attribute GSR of FF_22 : label is "ENABLED";
+    attribute GSR of FF_21 : label is "ENABLED";
+    attribute GSR of FF_20 : label is "ENABLED";
+    attribute GSR of FF_19 : label is "ENABLED";
+    attribute GSR of FF_18 : label is "ENABLED";
+    attribute GSR of FF_17 : label is "ENABLED";
+    attribute GSR of FF_16 : label is "ENABLED";
+    attribute GSR of FF_15 : label is "ENABLED";
+    attribute GSR of FF_14 : label is "ENABLED";
+    attribute GSR of FF_13 : label is "ENABLED";
+    attribute GSR of FF_12 : label is "ENABLED";
+    attribute GSR of FF_11 : label is "ENABLED";
+    attribute GSR of FF_10 : label is "ENABLED";
+    attribute GSR of FF_9 : label is "ENABLED";
+    attribute GSR of FF_8 : label is "ENABLED";
+    attribute GSR of FF_7 : label is "ENABLED";
+    attribute GSR of FF_6 : label is "ENABLED";
+    attribute GSR of FF_5 : label is "ENABLED";
+    attribute GSR of FF_4 : label is "ENABLED";
+    attribute GSR of FF_3 : label is "ENABLED";
+    attribute GSR of FF_2 : label is "ENABLED";
+    attribute GSR of FF_1 : label is "ENABLED";
+    attribute GSR of FF_0 : label is "ENABLED";
+    attribute syn_keep : boolean;
+    attribute NGD_DRC_MASK : integer;
+    attribute NGD_DRC_MASK of Structure : architecture is 1;
+
+begin
+    -- component instantiation statements
+    AND2_t4: AND2
+        port map (A=>WrEn, B=>invout_2, Z=>wren_i);
+
+    INV_8: INV
+        port map (A=>full_i, Z=>invout_2);
+
+    AND2_t3: AND2
+        port map (A=>RdEn, B=>invout_1, Z=>rden_i);
+
+    INV_7: INV
+        port map (A=>empty_i, Z=>invout_1);
+
+    AND2_t2: AND2
+        port map (A=>wren_i, B=>rden_i_inv, Z=>cnt_con);
+
+    XOR2_t1: XOR2
+        port map (A=>wren_i, B=>rden_i, Z=>fcnt_en);
+
+    INV_6: INV
+        port map (A=>rden_i, Z=>rden_i_inv);
+
+    INV_5: INV
+        port map (A=>wren_i, Z=>wren_i_inv);
+
+    LUT4_3: ROM16X1A
+        generic map (initval=> X"3232")
+        port map (AD3=>scuba_vlo, AD2=>cmp_le_1, AD1=>wren_i, 
+            AD0=>empty_i, DO0=>empty_d);
+
+    LUT4_2: ROM16X1A
+        generic map (initval=> X"3232")
+        port map (AD3=>scuba_vlo, AD2=>cmp_ge_d1, AD1=>rden_i, 
+            AD0=>full_i, DO0=>full_d);
+
+    AND2_t0: AND2
+        port map (A=>rden_i, B=>invout_0, Z=>r_nw);
+
+    INV_4: INV
+        port map (A=>wren_i, Z=>invout_0);
+
+    INV_3: INV
+        port map (A=>fcnt_en, Z=>fcnt_en_inv);
+
+    INV_2: INV
+        port map (A=>cnt_con, Z=>cnt_con_inv);
+
+    INV_1: INV
+        port map (A=>r_nw, Z=>r_nw_inv);
+
+    INV_0: INV
+        port map (A=>fcnt_en_inv, Z=>fcnt_en_inv_inv);
+
+    LUT4_1: ROM16X1A
+        generic map (initval=> X"4450")
+        port map (AD3=>ae, AD2=>ae_set_d, AD1=>ae_clr_d, AD0=>scuba_vlo, 
+            DO0=>ae_d);
+
+    LUT4_0: ROM16X1A
+        generic map (initval=> X"4450")
+        port map (AD3=>af, AD2=>af_set_d, AD1=>af_clr_d, AD0=>scuba_vlo, 
+            DO0=>af_d);
+
+    pdp_ram_0_0_0: PDPW16KC
+        generic map (CSDECODE_R=> "0b000", CSDECODE_W=> "0b001", GSR=> "DISABLED", 
+        REGMODE=> "NOREG", DATA_WIDTH_R=>  36, DATA_WIDTH_W=>  36)
+        port map (DI0=>Data(0), DI1=>Data(1), DI2=>Data(2), DI3=>Data(3), 
+            DI4=>Data(4), DI5=>Data(5), DI6=>Data(6), DI7=>Data(7), 
+            DI8=>Data(8), DI9=>Data(9), DI10=>Data(10), DI11=>Data(11), 
+            DI12=>Data(12), DI13=>Data(13), DI14=>Data(14), 
+            DI15=>Data(15), DI16=>Data(16), DI17=>Data(17), 
+            DI18=>Data(18), DI19=>Data(19), DI20=>Data(20), 
+            DI21=>Data(21), DI22=>Data(22), DI23=>Data(23), 
+            DI24=>Data(24), DI25=>Data(25), DI26=>Data(26), 
+            DI27=>Data(27), DI28=>Data(28), DI29=>Data(29), 
+            DI30=>Data(30), DI31=>Data(31), DI32=>Data(32), 
+            DI33=>Data(33), DI34=>Data(34), DI35=>Data(35), 
+            ADW0=>wcount_0, ADW1=>wcount_1, ADW2=>wcount_2, 
+            ADW3=>wcount_3, ADW4=>wcount_4, ADW5=>wcount_5, 
+            ADW6=>wcount_6, ADW7=>scuba_vlo, ADW8=>scuba_vlo, 
+            BE0=>scuba_vhi, BE1=>scuba_vhi, BE2=>scuba_vhi, 
+            BE3=>scuba_vhi, CEW=>wren_i, CLKW=>Clock, CSW0=>scuba_vhi, 
+            CSW1=>scuba_vlo, CSW2=>scuba_vlo, ADR0=>scuba_vlo, 
+            ADR1=>scuba_vlo, ADR2=>scuba_vlo, ADR3=>scuba_vlo, 
+            ADR4=>scuba_vlo, ADR5=>rcount_0, ADR6=>rcount_1, 
+            ADR7=>rcount_2, ADR8=>rcount_3, ADR9=>rcount_4, 
+            ADR10=>rcount_5, ADR11=>rcount_6, ADR12=>scuba_vlo, 
+            ADR13=>scuba_vlo, CER=>rden_i, CLKR=>Clock, CSR0=>scuba_vlo, 
+            CSR1=>scuba_vlo, CSR2=>scuba_vlo, RST=>Reset, DO0=>Q(18), 
+            DO1=>Q(19), DO2=>Q(20), DO3=>Q(21), DO4=>Q(22), DO5=>Q(23), 
+            DO6=>Q(24), DO7=>Q(25), DO8=>Q(26), DO9=>Q(27), DO10=>Q(28), 
+            DO11=>Q(29), DO12=>Q(30), DO13=>Q(31), DO14=>Q(32), 
+            DO15=>Q(33), DO16=>Q(34), DO17=>Q(35), DO18=>Q(0), 
+            DO19=>Q(1), DO20=>Q(2), DO21=>Q(3), DO22=>Q(4), DO23=>Q(5), 
+            DO24=>Q(6), DO25=>Q(7), DO26=>Q(8), DO27=>Q(9), DO28=>Q(10), 
+            DO29=>Q(11), DO30=>Q(12), DO31=>Q(13), DO32=>Q(14), 
+            DO33=>Q(15), DO34=>Q(16), DO35=>Q(17));
+
+    FF_27: FD1P3DX
+        port map (D=>ifcount_0, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_0);
+
+    FF_26: FD1P3DX
+        port map (D=>ifcount_1, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_1);
+
+    FF_25: FD1P3DX
+        port map (D=>ifcount_2, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_2);
+
+    FF_24: FD1P3DX
+        port map (D=>ifcount_3, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_3);
+
+    FF_23: FD1P3DX
+        port map (D=>ifcount_4, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_4);
+
+    FF_22: FD1P3DX
+        port map (D=>ifcount_5, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_5);
+
+    FF_21: FD1P3DX
+        port map (D=>ifcount_6, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_6);
+
+    FF_20: FD1P3DX
+        port map (D=>ifcount_7, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_7);
+
+    FF_19: FD1S3BX
+        port map (D=>empty_d, CK=>Clock, PD=>Reset, Q=>empty_i);
+
+    FF_18: FD1S3DX
+        port map (D=>full_d, CK=>Clock, CD=>Reset, Q=>full_i);
+
+    FF_17: FD1P3DX
+        port map (D=>iwcount_0, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_0);
+
+    FF_16: FD1P3DX
+        port map (D=>iwcount_1, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_1);
+
+    FF_15: FD1P3DX
+        port map (D=>iwcount_2, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_2);
+
+    FF_14: FD1P3DX
+        port map (D=>iwcount_3, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_3);
+
+    FF_13: FD1P3DX
+        port map (D=>iwcount_4, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_4);
+
+    FF_12: FD1P3DX
+        port map (D=>iwcount_5, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_5);
+
+    FF_11: FD1P3DX
+        port map (D=>iwcount_6, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_6);
+
+    FF_10: FD1P3DX
+        port map (D=>iwcount_7, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_7);
+
+    FF_9: FD1P3DX
+        port map (D=>ircount_0, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_0);
+
+    FF_8: FD1P3DX
+        port map (D=>ircount_1, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_1);
+
+    FF_7: FD1P3DX
+        port map (D=>ircount_2, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_2);
+
+    FF_6: FD1P3DX
+        port map (D=>ircount_3, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_3);
+
+    FF_5: FD1P3DX
+        port map (D=>ircount_4, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_4);
+
+    FF_4: FD1P3DX
+        port map (D=>ircount_5, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_5);
+
+    FF_3: FD1P3DX
+        port map (D=>ircount_6, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_6);
+
+    FF_2: FD1P3DX
+        port map (D=>ircount_7, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_7);
+
+    FF_1: FD1S3BX
+        port map (D=>ae_d, CK=>Clock, PD=>Reset, Q=>ae);
+
+    FF_0: FD1S3DX
+        port map (D=>af_d, CK=>Clock, CD=>Reset, Q=>af);
+
+    bdcnt_bctr_cia: FADD2B
+        port map (A0=>scuba_vlo, A1=>cnt_con, B0=>scuba_vlo, B1=>cnt_con, 
+            CI=>scuba_vlo, COUT=>bdcnt_bctr_ci, S0=>open, S1=>open);
+
+    bdcnt_bctr_0: CB2
+        port map (CI=>bdcnt_bctr_ci, PC0=>fcount_0, PC1=>fcount_1, 
+            CON=>cnt_con, CO=>co0, NC0=>ifcount_0, NC1=>ifcount_1);
+
+    bdcnt_bctr_1: CB2
+        port map (CI=>co0, PC0=>fcount_2, PC1=>fcount_3, CON=>cnt_con, 
+            CO=>co1, NC0=>ifcount_2, NC1=>ifcount_3);
+
+    bdcnt_bctr_2: CB2
+        port map (CI=>co1, PC0=>fcount_4, PC1=>fcount_5, CON=>cnt_con, 
+            CO=>co2, NC0=>ifcount_4, NC1=>ifcount_5);
+
+    bdcnt_bctr_3: CB2
+        port map (CI=>co2, PC0=>fcount_6, PC1=>fcount_7, CON=>cnt_con, 
+            CO=>co3, NC0=>ifcount_6, NC1=>ifcount_7);
+
+    e_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci, S0=>open, 
+            S1=>open);
+
+    e_cmp_0: ALEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>rden_i, B1=>scuba_vlo, 
+            CI=>cmp_ci, LE=>co0_1);
+
+    e_cmp_1: ALEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co0_1, LE=>co1_1);
+
+    e_cmp_2: ALEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co1_1, LE=>co2_1);
+
+    e_cmp_3: ALEB2
+        port map (A0=>fcount_6, A1=>fcount_7, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co2_1, LE=>cmp_le_1_c);
+
+    a0: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>cmp_le_1_c, COUT=>open, S0=>cmp_le_1, 
+            S1=>open);
+
+    g_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_1, S0=>open, 
+            S1=>open);
+
+    g_cmp_0: AGEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>wren_i, B1=>wren_i, 
+            CI=>cmp_ci_1, GE=>co0_2);
+
+    g_cmp_1: AGEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>wren_i, B1=>wren_i, 
+            CI=>co0_2, GE=>co1_2);
+
+    g_cmp_2: AGEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>wren_i, B1=>wren_i, 
+            CI=>co1_2, GE=>co2_2);
+
+    g_cmp_3: AGEB2
+        port map (A0=>fcount_6, A1=>fcount_7, B0=>wren_i, B1=>wren_i_inv, 
+            CI=>co2_2, GE=>cmp_ge_d1_c);
+
+    a1: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>cmp_ge_d1_c, COUT=>open, S0=>cmp_ge_d1, 
+            S1=>open);
+
+    w_ctr_cia: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vhi, B0=>scuba_vlo, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>w_ctr_ci, S0=>open, 
+            S1=>open);
+
+    w_ctr_0: CU2
+        port map (CI=>w_ctr_ci, PC0=>wcount_0, PC1=>wcount_1, CO=>co0_3, 
+            NC0=>iwcount_0, NC1=>iwcount_1);
+
+    w_ctr_1: CU2
+        port map (CI=>co0_3, PC0=>wcount_2, PC1=>wcount_3, CO=>co1_3, 
+            NC0=>iwcount_2, NC1=>iwcount_3);
+
+    w_ctr_2: CU2
+        port map (CI=>co1_3, PC0=>wcount_4, PC1=>wcount_5, CO=>co2_3, 
+            NC0=>iwcount_4, NC1=>iwcount_5);
+
+    w_ctr_3: CU2
+        port map (CI=>co2_3, PC0=>wcount_6, PC1=>wcount_7, CO=>co3_1, 
+            NC0=>iwcount_6, NC1=>iwcount_7);
+
+    r_ctr_cia: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vhi, B0=>scuba_vlo, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>r_ctr_ci, S0=>open, 
+            S1=>open);
+
+    r_ctr_0: CU2
+        port map (CI=>r_ctr_ci, PC0=>rcount_0, PC1=>rcount_1, CO=>co0_4, 
+            NC0=>ircount_0, NC1=>ircount_1);
+
+    r_ctr_1: CU2
+        port map (CI=>co0_4, PC0=>rcount_2, PC1=>rcount_3, CO=>co1_4, 
+            NC0=>ircount_2, NC1=>ircount_3);
+
+    r_ctr_2: CU2
+        port map (CI=>co1_4, PC0=>rcount_4, PC1=>rcount_5, CO=>co2_4, 
+            NC0=>ircount_4, NC1=>ircount_5);
+
+    r_ctr_3: CU2
+        port map (CI=>co2_4, PC0=>rcount_6, PC1=>rcount_7, CO=>co3_2, 
+            NC0=>ircount_6, NC1=>ircount_7);
+
+    ae_set_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_2, S0=>open, 
+            S1=>open);
+
+    ae_set_cmp_0: ALEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>fcnt_en_inv_inv, 
+            B1=>cnt_con_inv, CI=>cmp_ci_2, LE=>co0_5);
+
+    ae_set_cmp_1: ALEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co0_5, LE=>co1_5);
+
+    ae_set_cmp_2: ALEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co1_5, LE=>co2_5);
+
+    ae_set_cmp_3: ALEB2
+        port map (A0=>fcount_6, A1=>fcount_7, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co2_5, LE=>ae_set_d_c);
+
+    a2: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>ae_set_d_c, COUT=>open, S0=>ae_set_d, 
+            S1=>open);
+
+    ae_clr_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_3, S0=>open, 
+            S1=>open);
+
+    ae_clr_cmp_0: ALEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>fcnt_en_inv_inv, 
+            B1=>cnt_con, CI=>cmp_ci_3, LE=>co0_6);
+
+    ae_clr_cmp_1: ALEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>cnt_con_inv, 
+            B1=>scuba_vlo, CI=>co0_6, LE=>co1_6);
+
+    ae_clr_cmp_2: ALEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co1_6, LE=>co2_6);
+
+    ae_clr_cmp_3: ALEB2
+        port map (A0=>fcount_6, A1=>fcount_7, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co2_6, LE=>ae_clr_d_c);
+
+    a3: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>ae_clr_d_c, COUT=>open, S0=>ae_clr_d, 
+            S1=>open);
+
+    af_set_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_4, S0=>open, 
+            S1=>open);
+
+    af_set_cmp_0: AGEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>fcnt_en_inv_inv, 
+            B1=>cnt_con_inv, CI=>cmp_ci_4, GE=>co0_7);
+
+    af_set_cmp_1: AGEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>co0_7, GE=>co1_7);
+
+    af_set_cmp_2: AGEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>co1_7, GE=>co2_7);
+
+    af_set_cmp_3: AGEB2
+        port map (A0=>fcount_6, A1=>fcount_7, B0=>scuba_vhi, 
+            B1=>scuba_vlo, CI=>co2_7, GE=>af_set_d_c);
+
+    a4: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>af_set_d_c, COUT=>open, S0=>af_set_d, 
+            S1=>open);
+
+    af_clr_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_5, S0=>open, 
+            S1=>open);
+
+    af_clr_cmp_0: AGEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>fcnt_en_inv_inv, 
+            B1=>cnt_con, CI=>cmp_ci_5, GE=>co0_8);
+
+    af_clr_cmp_1: AGEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>cnt_con_inv, 
+            B1=>scuba_vhi, CI=>co0_8, GE=>co1_8);
+
+    af_clr_cmp_2: AGEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>co1_8, GE=>co2_8);
+
+    scuba_vhi_inst: VHI
+        port map (Z=>scuba_vhi);
+
+    af_clr_cmp_3: AGEB2
+        port map (A0=>fcount_6, A1=>fcount_7, B0=>scuba_vhi, 
+            B1=>scuba_vlo, CI=>co2_8, GE=>af_clr_d_c);
+
+    scuba_vlo_inst: VLO
+        port map (Z=>scuba_vlo);
+
+    a5: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>af_clr_d_c, COUT=>open, S0=>af_clr_d, 
+            S1=>open);
+
+    Empty <= empty_i;
+    Full <= full_i;
+    AlmostEmpty <= ae;
+    AlmostFull <= af;
+end Structure;
+
+-- synopsys translate_off
+library ecp3;
+configuration Structure_CON of FIFO_36x128 is
+    for Structure
+        for all:AGEB2 use entity ecp3.AGEB2(V); end for;
+        for all:ALEB2 use entity ecp3.ALEB2(V); end for;
+        for all:AND2 use entity ecp3.AND2(V); end for;
+        for all:CU2 use entity ecp3.CU2(V); end for;
+        for all:CB2 use entity ecp3.CB2(V); end for;
+        for all:FADD2B use entity ecp3.FADD2B(V); end for;
+        for all:FD1P3DX use entity ecp3.FD1P3DX(V); end for;
+        for all:FD1S3BX use entity ecp3.FD1S3BX(V); end for;
+        for all:FD1S3DX use entity ecp3.FD1S3DX(V); end for;
+        for all:INV use entity ecp3.INV(V); end for;
+        for all:ROM16X1A use entity ecp3.ROM16X1A(V); end for;
+        for all:VHI use entity ecp3.VHI(V); end for;
+        for all:VLO use entity ecp3.VLO(V); end for;
+        for all:XOR2 use entity ecp3.XOR2(V); end for;
+        for all:PDPW16KC use entity ecp3.PDPW16KC(V); end for;
+    end for;
+end Structure_CON;
+
+-- synopsys translate_on
diff --git a/combiner_cts/core/FIFO_36x64.ipx b/combiner_cts/core/FIFO_36x64.ipx
new file mode 100644 (file)
index 0000000..c52a28e
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<DiamondModule name="FIFO_36x64" module="FIFO" VendorName="Lattice Semiconductor Corporation" generator="IPexpress" date="2018 07 18 14:24:51.070" version="5.1" type="Module" synthesis="synplify" source_format="VHDL">
+  <Package>
+               <File name="FIFO_36x64.lpc" type="lpc" modified="2018 07 18 14:24:47.000"/>
+               <File name="FIFO_36x64.vhd" type="top_level_vhdl" modified="2018 07 18 14:24:47.000"/>
+               <File name="FIFO_36x64_tmpl.vhd" type="template_vhdl" modified="2018 07 18 14:24:47.000"/>
+               <File name="tb_FIFO_36x64_tmpl.vhd" type="testbench_vhdl" modified="2018 07 18 14:24:47.000"/>
+  </Package>
+</DiamondModule>
diff --git a/combiner_cts/core/FIFO_36x64.lpc b/combiner_cts/core/FIFO_36x64.lpc
new file mode 100644 (file)
index 0000000..29d7df3
--- /dev/null
@@ -0,0 +1,48 @@
+[Device]
+Family=latticeecp3
+PartType=LFE3-150EA
+PartName=LFE3-150EA-8FN672C
+SpeedGrade=8
+Package=FPBGA672
+OperatingCondition=COM
+Status=P
+
+[IP]
+VendorName=Lattice Semiconductor Corporation
+CoreType=LPM
+CoreStatus=Demo
+CoreName=FIFO
+CoreRevision=5.1
+ModuleName=FIFO_36x64
+SourceFormat=VHDL
+ParameterFileVersion=1.0
+Date=07/18/2018
+Time=14:24:47
+
+[Parameters]
+Verilog=0
+VHDL=1
+EDIF=1
+Destination=Synplicity
+Expression=BusA(0 to 7)
+Order=Big Endian [MSB:LSB]
+IO=0
+FIFOImp=EBR Based
+Depth=64
+Width=36
+regout=0
+CtrlByRdEn=0
+EmpFlg=1
+PeMode=Static - Dual Threshold
+PeAssert=2
+PeDeassert=4
+FullFlg=1
+PfMode=Static - Dual Threshold
+PfAssert=62
+PfDeassert=60
+RDataCount=0
+EnECC=0
+EnFWFT=0
+
+[Command]
+cmd_line= -w -n FIFO_36x64 -lang vhdl -synth synplify -bus_exp 7 -bb -arch ep5c00 -type fifoblk -addr_width 6 -data_width 36 -num_words 64 -no_enable -pe 2 -pe2 4 -pf 62 -pf2 60
diff --git a/combiner_cts/core/FIFO_36x64.vhd b/combiner_cts/core/FIFO_36x64.vhd
new file mode 100644 (file)
index 0000000..9f604b5
--- /dev/null
@@ -0,0 +1,743 @@
+-- VHDL netlist generated by SCUBA Diamond (64-bit) 3.7.1.502
+-- Module  Version: 5.1
+--/home/soft/lattice/diamond/3.7_x64/ispfpga/bin/lin64/scuba -w -n FIFO_36x64 -lang vhdl -synth synplify -bus_exp 7 -bb -arch ep5c00 -type ebfifo -depth 64 -width 36 -depth 64 -no_enable -pe 2 -pe2 4 -pf 62 -pf2 60 
+
+-- Wed Jul 18 14:24:47 2018
+
+library IEEE;
+use IEEE.std_logic_1164.all;
+-- synopsys translate_off
+library ecp3;
+use ecp3.components.all;
+-- synopsys translate_on
+
+entity FIFO_36x64 is
+    port (
+        Data: in  std_logic_vector(35 downto 0); 
+        Clock: in  std_logic; 
+        WrEn: in  std_logic; 
+        RdEn: in  std_logic; 
+        Reset: in  std_logic; 
+        Q: out  std_logic_vector(35 downto 0); 
+        Empty: out  std_logic; 
+        Full: out  std_logic; 
+        AlmostEmpty: out  std_logic; 
+        AlmostFull: out  std_logic);
+end FIFO_36x64;
+
+architecture Structure of FIFO_36x64 is
+
+    -- internal signal declarations
+    signal invout_2: std_logic;
+    signal invout_1: std_logic;
+    signal rden_i_inv: std_logic;
+    signal invout_0: std_logic;
+    signal r_nw_inv: std_logic;
+    signal r_nw: std_logic;
+    signal fcnt_en_inv: std_logic;
+    signal fcnt_en: std_logic;
+    signal empty_i: std_logic;
+    signal empty_d: std_logic;
+    signal full_i: std_logic;
+    signal full_d: std_logic;
+    signal ae: std_logic;
+    signal ae_d: std_logic;
+    signal af: std_logic;
+    signal af_d: std_logic;
+    signal ifcount_0: std_logic;
+    signal ifcount_1: std_logic;
+    signal bdcnt_bctr_ci: std_logic;
+    signal ifcount_2: std_logic;
+    signal ifcount_3: std_logic;
+    signal co0: std_logic;
+    signal ifcount_4: std_logic;
+    signal ifcount_5: std_logic;
+    signal co1: std_logic;
+    signal ifcount_6: std_logic;
+    signal co3: std_logic;
+    signal co2: std_logic;
+    signal cmp_ci: std_logic;
+    signal rden_i: std_logic;
+    signal co0_1: std_logic;
+    signal co1_1: std_logic;
+    signal co2_1: std_logic;
+    signal cmp_le_1: std_logic;
+    signal cmp_le_1_c: std_logic;
+    signal cmp_ci_1: std_logic;
+    signal co0_2: std_logic;
+    signal co1_2: std_logic;
+    signal wren_i: std_logic;
+    signal co2_2: std_logic;
+    signal wren_i_inv: std_logic;
+    signal cmp_ge_d1: std_logic;
+    signal cmp_ge_d1_c: std_logic;
+    signal iwcount_0: std_logic;
+    signal iwcount_1: std_logic;
+    signal w_ctr_ci: std_logic;
+    signal wcount_0: std_logic;
+    signal wcount_1: std_logic;
+    signal iwcount_2: std_logic;
+    signal iwcount_3: std_logic;
+    signal co0_3: std_logic;
+    signal wcount_2: std_logic;
+    signal wcount_3: std_logic;
+    signal iwcount_4: std_logic;
+    signal iwcount_5: std_logic;
+    signal co1_3: std_logic;
+    signal wcount_4: std_logic;
+    signal wcount_5: std_logic;
+    signal iwcount_6: std_logic;
+    signal co3_1: std_logic;
+    signal co2_3: std_logic;
+    signal wcount_6: std_logic;
+    signal ircount_0: std_logic;
+    signal ircount_1: std_logic;
+    signal r_ctr_ci: std_logic;
+    signal rcount_0: std_logic;
+    signal rcount_1: std_logic;
+    signal ircount_2: std_logic;
+    signal ircount_3: std_logic;
+    signal co0_4: std_logic;
+    signal rcount_2: std_logic;
+    signal rcount_3: std_logic;
+    signal ircount_4: std_logic;
+    signal ircount_5: std_logic;
+    signal co1_4: std_logic;
+    signal rcount_4: std_logic;
+    signal rcount_5: std_logic;
+    signal ircount_6: std_logic;
+    signal co3_2: std_logic;
+    signal co2_4: std_logic;
+    signal rcount_6: std_logic;
+    signal cmp_ci_2: std_logic;
+    signal co0_5: std_logic;
+    signal co1_5: std_logic;
+    signal co2_5: std_logic;
+    signal ae_set_d: std_logic;
+    signal ae_set_d_c: std_logic;
+    signal cmp_ci_3: std_logic;
+    signal co0_6: std_logic;
+    signal co1_6: std_logic;
+    signal co2_6: std_logic;
+    signal ae_clr_d: std_logic;
+    signal ae_clr_d_c: std_logic;
+    signal cmp_ci_4: std_logic;
+    signal co0_7: std_logic;
+    signal co1_7: std_logic;
+    signal co2_7: std_logic;
+    signal af_set_d: std_logic;
+    signal af_set_d_c: std_logic;
+    signal cmp_ci_5: std_logic;
+    signal fcnt_en_inv_inv: std_logic;
+    signal cnt_con: std_logic;
+    signal fcount_0: std_logic;
+    signal fcount_1: std_logic;
+    signal co0_8: std_logic;
+    signal cnt_con_inv: std_logic;
+    signal fcount_2: std_logic;
+    signal fcount_3: std_logic;
+    signal co1_8: std_logic;
+    signal scuba_vhi: std_logic;
+    signal fcount_4: std_logic;
+    signal fcount_5: std_logic;
+    signal co2_8: std_logic;
+    signal fcount_6: std_logic;
+    signal af_clr_d: std_logic;
+    signal af_clr_d_c: std_logic;
+    signal scuba_vlo: std_logic;
+
+    -- local component declarations
+    component AGEB2
+        port (A0: in  std_logic; A1: in  std_logic; B0: in  std_logic; 
+            B1: in  std_logic; CI: in  std_logic; GE: out  std_logic);
+    end component;
+    component ALEB2
+        port (A0: in  std_logic; A1: in  std_logic; B0: in  std_logic; 
+            B1: in  std_logic; CI: in  std_logic; LE: out  std_logic);
+    end component;
+    component AND2
+        port (A: in  std_logic; B: in  std_logic; Z: out  std_logic);
+    end component;
+    component CU2
+        port (CI: in  std_logic; PC0: in  std_logic; PC1: in  std_logic; 
+            CO: out  std_logic; NC0: out  std_logic; NC1: out  std_logic);
+    end component;
+    component CB2
+        port (CI: in  std_logic; PC0: in  std_logic; PC1: in  std_logic; 
+            CON: in  std_logic; CO: out  std_logic; NC0: out  std_logic; 
+            NC1: out  std_logic);
+    end component;
+    component FADD2B
+        port (A0: in  std_logic; A1: in  std_logic; B0: in  std_logic; 
+            B1: in  std_logic; CI: in  std_logic; COUT: out  std_logic; 
+            S0: out  std_logic; S1: out  std_logic);
+    end component;
+    component FD1P3DX
+        port (D: in  std_logic; SP: in  std_logic; CK: in  std_logic; 
+            CD: in  std_logic; Q: out  std_logic);
+    end component;
+    component FD1S3BX
+        port (D: in  std_logic; CK: in  std_logic; PD: in  std_logic; 
+            Q: out  std_logic);
+    end component;
+    component FD1S3DX
+        port (D: in  std_logic; CK: in  std_logic; CD: in  std_logic; 
+            Q: out  std_logic);
+    end component;
+    component INV
+        port (A: in  std_logic; Z: out  std_logic);
+    end component;
+    component ROM16X1A
+        generic (INITVAL : in std_logic_vector(15 downto 0));
+        port (AD3: in  std_logic; AD2: in  std_logic; AD1: in  std_logic; 
+            AD0: in  std_logic; DO0: out  std_logic);
+    end component;
+    component VHI
+        port (Z: out  std_logic);
+    end component;
+    component VLO
+        port (Z: out  std_logic);
+    end component;
+    component XOR2
+        port (A: in  std_logic; B: in  std_logic; Z: out  std_logic);
+    end component;
+    component PDPW16KC
+        generic (GSR : in String; CSDECODE_R : in String; 
+                CSDECODE_W : in String; REGMODE : in String; 
+                DATA_WIDTH_R : in Integer; DATA_WIDTH_W : in Integer);
+        port (DI0: in  std_logic; DI1: in  std_logic; DI2: in  std_logic; 
+            DI3: in  std_logic; DI4: in  std_logic; DI5: in  std_logic; 
+            DI6: in  std_logic; DI7: in  std_logic; DI8: in  std_logic; 
+            DI9: in  std_logic; DI10: in  std_logic; DI11: in  std_logic; 
+            DI12: in  std_logic; DI13: in  std_logic; 
+            DI14: in  std_logic; DI15: in  std_logic; 
+            DI16: in  std_logic; DI17: in  std_logic; 
+            DI18: in  std_logic; DI19: in  std_logic; 
+            DI20: in  std_logic; DI21: in  std_logic; 
+            DI22: in  std_logic; DI23: in  std_logic; 
+            DI24: in  std_logic; DI25: in  std_logic; 
+            DI26: in  std_logic; DI27: in  std_logic; 
+            DI28: in  std_logic; DI29: in  std_logic; 
+            DI30: in  std_logic; DI31: in  std_logic; 
+            DI32: in  std_logic; DI33: in  std_logic; 
+            DI34: in  std_logic; DI35: in  std_logic; 
+            ADW0: in  std_logic; ADW1: in  std_logic; 
+            ADW2: in  std_logic; ADW3: in  std_logic; 
+            ADW4: in  std_logic; ADW5: in  std_logic; 
+            ADW6: in  std_logic; ADW7: in  std_logic; 
+            ADW8: in  std_logic; BE0: in  std_logic; BE1: in  std_logic; 
+            BE2: in  std_logic; BE3: in  std_logic; CEW: in  std_logic; 
+            CLKW: in  std_logic; CSW0: in  std_logic; 
+            CSW1: in  std_logic; CSW2: in  std_logic; 
+            ADR0: in  std_logic; ADR1: in  std_logic; 
+            ADR2: in  std_logic; ADR3: in  std_logic; 
+            ADR4: in  std_logic; ADR5: in  std_logic; 
+            ADR6: in  std_logic; ADR7: in  std_logic; 
+            ADR8: in  std_logic; ADR9: in  std_logic; 
+            ADR10: in  std_logic; ADR11: in  std_logic; 
+            ADR12: in  std_logic; ADR13: in  std_logic; 
+            CER: in  std_logic; CLKR: in  std_logic; CSR0: in  std_logic; 
+            CSR1: in  std_logic; CSR2: in  std_logic; RST: in  std_logic; 
+            DO0: out  std_logic; DO1: out  std_logic; 
+            DO2: out  std_logic; DO3: out  std_logic; 
+            DO4: out  std_logic; DO5: out  std_logic; 
+            DO6: out  std_logic; DO7: out  std_logic; 
+            DO8: out  std_logic; DO9: out  std_logic; 
+            DO10: out  std_logic; DO11: out  std_logic; 
+            DO12: out  std_logic; DO13: out  std_logic; 
+            DO14: out  std_logic; DO15: out  std_logic; 
+            DO16: out  std_logic; DO17: out  std_logic; 
+            DO18: out  std_logic; DO19: out  std_logic; 
+            DO20: out  std_logic; DO21: out  std_logic; 
+            DO22: out  std_logic; DO23: out  std_logic; 
+            DO24: out  std_logic; DO25: out  std_logic; 
+            DO26: out  std_logic; DO27: out  std_logic; 
+            DO28: out  std_logic; DO29: out  std_logic; 
+            DO30: out  std_logic; DO31: out  std_logic; 
+            DO32: out  std_logic; DO33: out  std_logic; 
+            DO34: out  std_logic; DO35: out  std_logic);
+    end component;
+    attribute MEM_LPC_FILE : string; 
+    attribute MEM_INIT_FILE : string; 
+    attribute RESETMODE : string; 
+    attribute GSR : string; 
+    attribute MEM_LPC_FILE of pdp_ram_0_0_0 : label is "FIFO_36x64.lpc";
+    attribute MEM_INIT_FILE of pdp_ram_0_0_0 : label is "";
+    attribute RESETMODE of pdp_ram_0_0_0 : label is "SYNC";
+    attribute GSR of FF_24 : label is "ENABLED";
+    attribute GSR of FF_23 : label is "ENABLED";
+    attribute GSR of FF_22 : label is "ENABLED";
+    attribute GSR of FF_21 : label is "ENABLED";
+    attribute GSR of FF_20 : label is "ENABLED";
+    attribute GSR of FF_19 : label is "ENABLED";
+    attribute GSR of FF_18 : label is "ENABLED";
+    attribute GSR of FF_17 : label is "ENABLED";
+    attribute GSR of FF_16 : label is "ENABLED";
+    attribute GSR of FF_15 : label is "ENABLED";
+    attribute GSR of FF_14 : label is "ENABLED";
+    attribute GSR of FF_13 : label is "ENABLED";
+    attribute GSR of FF_12 : label is "ENABLED";
+    attribute GSR of FF_11 : label is "ENABLED";
+    attribute GSR of FF_10 : label is "ENABLED";
+    attribute GSR of FF_9 : label is "ENABLED";
+    attribute GSR of FF_8 : label is "ENABLED";
+    attribute GSR of FF_7 : label is "ENABLED";
+    attribute GSR of FF_6 : label is "ENABLED";
+    attribute GSR of FF_5 : label is "ENABLED";
+    attribute GSR of FF_4 : label is "ENABLED";
+    attribute GSR of FF_3 : label is "ENABLED";
+    attribute GSR of FF_2 : label is "ENABLED";
+    attribute GSR of FF_1 : label is "ENABLED";
+    attribute GSR of FF_0 : label is "ENABLED";
+    attribute syn_keep : boolean;
+    attribute NGD_DRC_MASK : integer;
+    attribute NGD_DRC_MASK of Structure : architecture is 1;
+
+begin
+    -- component instantiation statements
+    AND2_t4: AND2
+        port map (A=>WrEn, B=>invout_2, Z=>wren_i);
+
+    INV_8: INV
+        port map (A=>full_i, Z=>invout_2);
+
+    AND2_t3: AND2
+        port map (A=>RdEn, B=>invout_1, Z=>rden_i);
+
+    INV_7: INV
+        port map (A=>empty_i, Z=>invout_1);
+
+    AND2_t2: AND2
+        port map (A=>wren_i, B=>rden_i_inv, Z=>cnt_con);
+
+    XOR2_t1: XOR2
+        port map (A=>wren_i, B=>rden_i, Z=>fcnt_en);
+
+    INV_6: INV
+        port map (A=>rden_i, Z=>rden_i_inv);
+
+    INV_5: INV
+        port map (A=>wren_i, Z=>wren_i_inv);
+
+    LUT4_3: ROM16X1A
+        generic map (initval=> X"3232")
+        port map (AD3=>scuba_vlo, AD2=>cmp_le_1, AD1=>wren_i, 
+            AD0=>empty_i, DO0=>empty_d);
+
+    LUT4_2: ROM16X1A
+        generic map (initval=> X"3232")
+        port map (AD3=>scuba_vlo, AD2=>cmp_ge_d1, AD1=>rden_i, 
+            AD0=>full_i, DO0=>full_d);
+
+    AND2_t0: AND2
+        port map (A=>rden_i, B=>invout_0, Z=>r_nw);
+
+    INV_4: INV
+        port map (A=>wren_i, Z=>invout_0);
+
+    INV_3: INV
+        port map (A=>fcnt_en, Z=>fcnt_en_inv);
+
+    INV_2: INV
+        port map (A=>cnt_con, Z=>cnt_con_inv);
+
+    INV_1: INV
+        port map (A=>r_nw, Z=>r_nw_inv);
+
+    INV_0: INV
+        port map (A=>fcnt_en_inv, Z=>fcnt_en_inv_inv);
+
+    LUT4_1: ROM16X1A
+        generic map (initval=> X"4450")
+        port map (AD3=>ae, AD2=>ae_set_d, AD1=>ae_clr_d, AD0=>scuba_vlo, 
+            DO0=>ae_d);
+
+    LUT4_0: ROM16X1A
+        generic map (initval=> X"4450")
+        port map (AD3=>af, AD2=>af_set_d, AD1=>af_clr_d, AD0=>scuba_vlo, 
+            DO0=>af_d);
+
+    pdp_ram_0_0_0: PDPW16KC
+        generic map (CSDECODE_R=> "0b000", CSDECODE_W=> "0b001", GSR=> "DISABLED", 
+        REGMODE=> "NOREG", DATA_WIDTH_R=>  36, DATA_WIDTH_W=>  36)
+        port map (DI0=>Data(0), DI1=>Data(1), DI2=>Data(2), DI3=>Data(3), 
+            DI4=>Data(4), DI5=>Data(5), DI6=>Data(6), DI7=>Data(7), 
+            DI8=>Data(8), DI9=>Data(9), DI10=>Data(10), DI11=>Data(11), 
+            DI12=>Data(12), DI13=>Data(13), DI14=>Data(14), 
+            DI15=>Data(15), DI16=>Data(16), DI17=>Data(17), 
+            DI18=>Data(18), DI19=>Data(19), DI20=>Data(20), 
+            DI21=>Data(21), DI22=>Data(22), DI23=>Data(23), 
+            DI24=>Data(24), DI25=>Data(25), DI26=>Data(26), 
+            DI27=>Data(27), DI28=>Data(28), DI29=>Data(29), 
+            DI30=>Data(30), DI31=>Data(31), DI32=>Data(32), 
+            DI33=>Data(33), DI34=>Data(34), DI35=>Data(35), 
+            ADW0=>wcount_0, ADW1=>wcount_1, ADW2=>wcount_2, 
+            ADW3=>wcount_3, ADW4=>wcount_4, ADW5=>wcount_5, 
+            ADW6=>scuba_vlo, ADW7=>scuba_vlo, ADW8=>scuba_vlo, 
+            BE0=>scuba_vhi, BE1=>scuba_vhi, BE2=>scuba_vhi, 
+            BE3=>scuba_vhi, CEW=>wren_i, CLKW=>Clock, CSW0=>scuba_vhi, 
+            CSW1=>scuba_vlo, CSW2=>scuba_vlo, ADR0=>scuba_vlo, 
+            ADR1=>scuba_vlo, ADR2=>scuba_vlo, ADR3=>scuba_vlo, 
+            ADR4=>scuba_vlo, ADR5=>rcount_0, ADR6=>rcount_1, 
+            ADR7=>rcount_2, ADR8=>rcount_3, ADR9=>rcount_4, 
+            ADR10=>rcount_5, ADR11=>scuba_vlo, ADR12=>scuba_vlo, 
+            ADR13=>scuba_vlo, CER=>rden_i, CLKR=>Clock, CSR0=>scuba_vlo, 
+            CSR1=>scuba_vlo, CSR2=>scuba_vlo, RST=>Reset, DO0=>Q(18), 
+            DO1=>Q(19), DO2=>Q(20), DO3=>Q(21), DO4=>Q(22), DO5=>Q(23), 
+            DO6=>Q(24), DO7=>Q(25), DO8=>Q(26), DO9=>Q(27), DO10=>Q(28), 
+            DO11=>Q(29), DO12=>Q(30), DO13=>Q(31), DO14=>Q(32), 
+            DO15=>Q(33), DO16=>Q(34), DO17=>Q(35), DO18=>Q(0), 
+            DO19=>Q(1), DO20=>Q(2), DO21=>Q(3), DO22=>Q(4), DO23=>Q(5), 
+            DO24=>Q(6), DO25=>Q(7), DO26=>Q(8), DO27=>Q(9), DO28=>Q(10), 
+            DO29=>Q(11), DO30=>Q(12), DO31=>Q(13), DO32=>Q(14), 
+            DO33=>Q(15), DO34=>Q(16), DO35=>Q(17));
+
+    FF_24: FD1P3DX
+        port map (D=>ifcount_0, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_0);
+
+    FF_23: FD1P3DX
+        port map (D=>ifcount_1, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_1);
+
+    FF_22: FD1P3DX
+        port map (D=>ifcount_2, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_2);
+
+    FF_21: FD1P3DX
+        port map (D=>ifcount_3, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_3);
+
+    FF_20: FD1P3DX
+        port map (D=>ifcount_4, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_4);
+
+    FF_19: FD1P3DX
+        port map (D=>ifcount_5, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_5);
+
+    FF_18: FD1P3DX
+        port map (D=>ifcount_6, SP=>fcnt_en, CK=>Clock, CD=>Reset, 
+            Q=>fcount_6);
+
+    FF_17: FD1S3BX
+        port map (D=>empty_d, CK=>Clock, PD=>Reset, Q=>empty_i);
+
+    FF_16: FD1S3DX
+        port map (D=>full_d, CK=>Clock, CD=>Reset, Q=>full_i);
+
+    FF_15: FD1P3DX
+        port map (D=>iwcount_0, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_0);
+
+    FF_14: FD1P3DX
+        port map (D=>iwcount_1, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_1);
+
+    FF_13: FD1P3DX
+        port map (D=>iwcount_2, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_2);
+
+    FF_12: FD1P3DX
+        port map (D=>iwcount_3, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_3);
+
+    FF_11: FD1P3DX
+        port map (D=>iwcount_4, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_4);
+
+    FF_10: FD1P3DX
+        port map (D=>iwcount_5, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_5);
+
+    FF_9: FD1P3DX
+        port map (D=>iwcount_6, SP=>wren_i, CK=>Clock, CD=>Reset, 
+            Q=>wcount_6);
+
+    FF_8: FD1P3DX
+        port map (D=>ircount_0, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_0);
+
+    FF_7: FD1P3DX
+        port map (D=>ircount_1, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_1);
+
+    FF_6: FD1P3DX
+        port map (D=>ircount_2, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_2);
+
+    FF_5: FD1P3DX
+        port map (D=>ircount_3, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_3);
+
+    FF_4: FD1P3DX
+        port map (D=>ircount_4, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_4);
+
+    FF_3: FD1P3DX
+        port map (D=>ircount_5, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_5);
+
+    FF_2: FD1P3DX
+        port map (D=>ircount_6, SP=>rden_i, CK=>Clock, CD=>Reset, 
+            Q=>rcount_6);
+
+    FF_1: FD1S3BX
+        port map (D=>ae_d, CK=>Clock, PD=>Reset, Q=>ae);
+
+    FF_0: FD1S3DX
+        port map (D=>af_d, CK=>Clock, CD=>Reset, Q=>af);
+
+    bdcnt_bctr_cia: FADD2B
+        port map (A0=>scuba_vlo, A1=>cnt_con, B0=>scuba_vlo, B1=>cnt_con, 
+            CI=>scuba_vlo, COUT=>bdcnt_bctr_ci, S0=>open, S1=>open);
+
+    bdcnt_bctr_0: CB2
+        port map (CI=>bdcnt_bctr_ci, PC0=>fcount_0, PC1=>fcount_1, 
+            CON=>cnt_con, CO=>co0, NC0=>ifcount_0, NC1=>ifcount_1);
+
+    bdcnt_bctr_1: CB2
+        port map (CI=>co0, PC0=>fcount_2, PC1=>fcount_3, CON=>cnt_con, 
+            CO=>co1, NC0=>ifcount_2, NC1=>ifcount_3);
+
+    bdcnt_bctr_2: CB2
+        port map (CI=>co1, PC0=>fcount_4, PC1=>fcount_5, CON=>cnt_con, 
+            CO=>co2, NC0=>ifcount_4, NC1=>ifcount_5);
+
+    bdcnt_bctr_3: CB2
+        port map (CI=>co2, PC0=>fcount_6, PC1=>scuba_vlo, CON=>cnt_con, 
+            CO=>co3, NC0=>ifcount_6, NC1=>open);
+
+    e_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci, S0=>open, 
+            S1=>open);
+
+    e_cmp_0: ALEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>rden_i, B1=>scuba_vlo, 
+            CI=>cmp_ci, LE=>co0_1);
+
+    e_cmp_1: ALEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co0_1, LE=>co1_1);
+
+    e_cmp_2: ALEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co1_1, LE=>co2_1);
+
+    e_cmp_3: ALEB2
+        port map (A0=>fcount_6, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co2_1, LE=>cmp_le_1_c);
+
+    a0: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>cmp_le_1_c, COUT=>open, S0=>cmp_le_1, 
+            S1=>open);
+
+    g_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_1, S0=>open, 
+            S1=>open);
+
+    g_cmp_0: AGEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>wren_i, B1=>wren_i, 
+            CI=>cmp_ci_1, GE=>co0_2);
+
+    g_cmp_1: AGEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>wren_i, B1=>wren_i, 
+            CI=>co0_2, GE=>co1_2);
+
+    g_cmp_2: AGEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>wren_i, B1=>wren_i, 
+            CI=>co1_2, GE=>co2_2);
+
+    g_cmp_3: AGEB2
+        port map (A0=>fcount_6, A1=>scuba_vlo, B0=>wren_i_inv, 
+            B1=>scuba_vlo, CI=>co2_2, GE=>cmp_ge_d1_c);
+
+    a1: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>cmp_ge_d1_c, COUT=>open, S0=>cmp_ge_d1, 
+            S1=>open);
+
+    w_ctr_cia: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vhi, B0=>scuba_vlo, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>w_ctr_ci, S0=>open, 
+            S1=>open);
+
+    w_ctr_0: CU2
+        port map (CI=>w_ctr_ci, PC0=>wcount_0, PC1=>wcount_1, CO=>co0_3, 
+            NC0=>iwcount_0, NC1=>iwcount_1);
+
+    w_ctr_1: CU2
+        port map (CI=>co0_3, PC0=>wcount_2, PC1=>wcount_3, CO=>co1_3, 
+            NC0=>iwcount_2, NC1=>iwcount_3);
+
+    w_ctr_2: CU2
+        port map (CI=>co1_3, PC0=>wcount_4, PC1=>wcount_5, CO=>co2_3, 
+            NC0=>iwcount_4, NC1=>iwcount_5);
+
+    w_ctr_3: CU2
+        port map (CI=>co2_3, PC0=>wcount_6, PC1=>scuba_vlo, CO=>co3_1, 
+            NC0=>iwcount_6, NC1=>open);
+
+    r_ctr_cia: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vhi, B0=>scuba_vlo, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>r_ctr_ci, S0=>open, 
+            S1=>open);
+
+    r_ctr_0: CU2
+        port map (CI=>r_ctr_ci, PC0=>rcount_0, PC1=>rcount_1, CO=>co0_4, 
+            NC0=>ircount_0, NC1=>ircount_1);
+
+    r_ctr_1: CU2
+        port map (CI=>co0_4, PC0=>rcount_2, PC1=>rcount_3, CO=>co1_4, 
+            NC0=>ircount_2, NC1=>ircount_3);
+
+    r_ctr_2: CU2
+        port map (CI=>co1_4, PC0=>rcount_4, PC1=>rcount_5, CO=>co2_4, 
+            NC0=>ircount_4, NC1=>ircount_5);
+
+    r_ctr_3: CU2
+        port map (CI=>co2_4, PC0=>rcount_6, PC1=>scuba_vlo, CO=>co3_2, 
+            NC0=>ircount_6, NC1=>open);
+
+    ae_set_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_2, S0=>open, 
+            S1=>open);
+
+    ae_set_cmp_0: ALEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>fcnt_en_inv_inv, 
+            B1=>cnt_con_inv, CI=>cmp_ci_2, LE=>co0_5);
+
+    ae_set_cmp_1: ALEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co0_5, LE=>co1_5);
+
+    ae_set_cmp_2: ALEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co1_5, LE=>co2_5);
+
+    ae_set_cmp_3: ALEB2
+        port map (A0=>fcount_6, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co2_5, LE=>ae_set_d_c);
+
+    a2: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>ae_set_d_c, COUT=>open, S0=>ae_set_d, 
+            S1=>open);
+
+    ae_clr_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_3, S0=>open, 
+            S1=>open);
+
+    ae_clr_cmp_0: ALEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>fcnt_en_inv_inv, 
+            B1=>cnt_con, CI=>cmp_ci_3, LE=>co0_6);
+
+    ae_clr_cmp_1: ALEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>cnt_con_inv, 
+            B1=>scuba_vlo, CI=>co0_6, LE=>co1_6);
+
+    ae_clr_cmp_2: ALEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co1_6, LE=>co2_6);
+
+    ae_clr_cmp_3: ALEB2
+        port map (A0=>fcount_6, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co2_6, LE=>ae_clr_d_c);
+
+    a3: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>ae_clr_d_c, COUT=>open, S0=>ae_clr_d, 
+            S1=>open);
+
+    af_set_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_4, S0=>open, 
+            S1=>open);
+
+    af_set_cmp_0: AGEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>fcnt_en_inv_inv, 
+            B1=>cnt_con_inv, CI=>cmp_ci_4, GE=>co0_7);
+
+    af_set_cmp_1: AGEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>co0_7, GE=>co1_7);
+
+    af_set_cmp_2: AGEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>co1_7, GE=>co2_7);
+
+    af_set_cmp_3: AGEB2
+        port map (A0=>fcount_6, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co2_7, GE=>af_set_d_c);
+
+    a4: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>af_set_d_c, COUT=>open, S0=>af_set_d, 
+            S1=>open);
+
+    af_clr_cmp_ci_a: FADD2B
+        port map (A0=>scuba_vhi, A1=>scuba_vhi, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>scuba_vlo, COUT=>cmp_ci_5, S0=>open, 
+            S1=>open);
+
+    af_clr_cmp_0: AGEB2
+        port map (A0=>fcount_0, A1=>fcount_1, B0=>fcnt_en_inv_inv, 
+            B1=>cnt_con, CI=>cmp_ci_5, GE=>co0_8);
+
+    af_clr_cmp_1: AGEB2
+        port map (A0=>fcount_2, A1=>fcount_3, B0=>cnt_con_inv, 
+            B1=>scuba_vhi, CI=>co0_8, GE=>co1_8);
+
+    scuba_vhi_inst: VHI
+        port map (Z=>scuba_vhi);
+
+    af_clr_cmp_2: AGEB2
+        port map (A0=>fcount_4, A1=>fcount_5, B0=>scuba_vhi, 
+            B1=>scuba_vhi, CI=>co1_8, GE=>co2_8);
+
+    af_clr_cmp_3: AGEB2
+        port map (A0=>fcount_6, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>co2_8, GE=>af_clr_d_c);
+
+    scuba_vlo_inst: VLO
+        port map (Z=>scuba_vlo);
+
+    a5: FADD2B
+        port map (A0=>scuba_vlo, A1=>scuba_vlo, B0=>scuba_vlo, 
+            B1=>scuba_vlo, CI=>af_clr_d_c, COUT=>open, S0=>af_clr_d, 
+            S1=>open);
+
+    Empty <= empty_i;
+    Full <= full_i;
+    AlmostEmpty <= ae;
+    AlmostFull <= af;
+end Structure;
+
+-- synopsys translate_off
+library ecp3;
+configuration Structure_CON of FIFO_36x64 is
+    for Structure
+        for all:AGEB2 use entity ecp3.AGEB2(V); end for;
+        for all:ALEB2 use entity ecp3.ALEB2(V); end for;
+        for all:AND2 use entity ecp3.AND2(V); end for;
+        for all:CU2 use entity ecp3.CU2(V); end for;
+        for all:CB2 use entity ecp3.CB2(V); end for;
+        for all:FADD2B use entity ecp3.FADD2B(V); end for;
+        for all:FD1P3DX use entity ecp3.FD1P3DX(V); end for;
+        for all:FD1S3BX use entity ecp3.FD1S3BX(V); end for;
+        for all:FD1S3DX use entity ecp3.FD1S3DX(V); end for;
+        for all:INV use entity ecp3.INV(V); end for;
+        for all:ROM16X1A use entity ecp3.ROM16X1A(V); end for;
+        for all:VHI use entity ecp3.VHI(V); end for;
+        for all:VLO use entity ecp3.VLO(V); end for;
+        for all:XOR2 use entity ecp3.XOR2(V); end for;
+        for all:PDPW16KC use entity ecp3.PDPW16KC(V); end for;
+    end for;
+end Structure_CON;
+
+-- synopsys translate_on
diff --git a/combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.ipx b/combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.ipx
new file mode 100644 (file)
index 0000000..6365dbc
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<DiamondModule name="RAM_pseudo_DP_wReg_36x1k" module="RAM_DP" VendorName="Lattice Semiconductor Corporation" generator="IPexpress" date="2018 08 16 14:05:57.844" version="6.5" type="Module" synthesis="synplify" source_format="VHDL">
+  <Package>
+               <File name="" type="mem" modified="2018 08 16 14:05:57.000"/>
+               <File name="RAM_pseudo_DP_wReg_36x1k.lpc" type="lpc" modified="2018 08 16 14:05:53.000"/>
+               <File name="RAM_pseudo_DP_wReg_36x1k.vhd" type="top_level_vhdl" modified="2018 08 16 14:05:53.000"/>
+               <File name="RAM_pseudo_DP_wReg_36x1k_tmpl.vhd" type="template_vhdl" modified="2018 08 16 14:05:53.000"/>
+               <File name="tb_RAM_pseudo_DP_wReg_36x1k_tmpl.vhd" type="testbench_vhdl" modified="2018 08 16 14:05:53.000"/>
+  </Package>
+</DiamondModule>
diff --git a/combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.lpc b/combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.lpc
new file mode 100644 (file)
index 0000000..efafa53
--- /dev/null
@@ -0,0 +1,56 @@
+[Device]
+Family=latticeecp3
+PartType=LFE3-150EA
+PartName=LFE3-150EA-8FN1156C
+SpeedGrade=8
+Package=FPBGA1156
+OperatingCondition=COM
+Status=P
+
+[IP]
+VendorName=Lattice Semiconductor Corporation
+CoreType=LPM
+CoreStatus=Demo
+CoreName=RAM_DP
+CoreRevision=6.5
+ModuleName=RAM_pseudo_DP_wReg_36x1k
+SourceFormat=VHDL
+ParameterFileVersion=1.0
+Date=08/16/2018
+Time=14:05:53
+
+[Parameters]
+Verilog=0
+VHDL=1
+EDIF=1
+Destination=Synplicity
+Expression=BusA(0 to 7)
+Order=Big Endian [MSB:LSB]
+IO=0
+RAddress=1024
+RData=36
+WAddress=1024
+WData=36
+enByte=0
+ByteSize=9
+adPipeline=0
+inPipeline=0
+outPipeline=1
+MOR=0
+InData=Registered
+AdControl=Registered
+MemFile=
+MemFormat=bin
+Reset=Sync
+GSR=Enabled
+Pad=0
+EnECC=0
+Optimization=Speed
+EnSleep=ENABLED
+Pipeline=0
+
+[FilesGenerated]
+=mem
+
+[Command]
+cmd_line= -w -n RAM_pseudo_DP_wReg_36x1k -lang vhdl -synth synplify -bus_exp 7 -bb -arch ep5c00 -device LFE3-150EA -type ramdps -raddr_width 10 -rwidth 36 -waddr_width 10 -wwidth 36 -rnum_words 1024 -wnum_words 1024 -outdata REGISTERED -cascade -1
diff --git a/combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.vhd b/combiner_cts/core/RAM_pseudo_DP_wReg_36x1k.vhd
new file mode 100644 (file)
index 0000000..78c49a6
--- /dev/null
@@ -0,0 +1,218 @@
+-- VHDL netlist generated by SCUBA Diamond (64-bit) 3.9.1.119
+-- Module  Version: 6.5
+--/home/soft/lattice/diamond/3.9_x64/ispfpga/bin/lin64/scuba -w -n RAM_pseudo_DP_wReg_36x1k -lang vhdl -synth synplify -bus_exp 7 -bb -arch ep5c00 -type bram -wp 10 -rp 0011 -rdata_width 36 -data_width 36 -num_rows 1024 -outdata REGISTERED -cascade -1 
+
+-- Thu Aug 16 14:05:53 2018
+
+library IEEE;
+use IEEE.std_logic_1164.all;
+-- synopsys translate_off
+library ecp3;
+use ecp3.components.all;
+-- synopsys translate_on
+
+entity RAM_pseudo_DP_wReg_36x1k is
+    port (
+        WrAddress: in  std_logic_vector(9 downto 0); 
+        RdAddress: in  std_logic_vector(9 downto 0); 
+        Data: in  std_logic_vector(35 downto 0); 
+        WE: in  std_logic; 
+        RdClock: in  std_logic; 
+        RdClockEn: in  std_logic; 
+        Reset: in  std_logic; 
+        WrClock: in  std_logic; 
+        WrClockEn: in  std_logic; 
+        Q: out  std_logic_vector(35 downto 0));
+end RAM_pseudo_DP_wReg_36x1k;
+
+architecture Structure of RAM_pseudo_DP_wReg_36x1k is
+
+    -- internal signal declarations
+    signal scuba_vhi: std_logic;
+    signal scuba_vlo: std_logic;
+
+    -- local component declarations
+    component VHI
+        port (Z: out  std_logic);
+    end component;
+    component VLO
+        port (Z: out  std_logic);
+    end component;
+    component DP16KC
+        generic (GSR : in String; WRITEMODE_B : in String; 
+                WRITEMODE_A : in String; CSDECODE_B : in String; 
+                CSDECODE_A : in String; REGMODE_B : in String; 
+                REGMODE_A : in String; DATA_WIDTH_B : in Integer; 
+                DATA_WIDTH_A : in Integer);
+        port (DIA0: in  std_logic; DIA1: in  std_logic; 
+            DIA2: in  std_logic; DIA3: in  std_logic; 
+            DIA4: in  std_logic; DIA5: in  std_logic; 
+            DIA6: in  std_logic; DIA7: in  std_logic; 
+            DIA8: in  std_logic; DIA9: in  std_logic; 
+            DIA10: in  std_logic; DIA11: in  std_logic; 
+            DIA12: in  std_logic; DIA13: in  std_logic; 
+            DIA14: in  std_logic; DIA15: in  std_logic; 
+            DIA16: in  std_logic; DIA17: in  std_logic; 
+            ADA0: in  std_logic; ADA1: in  std_logic; 
+            ADA2: in  std_logic; ADA3: in  std_logic; 
+            ADA4: in  std_logic; ADA5: in  std_logic; 
+            ADA6: in  std_logic; ADA7: in  std_logic; 
+            ADA8: in  std_logic; ADA9: in  std_logic; 
+            ADA10: in  std_logic; ADA11: in  std_logic; 
+            ADA12: in  std_logic; ADA13: in  std_logic; 
+            CEA: in  std_logic; CLKA: in  std_logic; OCEA: in  std_logic; 
+            WEA: in  std_logic; CSA0: in  std_logic; CSA1: in  std_logic; 
+            CSA2: in  std_logic; RSTA: in  std_logic; 
+            DIB0: in  std_logic; DIB1: in  std_logic; 
+            DIB2: in  std_logic; DIB3: in  std_logic; 
+            DIB4: in  std_logic; DIB5: in  std_logic; 
+            DIB6: in  std_logic; DIB7: in  std_logic; 
+            DIB8: in  std_logic; DIB9: in  std_logic; 
+            DIB10: in  std_logic; DIB11: in  std_logic; 
+            DIB12: in  std_logic; DIB13: in  std_logic; 
+            DIB14: in  std_logic; DIB15: in  std_logic; 
+            DIB16: in  std_logic; DIB17: in  std_logic; 
+            ADB0: in  std_logic; ADB1: in  std_logic; 
+            ADB2: in  std_logic; ADB3: in  std_logic; 
+            ADB4: in  std_logic; ADB5: in  std_logic; 
+            ADB6: in  std_logic; ADB7: in  std_logic; 
+            ADB8: in  std_logic; ADB9: in  std_logic; 
+            ADB10: in  std_logic; ADB11: in  std_logic; 
+            ADB12: in  std_logic; ADB13: in  std_logic; 
+            CEB: in  std_logic; CLKB: in  std_logic; OCEB: in  std_logic; 
+            WEB: in  std_logic; CSB0: in  std_logic; CSB1: in  std_logic; 
+            CSB2: in  std_logic; RSTB: in  std_logic; 
+            DOA0: out  std_logic; DOA1: out  std_logic; 
+            DOA2: out  std_logic; DOA3: out  std_logic; 
+            DOA4: out  std_logic; DOA5: out  std_logic; 
+            DOA6: out  std_logic; DOA7: out  std_logic; 
+            DOA8: out  std_logic; DOA9: out  std_logic; 
+            DOA10: out  std_logic; DOA11: out  std_logic; 
+            DOA12: out  std_logic; DOA13: out  std_logic; 
+            DOA14: out  std_logic; DOA15: out  std_logic; 
+            DOA16: out  std_logic; DOA17: out  std_logic; 
+            DOB0: out  std_logic; DOB1: out  std_logic; 
+            DOB2: out  std_logic; DOB3: out  std_logic; 
+            DOB4: out  std_logic; DOB5: out  std_logic; 
+            DOB6: out  std_logic; DOB7: out  std_logic; 
+            DOB8: out  std_logic; DOB9: out  std_logic; 
+            DOB10: out  std_logic; DOB11: out  std_logic; 
+            DOB12: out  std_logic; DOB13: out  std_logic; 
+            DOB14: out  std_logic; DOB15: out  std_logic; 
+            DOB16: out  std_logic; DOB17: out  std_logic);
+    end component;
+    attribute MEM_LPC_FILE : string; 
+    attribute MEM_INIT_FILE : string; 
+    attribute RESETMODE : string; 
+    attribute MEM_LPC_FILE of RAM_pseudo_DP_wReg_36x1k_0_0_1 : label is "RAM_pseudo_DP_wReg_36x1k.lpc";
+    attribute MEM_INIT_FILE of RAM_pseudo_DP_wReg_36x1k_0_0_1 : label is "";
+    attribute RESETMODE of RAM_pseudo_DP_wReg_36x1k_0_0_1 : label is "SYNC";
+    attribute MEM_LPC_FILE of RAM_pseudo_DP_wReg_36x1k_0_1_0 : label is "RAM_pseudo_DP_wReg_36x1k.lpc";
+    attribute MEM_INIT_FILE of RAM_pseudo_DP_wReg_36x1k_0_1_0 : label is "";
+    attribute RESETMODE of RAM_pseudo_DP_wReg_36x1k_0_1_0 : label is "SYNC";
+    attribute NGD_DRC_MASK : integer;
+    attribute NGD_DRC_MASK of Structure : architecture is 1;
+
+begin
+    -- component instantiation statements
+    RAM_pseudo_DP_wReg_36x1k_0_0_1: DP16KC
+        generic map (CSDECODE_B=> "0b000", CSDECODE_A=> "0b000", 
+        WRITEMODE_B=> "NORMAL", WRITEMODE_A=> "NORMAL", GSR=> "DISABLED", 
+        REGMODE_B=> "OUTREG", REGMODE_A=> "OUTREG", DATA_WIDTH_B=>  18, 
+        DATA_WIDTH_A=>  18)
+        port map (DIA0=>Data(0), DIA1=>Data(1), DIA2=>Data(2), 
+            DIA3=>Data(3), DIA4=>Data(4), DIA5=>Data(5), DIA6=>Data(6), 
+            DIA7=>Data(7), DIA8=>Data(8), DIA9=>Data(9), DIA10=>Data(10), 
+            DIA11=>Data(11), DIA12=>Data(12), DIA13=>Data(13), 
+            DIA14=>Data(14), DIA15=>Data(15), DIA16=>Data(16), 
+            DIA17=>Data(17), ADA0=>scuba_vhi, ADA1=>scuba_vhi, 
+            ADA2=>scuba_vlo, ADA3=>scuba_vlo, ADA4=>WrAddress(0), 
+            ADA5=>WrAddress(1), ADA6=>WrAddress(2), ADA7=>WrAddress(3), 
+            ADA8=>WrAddress(4), ADA9=>WrAddress(5), ADA10=>WrAddress(6), 
+            ADA11=>WrAddress(7), ADA12=>WrAddress(8), 
+            ADA13=>WrAddress(9), CEA=>WrClockEn, CLKA=>WrClock, 
+            OCEA=>WrClockEn, WEA=>WE, CSA0=>scuba_vlo, CSA1=>scuba_vlo, 
+            CSA2=>scuba_vlo, RSTA=>Reset, DIB0=>scuba_vlo, 
+            DIB1=>scuba_vlo, DIB2=>scuba_vlo, DIB3=>scuba_vlo, 
+            DIB4=>scuba_vlo, DIB5=>scuba_vlo, DIB6=>scuba_vlo, 
+            DIB7=>scuba_vlo, DIB8=>scuba_vlo, DIB9=>scuba_vlo, 
+            DIB10=>scuba_vlo, DIB11=>scuba_vlo, DIB12=>scuba_vlo, 
+            DIB13=>scuba_vlo, DIB14=>scuba_vlo, DIB15=>scuba_vlo, 
+            DIB16=>scuba_vlo, DIB17=>scuba_vlo, ADB0=>scuba_vlo, 
+            ADB1=>scuba_vlo, ADB2=>scuba_vlo, ADB3=>scuba_vlo, 
+            ADB4=>RdAddress(0), ADB5=>RdAddress(1), ADB6=>RdAddress(2), 
+            ADB7=>RdAddress(3), ADB8=>RdAddress(4), ADB9=>RdAddress(5), 
+            ADB10=>RdAddress(6), ADB11=>RdAddress(7), 
+            ADB12=>RdAddress(8), ADB13=>RdAddress(9), CEB=>RdClockEn, 
+            CLKB=>RdClock, OCEB=>RdClockEn, WEB=>scuba_vlo, 
+            CSB0=>scuba_vlo, CSB1=>scuba_vlo, CSB2=>scuba_vlo, 
+            RSTB=>Reset, DOA0=>open, DOA1=>open, DOA2=>open, DOA3=>open, 
+            DOA4=>open, DOA5=>open, DOA6=>open, DOA7=>open, DOA8=>open, 
+            DOA9=>open, DOA10=>open, DOA11=>open, DOA12=>open, 
+            DOA13=>open, DOA14=>open, DOA15=>open, DOA16=>open, 
+            DOA17=>open, DOB0=>Q(0), DOB1=>Q(1), DOB2=>Q(2), DOB3=>Q(3), 
+            DOB4=>Q(4), DOB5=>Q(5), DOB6=>Q(6), DOB7=>Q(7), DOB8=>Q(8), 
+            DOB9=>Q(9), DOB10=>Q(10), DOB11=>Q(11), DOB12=>Q(12), 
+            DOB13=>Q(13), DOB14=>Q(14), DOB15=>Q(15), DOB16=>Q(16), 
+            DOB17=>Q(17));
+
+    scuba_vhi_inst: VHI
+        port map (Z=>scuba_vhi);
+
+    scuba_vlo_inst: VLO
+        port map (Z=>scuba_vlo);
+
+    RAM_pseudo_DP_wReg_36x1k_0_1_0: DP16KC
+        generic map (CSDECODE_B=> "0b000", CSDECODE_A=> "0b000", 
+        WRITEMODE_B=> "NORMAL", WRITEMODE_A=> "NORMAL", GSR=> "DISABLED", 
+        REGMODE_B=> "OUTREG", REGMODE_A=> "OUTREG", DATA_WIDTH_B=>  18, 
+        DATA_WIDTH_A=>  18)
+        port map (DIA0=>Data(18), DIA1=>Data(19), DIA2=>Data(20), 
+            DIA3=>Data(21), DIA4=>Data(22), DIA5=>Data(23), 
+            DIA6=>Data(24), DIA7=>Data(25), DIA8=>Data(26), 
+            DIA9=>Data(27), DIA10=>Data(28), DIA11=>Data(29), 
+            DIA12=>Data(30), DIA13=>Data(31), DIA14=>Data(32), 
+            DIA15=>Data(33), DIA16=>Data(34), DIA17=>Data(35), 
+            ADA0=>scuba_vhi, ADA1=>scuba_vhi, ADA2=>scuba_vlo, 
+            ADA3=>scuba_vlo, ADA4=>WrAddress(0), ADA5=>WrAddress(1), 
+            ADA6=>WrAddress(2), ADA7=>WrAddress(3), ADA8=>WrAddress(4), 
+            ADA9=>WrAddress(5), ADA10=>WrAddress(6), ADA11=>WrAddress(7), 
+            ADA12=>WrAddress(8), ADA13=>WrAddress(9), CEA=>WrClockEn, 
+            CLKA=>WrClock, OCEA=>WrClockEn, WEA=>WE, CSA0=>scuba_vlo, 
+            CSA1=>scuba_vlo, CSA2=>scuba_vlo, RSTA=>Reset, 
+            DIB0=>scuba_vlo, DIB1=>scuba_vlo, DIB2=>scuba_vlo, 
+            DIB3=>scuba_vlo, DIB4=>scuba_vlo, DIB5=>scuba_vlo, 
+            DIB6=>scuba_vlo, DIB7=>scuba_vlo, DIB8=>scuba_vlo, 
+            DIB9=>scuba_vlo, DIB10=>scuba_vlo, DIB11=>scuba_vlo, 
+            DIB12=>scuba_vlo, DIB13=>scuba_vlo, DIB14=>scuba_vlo, 
+            DIB15=>scuba_vlo, DIB16=>scuba_vlo, DIB17=>scuba_vlo, 
+            ADB0=>scuba_vlo, ADB1=>scuba_vlo, ADB2=>scuba_vlo, 
+            ADB3=>scuba_vlo, ADB4=>RdAddress(0), ADB5=>RdAddress(1), 
+            ADB6=>RdAddress(2), ADB7=>RdAddress(3), ADB8=>RdAddress(4), 
+            ADB9=>RdAddress(5), ADB10=>RdAddress(6), ADB11=>RdAddress(7), 
+            ADB12=>RdAddress(8), ADB13=>RdAddress(9), CEB=>RdClockEn, 
+            CLKB=>RdClock, OCEB=>RdClockEn, WEB=>scuba_vlo, 
+            CSB0=>scuba_vlo, CSB1=>scuba_vlo, CSB2=>scuba_vlo, 
+            RSTB=>Reset, DOA0=>open, DOA1=>open, DOA2=>open, DOA3=>open, 
+            DOA4=>open, DOA5=>open, DOA6=>open, DOA7=>open, DOA8=>open, 
+            DOA9=>open, DOA10=>open, DOA11=>open, DOA12=>open, 
+            DOA13=>open, DOA14=>open, DOA15=>open, DOA16=>open, 
+            DOA17=>open, DOB0=>Q(18), DOB1=>Q(19), DOB2=>Q(20), 
+            DOB3=>Q(21), DOB4=>Q(22), DOB5=>Q(23), DOB6=>Q(24), 
+            DOB7=>Q(25), DOB8=>Q(26), DOB9=>Q(27), DOB10=>Q(28), 
+            DOB11=>Q(29), DOB12=>Q(30), DOB13=>Q(31), DOB14=>Q(32), 
+            DOB15=>Q(33), DOB16=>Q(34), DOB17=>Q(35));
+
+end Structure;
+
+-- synopsys translate_off
+library ecp3;
+configuration Structure_CON of RAM_pseudo_DP_wReg_36x1k is
+    for Structure
+        for all:VHI use entity ecp3.VHI(V); end for;
+        for all:VLO use entity ecp3.VLO(V); end for;
+        for all:DP16KC use entity ecp3.DP16KC(V); end for;
+    end for;
+end Structure_CON;
+
+-- synopsys translate_on
diff --git a/combiner_cts/par.p2t b/combiner_cts/par.p2t
new file mode 100644 (file)
index 0000000..c251db6
--- /dev/null
@@ -0,0 +1,21 @@
+-w
+-i 15
+-l 5
+-n 1
+-y
+-s 12
+-t 42
+-c 1
+-e 2
+#-g guidefile.ncd
+#-m nodelist.txt
+# -w
+# -i 6
+# -l 5
+# -n 1
+# -t 1
+# -s 1
+# -c 0
+# -e 0
+#
+-exp parCDP=1:parCDR=1:parPlcInLimit=0:parPlcInNeighborSize=1:parPathBased=ON:parHold=ON:parHoldLimit=10000:paruseNBR=1
diff --git a/combiner_cts/synplify.fdc b/combiner_cts/synplify.fdc
new file mode 100644 (file)
index 0000000..facf858
--- /dev/null
@@ -0,0 +1,50 @@
+###==== BEGIN Header
+
+# Synopsys, Inc. constraint file
+# /d/jspc22/trb/git/trb3sc/template/synplify.fdc
+# Written on Thu Jun 18 11:51:05 2015
+# by Synplify Pro, I-2014.03L-SP1  FDC Constraint Editor
+
+# Custom constraint commands may be added outside of the SCOPE tab sections bounded with BEGIN/END.
+# These sections are generated from SCOPE spreadsheet tabs.
+
+###==== END Header
+
+###==== BEGIN Collections - (Populated from tab in SCOPE, do not edit)
+###==== END Collections
+
+###==== BEGIN Clocks - (Populated from tab in SCOPE, do not edit)
+create_clock  -name {clk240} {p:CLOCK_PCLK} -period {5}
+create_clock  -name {clkfull} {n:THE_CLOCK_RESET.THE_INT_PLL.CLKOS} -period {5}
+create_clock  -name {clksys} {n:THE_CLOCK_RESET.THE_INT_PLL.CLKOP} -period {10}
+create_clock  -name {clkrxfull} {n:THE_MEDIA_INTERFACE.gen_pcs0\.THE_SERDES.rx_full_clk_ch0} -period {5}
+
+###==== END Clocks
+
+###==== BEGIN "Generated Clocks" - (Populated from tab in SCOPE, do not edit)
+###==== END "Generated Clocks"
+
+###==== BEGIN Inputs/Outputs - (Populated from tab in SCOPE, do not edit)
+###==== END Inputs/Outputs
+
+
+###==== BEGIN "Delay Paths" - (Populated from tab in SCOPE, do not edit)
+###==== END "Delay Paths"
+
+###==== BEGIN Attributes - (Populated from tab in SCOPE, do not edit)
+###==== END Attributes
+
+###==== BEGIN "I/O Standards" - (Populated from tab in SCOPE, do not edit)
+###==== END "I/O Standards"
+
+###==== BEGIN "Compile Points" - (Populated from tab in SCOPE, do not edit)
+###==== END "Compile Points"
+
+
+
+
+
+
+
+
+