]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
synchronisation and clock signals.
authorTobias Weber <toweber86@gmail.com>
Fri, 22 Dec 2017 10:01:51 +0000 (11:01 +0100)
committerTobias Weber <toweber86@gmail.com>
Fri, 22 Dec 2017 10:01:51 +0000 (11:01 +0100)
base/trb3_periph_mupix8.lpf
mupix/Mupix8/trb3_periph.vhd
mupix/Mupix8/trb3_periph_constraints.lpf

index 0a223abab19ca0814b2e31ab3f62c021386da51d..b152f7cc1545eaf963cb5b9bbc8fa67cfec3c847 100644 (file)
@@ -2,17 +2,6 @@ BLOCK RESETPATHS ;
 BLOCK ASYNCPATHS ;
 BLOCK RD_DURING_WR_PATHS ;
 
-#################################################################
-# Basic Settings
-#################################################################
-
-  #SYSCONFIG MCCLK_FREQ = 2.5;
-
-  #FREQUENCY PORT CLK_PCLK_RIGHT 200 MHz;
-  #FREQUENCY PORT CLK_PCLK_LEFT  200 MHz;
-  #FREQUENCY PORT CLK_GPLL_RIGHT 200 MHz;
-  #FREQUENCY PORT CLK_GPLL_LEFT  125 MHz;
-
 #################################################################
 # Clock I/O
 #################################################################
@@ -38,8 +27,6 @@ LOCATE COMP  "TRIGGER_LEFT"   SITE "V3";
 IOBUF  PORT  "TRIGGER_LEFT"  IO_TYPE=LVDS25 ;
 
 
-
-
 #################################################################
 # To central FPGA
 #################################################################
@@ -164,7 +151,12 @@ IOBUF PORT "spi_dout_dac" IO_TYPE=LVDS25 DIFFRESISTOR=100;
 LOCATE COMP "spi_dac4_dout" SITE "G26";
 IOBUF PORT "spi_dac4_dout" IO_TYPE=LVDS25 DIFFRESISTOR=100;
 
-
+LOCATE COMP "syncres" SITE "D1";
+IOBUF PORT "syncres" IO_TYPE=LVDS25;
+LOCATE COMP "clkref" SITE "T7";
+IOBUF PORT "clkref" IO_TYPE=LVDS25;
+LOCATE COMP "clkext" SITE "H6";
+IOBUF PORT "clkext" IO_TYPE=LVDS25;
 
 ###########################################################
 ##Relax some timing constraints
index b01a1e84e735ab6bffcd67d2b7939653a91f0769..ac9eb2b1ec246457ae261a824d458ee711ef7a5e 100644 (file)
@@ -52,16 +52,20 @@ entity trb3_periph is
     ctrl_clk2           :  out std_logic; --slow control clk2
     ctrl_ld             :  out std_logic; --slow control load latched data
     ctrl_dout           :  in  std_logic; --serial data from mupix
-    ctrl_rb             :  out std_logic; --slow control readback??
+    ctrl_rb             :  out std_logic; --slow control readback
     spi_dout_adc        :  in  std_logic; --adc serial data from board
     spi_dout_dac        :  in  std_logic; --dac serial data from board
     spi_ld_thres        :  out std_logic; --serial data load
     spi_clk             :  out std_logic; --serial clock
     spi_din             :  out std_logic; --serial data out
-    spi_ld_tmp_dac      :  out std_logic; --load temperature dac ??
-    spi_ld_adc          :  out std_logic; --load adc ??
-    spi_dac4_dout       :  in  std_logic; --serial data in from dac 4??
-    hitbus              :  in  std_logic;
+    spi_ld_tmp_dac      :  out std_logic; --load temperature dac 
+    spi_ld_adc          :  out std_logic; --load adc 
+    spi_dac4_dout       :  in  std_logic; --serial data in from dac 4
+    hitbus              :  in  std_logic; --hitbus
+    -- fast signals
+    clkext              :  out std_logic;
+    clkref              :  out std_logic;
+    syncres             :  out std_logic; --reset of mupix timestamps and counters
     --fast data comes in via serdes addon (see above)
     
     ---------------------------------------------------------------------------
@@ -338,7 +342,9 @@ architecture trb3_periph_arch of trb3_periph is
   signal resethandler_regio_ack_out_0          : std_logic;
   signal resethandler_regio_no_more_data_out_0 : std_logic;
   signal resethandler_regio_unknown_addr_out_0 : std_logic;
-
+  
+  --dummy
+  signal dummy_counter : integer range 0 to 7 := 0;
   
 begin
 
@@ -774,5 +780,25 @@ begin
       SLV_ACK_OUT           => resethandler_regio_ack_out_0,
       SLV_NO_MORE_DATA_OUT  => resethandler_regio_no_more_data_out_0,
       SLV_UNKNOWN_ADDR_OUT  => resethandler_regio_unknown_addr_out_0);
+      
+ clkext <= clk_100_i;
+ clkref <= clk_100_i;
+ --dummy process to test syncres
+ dummy_proc : process(clk_100_i)
+ begin
+    if rising_edge(clk_100_i) then
+        if reset_i = '0' then
+            dummy_counter <= 0;
+        else
+            syncres <= '0';
+            dummy_counter <= dummy_counter + 1;
+            if dummy_counter = 7 then
+                syncres <= '1';
+                dummy_counter <= 0;
+            end if;
+        end if;
+    end if;
+ end process dummy_proc;
 
 end architecture;
index db33e6d15b07e1f92097b28e43711f13e01171f6..8d560a864d171b5cb979bbdce9e24af5a49c0274 100644 (file)
@@ -13,8 +13,6 @@
   FREQUENCY PORT CLK_GPLL_RIGHT 200 MHz;
   #FREQUENCY PORT CLK_GPLL_LEFT  125 MHz;
 
-  
-  
 #################################################################
 # Reset Nets
 #################################################################