aboutsummaryrefslogtreecommitdiff
path: root/arch/v1/arch.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/v1/arch.c')
-rw-r--r--arch/v1/arch.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/v1/arch.c b/arch/v1/arch.c
index b4dabcf..ec5d778 100644
--- a/arch/v1/arch.c
+++ b/arch/v1/arch.c
@@ -7,7 +7,7 @@ enum {
#undef INST
};
-#if defined(DATA_PUSH_PATH)
+#if defined(DATA_PUSH)
#define ARCH_EVENT_ARRAYS \
ARCH_EVENT_ARRAY(0, wev) /* write events array*/ \
ARCH_EVENT_ARRAY(1, xev) /* memory block swap events array */
@@ -23,7 +23,7 @@ thrd_t g_arch_eva_thrds[CORES][ARCH_EVENT_ARRAYS_COUNT];
struct DeflateParams g_arch_eva_deflate_params[CORES][ARCH_EVENT_ARRAYS_COUNT];
#endif
-#if (defined(COMMAND_BENCH) || defined(COMMAND_NEW)) && defined(ANC_BYTES)
+#if defined(COMMAND_NEW)
void arch_core_init(struct Core *core) {
assert(core);
@@ -51,12 +51,12 @@ void arch_core_free(struct Core *core) {
(void)core;
}
-#if defined(COMMAND_LOAD) || defined(COMMAND_NEW)
+#if defined(COMMAND_NEW) || defined(COMMAND_LOAD)
void arch_core_save(FILE *f, const struct Core *core) {
assert(f);
assert(core);
-#if defined(DATA_PUSH_PATH)
+#if defined(DATA_PUSH)
fwrite(core->iexe, sizeof(uint64_t), INST_COUNT, f);
fwrite(core->iwrt, sizeof(uint64_t), INST_COUNT, f);
fwrite(&core->wmb0, sizeof(uint64_t), 1, f);
@@ -78,7 +78,7 @@ void arch_core_load(FILE *f, struct Core *core) {
assert(f);
assert(core);
-#if defined(DATA_PUSH_PATH)
+#if defined(DATA_PUSH)
fread(core->iexe, sizeof(uint64_t), INST_COUNT, f);
fread(core->iwrt, sizeof(uint64_t), INST_COUNT, f);
fread(&core->wmb0, sizeof(uint64_t), 1, f);
@@ -438,7 +438,7 @@ void _bswap(struct Core *core, uint64_t pix) {
proc->mb1a = tmpa;
proc->mb1s = tmps;
-#if defined(DATA_PUSH_PATH)
+#if defined(DATA_PUSH)
// Memory block swap events mark all addresses within both blocks
for (uint64_t i = 0; i < proc->mb0s; i++) {
uint64_t addr = proc->mb0a + i;
@@ -675,10 +675,10 @@ void _write(struct Core *core, uint64_t pix) {
if (_is_writeable_by(core, *regs[0], pix)) {
uint64_t addr = *regs[0];
-#if defined(DATA_PUSH_PATH)
- // Store write event
+#if defined(DATA_PUSH)
uint8_t inst = *regs[1] % INST_COUNT;
+ // Store write event
++core->iwrt[inst];
++core->weva[addr];
@@ -734,7 +734,7 @@ void arch_proc_step(struct Core *core, uint64_t pix) {
struct Proc *proc = proc_fetch(core, pix);
uint8_t inst = _get_inst(core, proc->ip);
-#if defined(DATA_PUSH_PATH)
+#if defined(DATA_PUSH)
// Store specific instruction execution event in database
++core->iexe[inst];
#endif
@@ -873,12 +873,12 @@ const char *arch_mnemonic(uint8_t inst) {
// ----------------------------------------------------------------------------
// Data aggregation functions
// ----------------------------------------------------------------------------
-#if defined(DATA_PUSH_PATH)
+#if defined(DATA_PUSH)
#if defined(COMMAND_NEW)
void arch_push_data_header(void) {
assert(g_sim_data);
- g_info("Creating 'arch' table in SQLite database");
+ g_info("Creating arch table in SQLite database");
salis_exec_sql(
0, NULL, NULL,
"create table arch ("
@@ -899,7 +899,7 @@ void arch_push_data_header(void) {
for (int i = 0; i < CORES; ++i) {
for (int j = 0; j < iprefs_cnt; ++j) {
- g_info("Creating '%s_%d' table in SQLite database", iprefs[j], i);
+ g_info("Creating %s_%d table in SQLite database", iprefs[j], i);
salis_exec_sql(
0, NULL, NULL,
"create table %s_%d ("
@@ -929,7 +929,7 @@ void arch_push_data_header(void) {
default: assert(false);
}
- g_info("Creating '%s_%d' table in SQLite database", pref, i);
+ g_info("Creating %s_%d table in SQLite database", pref, i);
salis_exec_sql(
0, NULL, NULL,
"create table %s_%d ("
@@ -969,7 +969,7 @@ void arch_push_data_line(void) {
#endif
}
- g_info("Pushing row to 'arch' table in SQLite database");
+ g_info("Pushing row to arch table in SQLite database");
salis_exec_sql(
0, NULL, NULL,
"insert into arch ("
@@ -1013,7 +1013,7 @@ void arch_push_data_line(void) {
default: assert(false);
}
- g_info("Pushing row to '%s_%d' table in SQLite database", pref, i);
+ g_info("Pushing row to %s_%d table in SQLite database", pref, i);
salis_exec_sql(
0, NULL, NULL,
"insert into %s_%d ("
@@ -1087,7 +1087,7 @@ void arch_push_data_line(void) {
const void *blob = params->out;
int blob_size = params->strm.total_out;
- g_info("Pushing row to '%s_%d' table in SQLite database", pref, i);
+ g_info("Pushing row to %s_%d table in SQLite database", pref, i);
salis_exec_sql(
1, &blob, &blob_size,
"insert into %s_%d ("