]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
CTS: Pinout constraints for flexible I/O are now selected based on configuration.
authorJan Michel <j.michel@gsi.de>
Mon, 12 Sep 2016 08:27:08 +0000 (10:27 +0200)
committerJan Michel <j.michel@gsi.de>
Mon, 12 Sep 2016 08:27:08 +0000 (10:27 +0200)
base/trb3_central_cts.lpf
cts/compile_constraints.pl
cts/config_default.vhd
cts/config_mvd.vhd
cts/ports_mbs_master.lpf [new file with mode: 0644]
cts/ports_no_mbs_master.lpf [new file with mode: 0644]
cts/trb3_central.vhd
cts/trb3_central_constraints_3.lpf

index d27ce22101e10a3a71278601d8a3cefba26b66bf..7434518c5fc90f27906c9bf52d1c5f3cdab90031 100644 (file)
@@ -21,8 +21,8 @@ BLOCK RD_DURING_WR_PATHS ;
 #################################################################
 
 #Additional signals from Clock-RJ-45
-LOCATE COMP  "CLK_EXT_3"   SITE "U9";  #was SPARE_LINE_2
-LOCATE COMP  "CLK_EXT_4"   SITE "Y34"; #was SPARE_LINE_4
+LOCATE COMP  "CLK_EXT_3"   SITE "U9";  #was SPARE_LINE_2
+LOCATE COMP  "CLK_EXT_4"   SITE "Y34"; #was SPARE_LINE_4
 LOCATE COMP  "CLK_SERDES_INT_RIGHT" SITE "AH22"; 
 LOCATE COMP  "CLK_SERDES_INT_LEFT"  SITE "AH12";
 LOCATE COMP  "CLK_GPLL_RIGHT"       SITE "Y28";
@@ -60,13 +60,13 @@ LOCATE COMP  "TRIGGER_EXT_3"   SITE "W4"; #was EXT_TRIG_2
 #LOCATE COMP  "TRIGGER_EXT_4"   SITE "W8"; #was EXT_TRIG_4
 DEFINE PORT GROUP "TRIGGER_EXT_group" "TRIGGER_EXT*" ;
 IOBUF GROUP  "TRIGGER_EXT_group" IO_TYPE=LVDS25;
-
-LOCATE COMP  "CLK_TEST_OUT_1"   SITE "Y34";
-IOBUF  PORT  "CLK_TEST_OUT_1"  IO_TYPE=LVDS25 ; 
-LOCATE COMP  "CLK_TEST_OUT_2"   SITE "W4";
-IOBUF  PORT  "CLK_TEST_OUT_2"  IO_TYPE=LVDS25 ; 
-LOCATE COMP  "CLK_TEST_OUT_0"   SITE "U9";
-IOBUF  PORT  "CLK_TEST_OUT_0"  IO_TYPE=LVDS25 ; 
+# 
+LOCATE COMP  "CLK_TEST_OUT_1"   SITE "Y34";
+IOBUF  PORT  "CLK_TEST_OUT_1"  IO_TYPE=LVDS25 ; 
+LOCATE COMP  "CLK_TEST_OUT_2"   SITE "W4";
+IOBUF  PORT  "CLK_TEST_OUT_2"  IO_TYPE=LVDS25 ; 
+LOCATE COMP  "CLK_TEST_OUT_0"   SITE "U9";
+IOBUF  PORT  "CLK_TEST_OUT_0"  IO_TYPE=LVDS25 ; 
 
 
 LOCATE COMP  "CLKRJ_0"   SITE "U9"; 
index 5ee432c3c3d86d6c0a242e7a2e3a9347c17c05ad..5dfc75bbbae903f6e999eb069f5b28af6feb685c 100755 (executable)
@@ -39,8 +39,8 @@ die("workdir must not contain ..") if $workdir =~ m/\.\./;
 $workdir =~ s/(\.\/|\/$)//g; # remove ./ and trailing slash
 $workdir =~ s/\/{2,}/\//g; # remove multiple // in path
 
-my $back = "../" x ($workdir =~ tr/\///);
-$back = './' unless $back;
+my $back = '../' x ($workdir =~ tr@\/@@);
+$back = "./" unless $back;
 
 chdir($script_dir);
 
@@ -62,6 +62,10 @@ system("cat tdc_release/tdc_constraints_4.lpf >> $workdir/$TOPNAME.lpf") if $con
 system("cat cbmnet_bridge/cbmnet_bridge.lpf >> $workdir/$TOPNAME.lpf") if $configSettings{'INCLUDE_CBMNET'};
 system("cat ".$TOPNAME."_constraints.lpf >> $workdir/$TOPNAME.lpf");
 
+system("cat ports_mbs_master.lpf >> $workdir/$TOPNAME.lpf") if $configSettings{'INCLUDE_MBS_MASTER'};
+system("cat ports_no_mbs_master.lpf >> $workdir/$TOPNAME.lpf") unless $configSettings{'INCLUDE_MBS_MASTER'};
+
+
 open FILE, "<$workdir/$TOPNAME.lpf" or die "Couldnt open file: $!";
 my $lpf = join('', <FILE>); 
 close FILE;
index 11a3000179b43b0b346e7586a3149776d64dc1e8..bf222d0c28d83c596fcef7324c884b3f7b3ed059 100644 (file)
@@ -10,7 +10,7 @@ package config is
 
    constant INCLUDE_CTS : integer range c_NO to c_YES := c_YES;
    constant INCLUDE_CBMNET : integer range c_NO to c_YES := c_NO;
-   constant INCLUDE_MBS_MASTER : integer range c_NO to c_YES := c_NO;
+   constant INCLUDE_MBS_MASTER : integer range c_NO to c_YES := c_NO; 
 
 --include TDC for all four trigger input lines
 
@@ -37,7 +37,7 @@ package config is
     constant USE_EXTERNAL_CLOCK : integer range c_NO to c_YES := c_YES;    
        
 --Which external trigger module (ETM) to use?
-    constant INCLUDE_ETM : integer range c_NO to c_YES := c_NO;
+    constant INCLUDE_ETM : integer range c_NO to c_YES := c_YES;
     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;
     
index 10fd98958d624e0988cb0bd9311053f12f27c33f..38a8e4f750c22abe2dca984eaa8805ef5e45aeda 100644 (file)
@@ -10,7 +10,7 @@ package config is
 
    constant INCLUDE_CTS : integer range c_NO to c_YES := c_YES;
    constant INCLUDE_CBMNET : integer range c_NO to c_YES := c_NO;
-   constant INCLUDE_MBS_MASTER : integer range c_NO to c_YES := c_YES;
+   constant INCLUDE_MBS_MASTER : integer range c_NO to c_YES := c_NO;
    
 --include TDC for all four trigger input lines
 
diff --git a/cts/ports_mbs_master.lpf b/cts/ports_mbs_master.lpf
new file mode 100644 (file)
index 0000000..07f2718
--- /dev/null
@@ -0,0 +1,4 @@
+LOCATE COMP  "CLK_TEST_OUT_1"   SITE "Y34";
+IOBUF  PORT  "CLK_TEST_OUT_1"  IO_TYPE=LVDS25 ; 
+LOCATE COMP  "CLK_TEST_OUT_0"   SITE "U9";
+IOBUF  PORT  "CLK_TEST_OUT_0"  IO_TYPE=LVDS25 ; 
\ No newline at end of file
diff --git a/cts/ports_no_mbs_master.lpf b/cts/ports_no_mbs_master.lpf
new file mode 100644 (file)
index 0000000..30cd204
--- /dev/null
@@ -0,0 +1,5 @@
+LOCATE COMP  "CLK_EXT_3"   SITE "U9";  #was SPARE_LINE_2
+LOCATE COMP  "CLK_EXT_4"   SITE "Y34"; #was SPARE_LINE_4
+
+IOBUF PORT  "CLK_EXT_3" IO_TYPE=LVDS25;
+IOBUF PORT  "CLK_EXT_4" IO_TYPE=LVDS25;
\ No newline at end of file
index e165ee7f21295e47e41dba572171b8bb9ea2e3b2..45d6a6c6acc443c62acb3aa5bcbfbc34ba0ac83b 100644 (file)
@@ -50,7 +50,7 @@ entity trb3_central is
     TRIGGER_LEFT  : in  std_logic;      --left side trigger input from fan-out
     TRIGGER_RIGHT : in  std_logic;      --right side trigger input from fan-out
     TRIGGER_EXT_2 : in  std_logic;
-    TRIGGER_EXT_3 : inout std_logic;
+    TRIGGER_EXT_3 : inout std_logic;  --trigger input of busy output
 --     TRIGGER_EXT   : inout  std_logic_vector(4 downto 2);  --additional trigger from RJ45
     TRIGGER_OUT   : out std_logic;      --trigger to second input of fan-out
     TRIGGER_OUT2  : out std_logic;
@@ -600,7 +600,9 @@ architecture trb3_central_arch of trb3_central is
 begin
   assert not(USE_4_SFP = c_YES and INCLUDE_CBMNET = c_YES) report "CBMNET uses SFPs 1-4 and hence does not support USE_4_SFP" severity failure;
   assert not(INCLUDE_CBMNET = c_YES and INCLUDE_CTS = c_NO) report "CBMNET is supported only with CTS included" severity failure;
-  assert not(INCLUDE_TDC = c_YES and INCLUDE_MBS_MASTER = c_NO) report "TDC and MBS Master can not be implemented" severity failure;
+  assert not(INCLUDE_TDC = c_YES and INCLUDE_MBS_MASTER = c_YES) report "TDC and MBS Master can not be implemented" severity failure;
+  assert not(INCLUDE_ETM = c_YES and ETM_CHOICE = ETM_CHOICE_MBS_VULOM and INCLUDE_MBS_MASTER = c_YES) report "This ETM and MBS Master can not be implemented" severity failure;
+  assert not(INCLUDE_ETM = c_YES and ETM_CHOICE = ETM_CHOICE_MAINZ_A2 and INCLUDE_MBS_MASTER = c_YES) report "This ETM and MBS Master can not be implemented" severity failure;
 
 -- MBS Module
   gen_mbs_vulom_as_etm : if ETM_CHOICE = ETM_CHOICE_MBS_VULOM and INCLUDE_CTS = c_YES and INCLUDE_ETM = c_YES generate
@@ -1898,10 +1900,10 @@ end generate;
       
         TRIGGER_IN        => cts_rdo_trg_data_valid,
         TRIGGER_NUMBER_IN => cts_rdo_trg_number,
-        DATA_OUT          => cts_rdo_additional(1).data,   
-        WRITE_OUT         => cts_rdo_additional(1).data_write,   
-        FINISHED_OUT      => cts_rdo_additional(1).data_finished,   
-        STATUSBIT_OUT     => cts_rdo_additional(1).statusbits 
+        DATA_OUT          => cts_rdo_additional(INCLUDE_ETM).data,   
+        WRITE_OUT         => cts_rdo_additional(INCLUDE_ETM).data_write,   
+        FINISHED_OUT      => cts_rdo_additional(INCLUDE_ETM).data_finished,   
+        STATUSBIT_OUT     => cts_rdo_additional(INCLUDE_ETM).statusbits 
         );
     CLK_TEST_OUT(0) <= mbs_data_i;
     CLK_TEST_OUT(1) <= mbs_clock_i;
index 8a0dee3f54edbe7de047657a3446914b62009763..56d2cc088b7ffeeb77f03ecc30e7ffc767c8853f 100644 (file)
@@ -258,4 +258,5 @@ LOCATE COMP "THE_CBM_BRIDGE/THE_CBM_PHY/THE_SERDES/PCSD_INST" SITE "PCSA" ;
 
 UGROUP "THE_MEDIA_ONBOARD_GROUP" BBOX 25 45
    BLKNAME THE_MEDIA_ONBOARD;
-LOCATE UGROUP "THE_MEDIA_ONBOARD_GROUP" SITE "R98C75D" ;
\ No newline at end of file
+LOCATE UGROUP "THE_MEDIA_ONBOARD_GROUP" SITE "R98C75D" ;
+