close FILE;
$lpf =~ s#THE_TDC/#GEN_TDC.THE_TDC/#g;
+# only for TDC v1.6.3
+#$lpf =~ s#ff_array_en#ff_array_en_i#g;
+
+
+# make the LPF diamond 2.1 compatible
+# we assume that generate loops are all named with "gen_"
+sub replace_dot {
+ my @m = @_;
+ $m[1] =~ s/\./_/g;
+ return join("", @m);
+}
+$lpf =~ s#(BLKNAME\s+)(.+?)([;\s])#replace_dot($1,$2,$3)#eg;
+$lpf =~ s#(CELL\s+")(.+?)(")#replace_dot($1,$2,$3)#eg;
+$lpf =~ s#(NET\s+")(.+?)(")#replace_dot($1,$2,$3)#eg;
+
open FILE, ">$workdir/$TOPNAME.lpf" or die "Couldnt open file: $!";
print FILE $lpf;
###################################################################################
#Settings for this project
my $TOPNAME = "trb3_periph_adc"; #Name of top-level entity
-my $lattice_path = '/opt/lattice/diamond/3.4_x64';
+my $lattice_path = '/opt/lattice/diamond/2.1_x64';
my $lattice_bin_path = "$lattice_path/bin/lin64"; # note the lin/lin64 at the end, no isfgpa needed
-my $synplify_path = '/opt/synplicity/J-2014.09-SP2';
+my $synplify_path = '/opt/synplicity/F-2012.03-SP1';
my $lm_license_file_for_synplify = '27000@lxcad01.gsi.de';
my $lm_license_file_for_par = '1702@hadeb05.gsi.de';
###################################################################################
constant ADC_TRIGGER_LOGIC : integer := c_YES;
-- ADC channels may be 48 or 36, the latter for enabling compilation
-- with TDC and lattice diamond version >2.1
- constant ADC_CHANNELS : integer := 36;
+ constant ADC_CHANNELS : integer := 48;
--Include the TDC (only useful for CFD readout mode)
constant INCLUDE_TDC : integer := c_YES;