]> jspc29.x-matter.uni-frankfurt.de Git - mdcoep.git/commitdiff
*** empty log message ***
authorhadeshyp <hadeshyp>
Wed, 13 Apr 2011 10:02:11 +0000 (10:02 +0000)
committerhadeshyp <hadeshyp>
Wed, 13 Apr 2011 10:02:11 +0000 (10:02 +0000)
compile_frankfurt.pl
design2/trigger_handler.vhd

index 75be7a713ac47dda38019568dd640b7f73353981..47d0638e85766a96aa80cf01f83e9e83048bedd5 100755 (executable)
@@ -16,6 +16,7 @@ use strict;
 my $lattice_path = '/d/sugar/lattice/diamond/1.1';
 #my $synplify_path = '/d/sugar/lattice/synplify/syn96L3/synplify_linux/';
 my $synplify_path = '/d/sugar/lattice/synplify/D-2010.03/';
+#my $synplify_path = '/d/sugar/lattice/synplify/fpga_e201009sp2/';
 
 use FileHandle;
 
index 8f15ebc1e70bf3b3fac86e52a00b528891be8b01..55a49cb6fc3741162914fa2e4f9c5bd291fe8fd5 100644 (file)
@@ -96,6 +96,7 @@ architecture trigger_handle_trg_arch of trigger_handler is
   signal time_waiting            : unsigned(31 downto 0);
 
   signal force_reinit            : std_logic;
+  signal doing_calib             : std_logic;
 
 begin
 
@@ -212,8 +213,14 @@ begin
 
             when WAIT_FOR_FINISHED_STORING =>
               if storing_data_is_finished = '1' then
-                current_state             <= RELEASE_LVL1;
-                lvl1_release_i            <= '1';
+                if doing_calib = '0' then
+                  current_state           <= RELEASE_LVL1;
+                  lvl1_release_i          <= '1';
+                else
+                  current_state           <= TIMING_TRIGGER;
+                  timer_clear             <= '1';
+                  start_trigger_i         <= '1';
+                end if;
               end if;
 
             when RELEASE_LVL1 =>
@@ -268,6 +275,16 @@ begin
       end if;
     end process;
 
+  proc_doing_calib : process(CLK)
+    begin
+      if rising_edge(CLK) then
+        if start_calib_i = '1' then
+          doing_calib <= '1';
+        elsif storing_data_is_finished = '1' then
+          doing_calib <= '0';
+        end if;
+      end if;
+    end process;
 
 -------------------------------------------------------------------------------
 -- I/O