Skip to content

Commit

Permalink
Merge pull request #360 from byuccl/travis_fixes
Browse files Browse the repository at this point in the history
Travis fixes
  • Loading branch information
trharoldsen authored Nov 9, 2018
2 parents 85412ba + 2716e65 commit eb987f2
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 27 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sourceCompatibility = '1.8'
assemble.dependsOn(installDist)

buildscript {
ext.kotlin_version = '1.1.4-3'
ext.kotlin_version = '1.3.0'
repositories {
mavenCentral()
jcenter()
Expand Down Expand Up @@ -44,7 +44,7 @@ dependencies {
compile 'com.github.javaparser:javaparser-core:3.0.0-RC.1'
compile 'ch.qos.logback:logback-classic:1.0.13'

testCompile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
testCompile "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testCompile "org.junit.platform:junit-platform-runner:$junitPlatformVersion"

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Oct 05 17:00:20 MDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
26 changes: 17 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,14 @@ public static List<String> createPinMappings(
out.write("set libcellname " + cell.getType() + "\n");
out.write("set belname " + belName + "\n");
out.write("link_design -part $partname\n");
out.write("set libcell [get_lib_cells $libcellname]");
out.write("set cell [create_cell -reference $libcell \"tmpcell\"]");
out.write("set bel [lindex [get_bels *$belname] 0]");
out.write("set libcell [get_lib_cells $libcellname]\n");
out.write("set cell [create_cell -reference $libcell \"tmpcell\"]\n");
out.write("place_cell $cell $belname\n");
out.write("set bel [lindex [get_bels $belname] 0]\n");
out.write("set config_dict [dict create " + propstring + "]\n");
out.write("set pin_mappings [tincr::cells::create_nondefault_pin_mappings $cell $bel $config_dict]");
out.write("set filename newMapping.xml" + "\n");
out.write("tincr::cells::write_nondefault_pin_mappings $cell $bel $pin_mappings $config_dict $filename");
out.write("set pin_mappings [tincr::cells::create_nondefault_pin_mappings $cell $bel $config_dict]\n");
out.write("set filename newMapping.xml\n");
out.write("tincr::cells::write_nondefault_pin_mappings $cell $bel $pin_mappings $config_dict $filename\n");
});
}

Expand Down Expand Up @@ -427,7 +428,7 @@ private static List<String> createPinMappings(
for (Map.Entry<String, PinMapping> entry : pms.entrySet()) {
String hash = entry.getKey();
PinMapping pm2 = entry.getValue();
if (pm.getPins().equals(pm2.getPins())) {
if (!pm.getHash().equals(pm2.getHash()) && pinsEquals(pm.getPins(), pm2.getPins())) {
pm.pins = null;
pm.duplic = hash;
}
Expand All @@ -439,6 +440,20 @@ private static List<String> createPinMappings(
savePinMappings(family, pms);
return results;
}

private static boolean pinsEquals(Map<String, List<String>> pm1, Map<String, List<String>> pm2) {
Map<String, Set<String>> pmeq1 = new HashMap<>();
for (Map.Entry<String, List<String>> e : pm1.entrySet()) {
pmeq1.put(e.getKey(), new HashSet<>(e.getValue()));
}

Map<String, Set<String>> pmeq2 = new HashMap<>();
for (Map.Entry<String, List<String>> e : pm2.entrySet()) {
pmeq2.put(e.getKey(), new HashSet<>(e.getValue()));
}

return pmeq1.equals(pmeq2);
}

private static String buildPartialHash(Cell cell, String belName) {
String[] split = belName.split("/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ public boolean addBelPinSink(BelPin belPin, RouteTree terminal) {
}
}
else {
if (sinkCellPin == null || !sinkCellPin.getNet().equals(this.net)) {
if (sinkCellPin == null || !Objects.equals(sinkCellPin.getNet(), this.net)) {
return false;
}
}
Expand Down

0 comments on commit eb987f2

Please sign in to comment.