From b3f3ecaf2c56c53832ca225db2f56490b67c578e Mon Sep 17 00:00:00 2001 From: Andreas Neiser Date: Wed, 17 Jun 2015 18:11:13 +0200 Subject: [PATCH] Just try with different diamond again --- ADC/compile_constraints.pl | 15 +++++++++++++++ ADC/compile_periph_gsi.pl | 4 ++-- ADC/config.vhd | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ADC/compile_constraints.pl b/ADC/compile_constraints.pl index 5c0b8c8..cd1d711 100755 --- a/ADC/compile_constraints.pl +++ b/ADC/compile_constraints.pl @@ -69,6 +69,21 @@ my $lpf = join('', ); 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; diff --git a/ADC/compile_periph_gsi.pl b/ADC/compile_periph_gsi.pl index 80c3d64..05fb11e 100755 --- a/ADC/compile_periph_gsi.pl +++ b/ADC/compile_periph_gsi.pl @@ -9,9 +9,9 @@ use FileHandle; ################################################################################### #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'; ################################################################################### diff --git a/ADC/config.vhd b/ADC/config.vhd index b3db5e1..b020667 100644 --- a/ADC/config.vhd +++ b/ADC/config.vhd @@ -37,7 +37,7 @@ package config is 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; -- 2.43.0