diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c54e387 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.gradle +build/ +**/obj + diff --git a/README.md b/README.md index d8e52ce..bf4b563 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,13 @@ Most of Jove is written in the Java 5.0 language, and should therefore work on a | Microsoft Windows XP + Cygwin 1.5.18-1 | Intel x86 | GPL Cver | | Apple Mac OS X 10.4.2 + J2SE 5.0 Release 1 | PowerPC | GPL Cver | + +Modernization +---- + +An attempt is being made to upgrade Jove to build with Gradle on Java 17. It might be interesting to write a scheduler using Java Loom. + + What Verilog simulators does Jove support? ---- diff --git a/java/build.gradle b/java/build.gradle new file mode 100644 index 0000000..f4846f5 --- /dev/null +++ b/java/build.gradle @@ -0,0 +1,59 @@ +//plugins { +// id 'java-library' +//} + +//subprojects { +// apply plugin: "java-library" +// //sourceCompatibility = '1.5' +// sourceSets { +// main { +// java { +// srcDirs = ['src'] +// } +// } +// test { +// java { +// srcDirs = ['test'] +// } +// } +// } +//} +/* +project(":jove") { + repositories { + mavenCentral() + } + dependencies { + implementation project(":newisys-utils") + testImplementation "junit:junit:4.12" + } +} + +project(":langschema") { + dependencies { + implementation project(":newisys-utils") + } +} +project(":langschema-java") { + dependencies { + implementation project(":langschema") + implementation project(":newisys-utils") + } +} +project(":langschema-jove") { + dependencies { + implementation project(":langschema-java") + implementation project(":langschema") + implementation project(":newisys-utils") + } +} +project(":randsolver") { + dependencies { + implementation project(":langschema-jove") + implementation project(":langschema-java") + implementation project(":langschema") + implementation project(":jove") + testImplementation "junit:junit:4.12" + } +} +*/ diff --git a/java/jove-ifgen/build.gradle b/java/jove-ifgen/build.gradle new file mode 100644 index 0000000..77c5377 --- /dev/null +++ b/java/jove-ifgen/build.gradle @@ -0,0 +1,43 @@ +plugins { + id 'application' + id 'com.intershop.gradle.javacc' version '4.0.1' +} + +javacc { + // configuration container for all javacc configurations + configs { + template { + inputFile = file('src/com/newisys/dv/ifgen/parser/IfgenParser.jj') + packageName = 'com.newisys.dv.ifgen.parser' + lookahead = '2' + } + } +} +repositories { + mavenCentral() +} +sourceSets { + main { + java { + srcDirs = ['src'] + } + } + test { + java { + srcDirs = ['test'] + } + } +} +dependencies { + implementation project(":newisys-utils") + implementation project(":langschema") + implementation project(":langschema-java") + implementation project(":langschema-jove") + implementation project(":jove") + implementation 'org.apache.ant:ant:1.10.12' + testImplementation "junit:junit:4.12" +} + +application { + mainClass = 'com.newisys.dv.ifgen.IfgenMain' +} diff --git a/java/jove-samples/build.gradle b/java/jove-samples/build.gradle new file mode 100644 index 0000000..d1c7047 --- /dev/null +++ b/java/jove-samples/build.gradle @@ -0,0 +1,32 @@ +plugins { + id 'java-library' +} + +sourceSets { + main { + java { + srcDirs = ['src'] + } + } + test { + java { + srcDirs = ['test'] + } + } +} + +dependencies { + implementation project(":langschema") + implementation project(":langschema-java") + implementation project(":langschema-jove") + implementation project(":jove-ifgen") + implementation project(":randsolver") + implementation project(":jove") + implementation project(":newisys-utils") +} + +task createIfs(type: JavaExec) { + classpath = project(":jove-ifgen").sourceSets.main.runtimeClasspath + mainClass = 'com.newisys.dv.ifgen.IfgenMain' + args '-file', './src/com/newisys/samples/and3/and3.if' +} diff --git a/java/jove/build.gradle b/java/jove/build.gradle new file mode 100644 index 0000000..730c4aa --- /dev/null +++ b/java/jove/build.gradle @@ -0,0 +1,22 @@ +plugins { + id 'java-library' +} +repositories { + mavenCentral() +} +sourceSets { + main { + java { + srcDirs = ['src'] + } + } + test { + java { + srcDirs = ['test'] + } + } +} +dependencies { + implementation project(":newisys-utils") + testImplementation "junit:junit:4.12" +} diff --git a/java/jove/src/com/newisys/behsim/BehavioralReg.java b/java/jove/src/com/newisys/behsim/BehavioralReg.java index 8b241a0..b147c0a 100644 --- a/java/jove/src/com/newisys/behsim/BehavioralReg.java +++ b/java/jove/src/com/newisys/behsim/BehavioralReg.java @@ -164,7 +164,7 @@ else if (type == ValueType.VECTOR) } else if (type == ValueType.INT) { - return new Integer(buffer.intValue()); + return Integer.valueOf(buffer.intValue()); } else if (type == ValueType.SUPPRESS) { diff --git a/java/jove/src/com/newisys/behsim/BehavioralSimulation.java b/java/jove/src/com/newisys/behsim/BehavioralSimulation.java index fdbe0cc..bb317b0 100644 --- a/java/jove/src/com/newisys/behsim/BehavioralSimulation.java +++ b/java/jove/src/com/newisys/behsim/BehavioralSimulation.java @@ -313,7 +313,7 @@ public long getSimTime() */ public double getScaledRealTime() { - Long tmp = new Long(eventScheduler.getCurrentTime()); + Long tmp = Long.valueOf(eventScheduler.getCurrentTime()); return tmp.doubleValue(); } diff --git a/java/jove/test/com/newisys/behsim/BehavioralRegTest.java b/java/jove/test/com/newisys/behsim/BehavioralRegTest.java index 06c16a2..8bc8aac 100644 --- a/java/jove/test/com/newisys/behsim/BehavioralRegTest.java +++ b/java/jove/test/com/newisys/behsim/BehavioralRegTest.java @@ -164,7 +164,7 @@ private void doDriveDelayModeTest( try { - reggie.putValueDelay(new BitVector("16'h0001"), delay, mode); + reggie.putValueDelay(new BitVector("32'h0001"), delay, mode); } catch (UnsupportedOperationException e) @@ -191,16 +191,16 @@ public void testValueChangeCallbackDefault() TimeType timeType = TimeType.SIM; ValueType valueType = ValueType.OBJ_TYPE; VerilogTime time = new VerilogSimTime(0); - valueChangeCallbackTest(value, timeType, valueType, time); + valueChangeCallbackTest(reggie, value, timeType, valueType, time); } public void testValueChangeCallbackScaledRealInt() { - Object value = new Integer(299772); + Object value = Integer.valueOf(299772); TimeType timeType = TimeType.SCALED_REAL; ValueType valueType = ValueType.INT; VerilogTime time = new VerilogScaledRealTime(0.0); - valueChangeCallbackTest(value, timeType, valueType, time); + valueChangeCallbackTest(reggie, value, timeType, valueType, time); } public void testValueChangeCallbackSupressTimeScalar() @@ -209,7 +209,7 @@ public void testValueChangeCallbackSupressTimeScalar() TimeType timeType = TimeType.SUPPRESS; ValueType valueType = ValueType.SCALAR; VerilogTime time = null; - valueChangeCallbackTest(value, timeType, valueType, time); + valueChangeCallbackTest(new BehavioralReg(simulation, "Reggie", 1), value, timeType, valueType, time); } public void testValueChangeCallbackScaledRealVector() @@ -218,7 +218,7 @@ public void testValueChangeCallbackScaledRealVector() TimeType timeType = TimeType.SCALED_REAL; ValueType valueType = ValueType.VECTOR; VerilogTime time = new VerilogScaledRealTime(0.0); - valueChangeCallbackTest(value, timeType, valueType, time); + valueChangeCallbackTest(reggie, value, timeType, valueType, time); } public void testValueChangeCallbackSupressValueScalar() @@ -227,10 +227,11 @@ public void testValueChangeCallbackSupressValueScalar() TimeType timeType = TimeType.SCALED_REAL; ValueType valueType = ValueType.SUPPRESS; VerilogTime time = new VerilogScaledRealTime(0.0); - valueChangeCallbackTest(value, timeType, valueType, time); + valueChangeCallbackTest(reggie, value, timeType, valueType, time); } private void valueChangeCallbackTest( + BehavioralReg reggie, Object value, TimeType timeType, ValueType valueType, diff --git a/java/jove/test/com/newisys/dv/MailboxTest.java b/java/jove/test/com/newisys/dv/MailboxTest.java index bb9a369..c40b803 100644 --- a/java/jove/test/com/newisys/dv/MailboxTest.java +++ b/java/jove/test/com/newisys/dv/MailboxTest.java @@ -67,7 +67,7 @@ final public void testMailbox() doPeekNoWait(0); doSize(SIZE * 2); - doToString(m1.getClass().getName() + "{m1}"); + doToString("m1"); } public void doPut() diff --git a/java/jove/test/com/newisys/eventsim/MetaEventWaitOrderingTest.java b/java/jove/test/com/newisys/eventsim/MetaEventWaitOrderingTest.java index 9bf330c..a048c45 100644 --- a/java/jove/test/com/newisys/eventsim/MetaEventWaitOrderingTest.java +++ b/java/jove/test/com/newisys/eventsim/MetaEventWaitOrderingTest.java @@ -156,11 +156,11 @@ public void run() List order = soTest.order; assertEquals(5, order.size()); - assertEquals(new Integer(1), order.get(0)); - assertEquals(new Integer(2), order.get(1)); - assertEquals(new Integer(3), order.get(2)); - assertEquals(new Integer(4), order.get(3)); - assertEquals(new Integer(5), order.get(4)); + assertEquals(Integer.valueOf(1), order.get(0)); + assertEquals(Integer.valueOf(2), order.get(1)); + assertEquals(Integer.valueOf(3), order.get(2)); + assertEquals(Integer.valueOf(4), order.get(3)); + assertEquals(Integer.valueOf(5), order.get(4)); } } diff --git a/java/jove/test/com/newisys/printf/TestPrintf.java b/java/jove/test/com/newisys/printf/TestPrintf.java index c8774b9..64c47d8 100644 --- a/java/jove/test/com/newisys/printf/TestPrintf.java +++ b/java/jove/test/com/newisys/printf/TestPrintf.java @@ -189,7 +189,7 @@ public void testStringConversions() public void testSignedConversion() { // only %d and %i should be signed for a signed type - Object o = new Short((short) -1); + Object o = Short.valueOf((short) -1); assertEquals("1111111111111111", Printf.sprintf("%b", o)); assertEquals("177777", Printf.sprintf("%o", o)); assertEquals("-1", Printf.sprintf("%d", o)); diff --git a/java/langschema-java/build.gradle b/java/langschema-java/build.gradle new file mode 100644 index 0000000..47d165c --- /dev/null +++ b/java/langschema-java/build.gradle @@ -0,0 +1,21 @@ +plugins { + id 'java-library' +} + +sourceSets { + main { + java { + srcDirs = ['src'] + } + } + test { + java { + srcDirs = ['test'] + } + } +} + +dependencies { + implementation project(":newisys-utils") + implementation project(":langschema") +} diff --git a/java/langschema-jove/build.gradle b/java/langschema-jove/build.gradle new file mode 100644 index 0000000..6a7f6f1 --- /dev/null +++ b/java/langschema-jove/build.gradle @@ -0,0 +1,22 @@ +plugins { + id 'java-library' +} + +sourceSets { + main { + java { + srcDirs = ['src'] + } + } + test { + java { + srcDirs = ['test'] + } + } +} + +dependencies { + implementation project(":newisys-utils") + implementation project(":langschema") + implementation project(":langschema-java") +} diff --git a/java/langschema/build.gradle b/java/langschema/build.gradle new file mode 100644 index 0000000..fc901db --- /dev/null +++ b/java/langschema/build.gradle @@ -0,0 +1,20 @@ +plugins { + id 'java-library' +} + +sourceSets { + main { + java { + srcDirs = ['src'] + } + } + test { + java { + srcDirs = ['test'] + } + } +} + +dependencies { + implementation project(":newisys-utils") +} diff --git a/java/newisys-utils/build.gradle b/java/newisys-utils/build.gradle new file mode 100644 index 0000000..33df307 --- /dev/null +++ b/java/newisys-utils/build.gradle @@ -0,0 +1,16 @@ +plugins { + id 'java-library' +} + +sourceSets { + main { + java { + srcDirs = ['src'] + } + } + test { + java { + srcDirs = ['test'] + } + } +} diff --git a/java/randsolver/build.gradle b/java/randsolver/build.gradle new file mode 100644 index 0000000..14f0e89 --- /dev/null +++ b/java/randsolver/build.gradle @@ -0,0 +1,62 @@ +plugins { + id 'com.intershop.gradle.javacc' version '3.1.1' + id 'java-library' +} +repositories { + mavenCentral() +} +sourceSets { + main { + java { + srcDirs = ['src'] + } + } + test { + java { + srcDirs = ['test'] + } + } +} +dependencies { + implementation project(":langschema-jove") + implementation project(":langschema-java") + implementation project(":langschema") + implementation project(":jove") +// testImplementation "junit:junit:4.12" + + testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1' + testCompileOnly 'junit:junit:4.13' + testRuntimeOnly 'org.junit.vintage:junit-vintage-engine' + +} +tasks.withType(JavaCompile) { +// options.compilerArgs << '-Xlint:unchecked' + options.compilerArgs << '-Xlint:deprecation' + options.deprecation = true +} +javacc { + // configuration container for all javacc configurations + configs { + template { + javaCCVersion = '3.2' + inputFile = file('src/com/newisys/randsolver/parser/ConstraintParser.jj') + packageName = 'com.newisys.randsolver' + // lookahead = '2' + } + } +} + +tasks.getByName("javaccTemplate") { + // The javacc 3.0 does not create the directory it needs + doFirst { + mkdir "${buildDir}/generated/javacc/template/com/newisys/randsolver" + } + // The javacc 3.0 creates an incorrect Token file, the project provides its own. + doLast { + delete "${buildDir}/generated/javacc/template/com/newisys/randsolver/Token.java" + } +} + +test { + useJUnitPlatform() +} diff --git a/java/randsolver/src/com/newisys/randsolver/ComplexExprSolver.java b/java/randsolver/src/com/newisys/randsolver/ComplexExprSolver.java index aa2b154..c6d69a1 100644 --- a/java/randsolver/src/com/newisys/randsolver/ComplexExprSolver.java +++ b/java/randsolver/src/com/newisys/randsolver/ComplexExprSolver.java @@ -946,7 +946,7 @@ protected Map commit(Object obj, PRNG rng) } else { - f.set(commitObj, new Boolean(b)); + f.set(commitObj, Boolean.valueOf(b)); } } else if (dataType == byte.class || dataType == Byte.class) @@ -961,7 +961,7 @@ else if (dataType == byte.class || dataType == Byte.class) } else { - f.set(commitObj, new Byte(b)); + f.set(commitObj, Byte.valueOf(b)); } } else if (dataType == char.class) @@ -982,7 +982,7 @@ else if (dataType == int.class || dataType == Integer.class) } else { - f.set(commitObj, new Integer(value)); + f.set(commitObj, Integer.valueOf(value)); } } else if (dataType == long.class || dataType == Long.class) @@ -995,7 +995,7 @@ else if (dataType == long.class || dataType == Long.class) } else { - f.set(commitObj, new Long(value)); + f.set(commitObj, Long.valueOf(value)); } } else if (dataType == short.class || dataType == Short.class) @@ -1010,7 +1010,7 @@ else if (dataType == short.class || dataType == Short.class) } else { - f.set(commitObj, new Short(s)); + f.set(commitObj, Short.valueOf(s)); } } else if (dataType == BitVector.class) diff --git a/java/randsolver/src/com/newisys/randsolver/RandVarSet.java b/java/randsolver/src/com/newisys/randsolver/RandVarSet.java index ed23daf..1e13f8b 100644 --- a/java/randsolver/src/com/newisys/randsolver/RandVarSet.java +++ b/java/randsolver/src/com/newisys/randsolver/RandVarSet.java @@ -122,7 +122,7 @@ public void addRandVar(RandomVariable rv) // only create an index if we actually added something to the set if (size != mRandVars.size()) { - mRandVarToIdx.put(rv, new Integer(mCurIndex)); + mRandVarToIdx.put(rv, Integer.valueOf(mCurIndex)); ++mCurIndex; } } @@ -228,7 +228,7 @@ private void resetIndices() while (iter.hasNext()) { RandomVariable rv = (RandomVariable) iter.next(); - mRandVarToIdx.put(rv, new Integer(newIdx)); + mRandVarToIdx.put(rv, Integer.valueOf(newIdx)); ++newIdx; } } diff --git a/java/randsolver/src/org/sf/javabdd/BDD.java b/java/randsolver/src/org/sf/javabdd/BDD.java index 2394216..1d60110 100644 --- a/java/randsolver/src/org/sf/javabdd/BDD.java +++ b/java/randsolver/src/org/sf/javabdd/BDD.java @@ -968,8 +968,8 @@ else if (this == getFactory().zero()) visited[0] = true; visited[1] = true; HashMap map = new HashMap(); - map.put(getFactory().zero(), new Integer(0)); - map.put(getFactory().one(), new Integer(1)); + map.put(getFactory().zero(), Integer.valueOf(0)); + map.put(getFactory().one(), Integer.valueOf(1)); printdot_rec(out, 1, visited, map); out.println("}"); @@ -984,7 +984,7 @@ int printdot_rec( Integer ri = ((Integer) map.get(this)); if (ri == null) { - map.put(this, ri = new Integer(++current)); + map.put(this, ri = Integer.valueOf(++current)); } int r = ri.intValue(); if (visited[r]) return current; @@ -998,13 +998,13 @@ int printdot_rec( Integer li = ((Integer) map.get(l)); if (li == null) { - map.put(l, li = new Integer(++current)); + map.put(l, li = Integer.valueOf(++current)); } int low = li.intValue(); Integer hi = ((Integer) map.get(h)); if (hi == null) { - map.put(h, hi = new Integer(++current)); + map.put(h, hi = Integer.valueOf(++current)); } int high = hi.intValue(); diff --git a/java/randsolver/src/org/sf/javabdd/BDDFactory.java b/java/randsolver/src/org/sf/javabdd/BDDFactory.java index 1fda384..92e0b30 100644 --- a/java/randsolver/src/org/sf/javabdd/BDDFactory.java +++ b/java/randsolver/src/org/sf/javabdd/BDDFactory.java @@ -84,7 +84,7 @@ public static BDDFactory init(String bddpackage, int nodenum, int cachesize) // if (bddpackage.equals("typed")) // return TypedBDDFactory.init(nodenum, cachesize); } - catch (LinkageError _) + catch (LinkageError ex) { System.out.println("Could not load BDD package " + bddpackage); } @@ -94,18 +94,18 @@ public static BDDFactory init(String bddpackage, int nodenum, int cachesize) Method m = c .getMethod("init", new Class[] { int.class, int.class }); return (BDDFactory) m.invoke(null, new Object[] { - new Integer(nodenum), new Integer(cachesize) }); + Integer.valueOf(nodenum), Integer.valueOf(cachesize) }); } - catch (ClassNotFoundException _) + catch (ClassNotFoundException ex) { } - catch (NoSuchMethodException _) + catch (NoSuchMethodException ex) { } - catch (IllegalAccessException _) + catch (IllegalAccessException ex) { } - catch (InvocationTargetException _) + catch (InvocationTargetException ex) { } // falling back to default java implementation. diff --git a/java/randsolver/test/com/newisys/randsolver/TestAnnotation.java b/java/randsolver/test/com/newisys/randsolver/TestAnnotation.java index 5bcc1e2..a2ac3fc 100644 --- a/java/randsolver/test/com/newisys/randsolver/TestAnnotation.java +++ b/java/randsolver/test/com/newisys/randsolver/TestAnnotation.java @@ -280,7 +280,7 @@ public void testXZStateVar() // good. X/Z state vars are not allowed. } - o.j = new Integer(7); + o.j = Integer.valueOf(7); Solver.randomize(o, prng); assertEquals(7, o.j.intValue()); } diff --git a/java/settings.gradle b/java/settings.gradle new file mode 100644 index 0000000..8205f0b --- /dev/null +++ b/java/settings.gradle @@ -0,0 +1,9 @@ +rootProject.name = "jove-root" +include "newisys-utils" +include "jove" +include "jove-ifgen" +include "langschema" +include "langschema-java" +include "langschema-jove" +include "jove-samples" +include "randsolver" diff --git a/native/comp/jnicpp/include/jnicpp.inl b/native/comp/jnicpp/include/jnicpp.inl index 2b3e2b0..5d9a6f2 100644 --- a/native/comp/jnicpp/include/jnicpp.inl +++ b/native/comp/jnicpp/include/jnicpp.inl @@ -18,6 +18,7 @@ #include #include +#include #ifdef JNICPP_DEBUG_REF #include @@ -27,9 +28,9 @@ namespace jnicpp { ////////////////////////////////////////////////////////////////////// -void checkException(JNIEnv* penv) throw(JException); -void convertException(JNIEnv* penv, const std::string& msg) throw(JException); -const char* getJNIResultMessage(jint result) throw(); +void checkException(JNIEnv* penv); // throw(JException); +void convertException(JNIEnv* penv, const std::string& msg); //throw(JException); +const char* getJNIResultMessage(jint result); //throw(); ////////////////////////////////////////////////////////////////////// @@ -908,7 +909,14 @@ inline char* JString::convertToCharArray(JNIEnv* penv, jstring obj) if (chars == NULL) { convertException(penv, "Unable to access string characters"); } - char* result = strdup(chars); + //char* result = strdup(chars); + char* result; //= strdup(chars); + char *dst = (char *)malloc(strlen (chars) + 1); + if (dst == NULL) { + result = NULL; + } else { + strcpy(result, chars); + } penv->ReleaseStringUTFChars(obj, chars); return result; } diff --git a/native/comp/jnicpp/src/jnicpp.cpp b/native/comp/jnicpp/src/jnicpp.cpp index 595b549..d095ea5 100644 --- a/native/comp/jnicpp/src/jnicpp.cpp +++ b/native/comp/jnicpp/src/jnicpp.cpp @@ -28,7 +28,7 @@ namespace jnicpp { ////////////////////////////////////////////////////////////////////// -void checkException(JNIEnv* penv) throw(JException) +void checkException(JNIEnv* penv) //throw(JException) { jthrowable obj = penv->ExceptionOccurred(); if (obj != NULL) { @@ -37,7 +37,7 @@ void checkException(JNIEnv* penv) throw(JException) } } -void convertException(JNIEnv* penv, const std::string& msg) throw(JException) +void convertException(JNIEnv* penv, const std::string& msg) //throw(JException) { jthrowable obj = penv->ExceptionOccurred(); if (obj != NULL) { @@ -48,7 +48,7 @@ void convertException(JNIEnv* penv, const std::string& msg) throw(JException) } } -const char* getJNIResultMessage(jint result) throw() +const char* getJNIResultMessage(jint result) //throw() { switch (result) { case JNI_OK: diff --git a/native/comp/jvmlibpaths/src/jvmlibpaths.c b/native/comp/jvmlibpaths/src/jvmlibpaths.c index 2d30550..972465e 100644 --- a/native/comp/jvmlibpaths/src/jvmlibpaths.c +++ b/native/comp/jvmlibpaths/src/jvmlibpaths.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "jvminvoke.h" diff --git a/native/comp/pli4j/src/Configuration.h b/native/comp/pli4j/src/Configuration.h index ab86df5..7e28b73 100644 --- a/native/comp/pli4j/src/Configuration.h +++ b/native/comp/pli4j/src/Configuration.h @@ -29,7 +29,7 @@ //#define JVM_DEBUG //#define OVA_DEBUG -#define SIMULATOR_VCS +//#define SIMULATOR_VCS #ifdef SIMULATOR_VCS #define NO_VPI_CONTROL diff --git a/native/comp/vpicpp/include/veriuser.h b/native/comp/vpicpp/include/veriuser.h index 0348e9b..694fe82 100644 --- a/native/comp/vpicpp/include/veriuser.h +++ b/native/comp/vpicpp/include/veriuser.h @@ -267,7 +267,7 @@ EXTERN int tf_copypvc_flag PROTO_PARAMS((int nparam)); EXTERN void tf_divide_long PROTO_PARAMS((int *aof_low1, int *aof_high1, int low2, int high2)); EXTERN int tf_dofinish PROTO_PARAMS((void)); EXTERN int tf_dostop PROTO_PARAMS((void)); -EXTERN int tf_error PROTO_PARAMS((char *fmt, ...)); +EXTERN int tf_error PROTO_PARAMS((char const *fmt, ...)); EXTERN int tf_evaluatep PROTO_PARAMS((int pnum)); EXTERN p_tfexprinfo tf_exprinfo PROTO_PARAMS((int pnum, p_tfexprinfo pinfo)); EXTERN char *tf_getcstringp PROTO_PARAMS((int nparam)); diff --git a/native/comp/vpicpp/include/vpi_user.h b/native/comp/vpicpp/include/vpi_user.h index 5469413..1a49e66 100644 --- a/native/comp/vpicpp/include/vpi_user.h +++ b/native/comp/vpicpp/include/vpi_user.h @@ -626,7 +626,7 @@ typedef struct t_vpi_systf_data PLI_INT32 type; /* vpiSysTask, vpiSysFunc */ PLI_INT32 sysfunctype; /* vpiSysTask, vpi[Int,Real,Time,Sized, SizedSigned]Func */ - PLI_BYTE8 *tfname; /* first character must be `$' */ + PLI_BYTE8 const *tfname; /* first character must be `$' */ PLI_INT32 (*calltf)(PLI_BYTE8 *); PLI_INT32 (*compiletf)(PLI_BYTE8 *); PLI_INT32 (*sizetf)(PLI_BYTE8 *); /* for sized function @@ -788,7 +788,7 @@ XXTERN PLI_BYTE8 *vpi_mcd_name PROTO_PARAMS((PLI_UINT32 cd)); XXTERN PLI_INT32 vpi_mcd_printf PROTO_PARAMS((PLI_UINT32 mcd, PLI_BYTE8 *format, ...)); -XXTERN PLI_INT32 vpi_printf PROTO_PARAMS((PLI_BYTE8 *format, +XXTERN PLI_INT32 vpi_printf PROTO_PARAMS((PLI_BYTE8 const *format, ...)); /* utility routines */ diff --git a/native/comp/vpicpp/include/vpicpp.inl b/native/comp/vpicpp/include/vpicpp.inl index d898f9d..cfc9e1a 100644 --- a/native/comp/vpicpp/include/vpicpp.inl +++ b/native/comp/vpicpp/include/vpicpp.inl @@ -47,8 +47,8 @@ inline std::string getStringValue(vpiHandle obj) ////////////////////////////////////////////////////////////////////// -void checkException() throw(VPIException); -void convertException(const std::string& msg) throw(VPIException); +void checkException(); // throw(VPIException); +void convertException(const std::string& msg); // throw(VPIException); ////////////////////////////////////////////////////////////////////// diff --git a/native/comp/vpicpp/src/vpicpp.cpp b/native/comp/vpicpp/src/vpicpp.cpp index e605413..421dad1 100644 --- a/native/comp/vpicpp/src/vpicpp.cpp +++ b/native/comp/vpicpp/src/vpicpp.cpp @@ -39,7 +39,7 @@ vpiHandle getHandle(int type, vpiHandle refHandle) ////////////////////////////////////////////////////////////////////// -void checkException() throw(VPIException) +void checkException() // throw(VPIException) { s_vpi_error_info info; if (vpi_chk_error(&info)) { @@ -91,7 +91,7 @@ void checkException() throw(VPIException) } } -void convertException(const std::string& msg) throw(VPIException) +void convertException(const std::string& msg) //throw(VPIException) { checkException(); throw VPIException(msg);