The database name must be "testCases
". A Derby
database is stored in files that live in a directory of the same
name as the database. Database directories typically live in
system directories.
You define the system directory when Derby starts up by
specifying a Java system property called
derby.system.home
. See the Derby Developer's
Guide for details. For example, if the "testCases
"
directory is a subdirectory of the $HOME/derby
directory, then FSS could be launched with:
$ cd /opt/fss $ java -d64 -cp fss.jar:table.jar:JHDL.jar:axis2-adb-1.2.jar:derby.jar -Dderby.system.home=$HOME/derby com.alanfeldstein.sparc.fss.SparcCaseStudy &
The third command-line option, -Dderby.system.home=$HOME/derby sets a system property value.
One way to create a new database is to specify attributes to the
Derby connection URL. Such a method is shown in the Derby Tools and
Utilities Guide. Another method is programmatically (e.g. from
a random test program generator), using class org.apache.derby.jdbc.EmbeddedDataSource40
.
CREATE TABLE "operands"
(
"pairID" BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY ,
"operand1" BIGINT NOT NULL ,
"operand2" BIGINT NOT NULL
);
CREATE TABLE "ADDTestCases"
(
"ADDTestCasesID" BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY PRIMARY KEY ,
"pairID" BIGINT NOT NULL ,
FOREIGN KEY ( "pairID" ) REFERENCES "operands" ( "pairID" ) ,
"expectedSum" BIGINT NOT NULL ,
"executableFile" BLOB(2G) NOT NULL
);
operand1
and operand2
are used here as
addends. They are stimuli to the design under verification and its
implementation of the SPARC-V9 ADD instruction.
expectedSum
is self-explanatory.
executableFile
requires more explanation. The
binary string that goes into that column must be in ELF. At the end of
each simulation run, FSS will look for an extended word at address
0000 0001 0010 011816. That extended word is the actual
sum.