merged everythin into one project
This commit is contained in:
55
dram/static/createTraceDB.sql
Normal file
55
dram/static/createTraceDB.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
DROP TABLE IF EXISTS Phases;
|
||||
DROP TABLE IF EXISTS GeneralInfo;
|
||||
DROP TABLE IF EXISTS Comments;
|
||||
DROP TABLE IF EXISTS ranges;
|
||||
DROP TABLE IF EXISTS Transactions;
|
||||
DROP TABLE IF EXISTS DebugMessages;
|
||||
|
||||
CREATE TABLE Phases(
|
||||
ID INTEGER PRIMARY KEY,
|
||||
PhaseName TEXT,
|
||||
PhaseBegin INTEGER,
|
||||
PhaseEnd INTEGER,
|
||||
Transact INTEGER
|
||||
);
|
||||
|
||||
CREATE TABLE GeneralInfo(
|
||||
NumberOfTransactions INTEGER,
|
||||
TraceEnd INTEGER,
|
||||
NumberOfBanks INTEGER,
|
||||
Description TEXT,
|
||||
clk INTEGER,
|
||||
UnitOfTime TEXT
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE Comments(
|
||||
Time INTEGER,
|
||||
Text TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE DebugMessages(
|
||||
Time INTEGER,
|
||||
Message TEXT
|
||||
);
|
||||
|
||||
-- use SQLITE R* TREE Module to make queries on timespans effecient (see http://www.sqlite.org/rtree.html)
|
||||
CREATE VIRTUAL TABLE ranges USING rtree(
|
||||
id,
|
||||
begin, end
|
||||
);
|
||||
|
||||
CREATE TABLE Transactions(
|
||||
ID INTEGER PRIMARY KEY,
|
||||
Range INTEGER,
|
||||
Address INTEGER,
|
||||
TThread INTEGER,
|
||||
TChannel INTEGER,
|
||||
TBank INTEGER,
|
||||
TRow INTEGER,
|
||||
TColumn INTEGER,
|
||||
Command TEXT);
|
||||
|
||||
CREATE INDEX ranges_index ON Transactions(Range);
|
||||
CREATE INDEX "phasesTransactions" ON "Phases" ("Transact" ASC);
|
||||
CREATE INDEX "messageTimes" ON "DebugMessages" ("Time" ASC)
|
||||
Reference in New Issue
Block a user