file per set
Some checks are pending
Build / cmake-builds (push) Waiting to run
Build / makefile (macos-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Waiting to run
Build / makefile (macos-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Waiting to run
Build / makefile (macos-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Waiting to run
Build / makefile (macos-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Waiting to run
Build / makefile (macos-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Waiting to run
Build / makefile (macos-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Waiting to run
Build / makefile (ubuntu-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Waiting to run
Build / makefile (ubuntu-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Waiting to run
Build / makefile (ubuntu-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Waiting to run
Build / makefile (ubuntu-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Waiting to run
Build / makefile (ubuntu-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Waiting to run
Build / makefile (ubuntu-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Waiting to run
Some checks are pending
Build / cmake-builds (push) Waiting to run
Build / makefile (macos-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Waiting to run
Build / makefile (macos-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Waiting to run
Build / makefile (macos-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Waiting to run
Build / makefile (macos-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Waiting to run
Build / makefile (macos-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Waiting to run
Build / makefile (macos-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Waiting to run
Build / makefile (ubuntu-latest, besm6 imlac tt2500 microvax3900 microvax1 rtvax1000 vaxstation3100m76 vaxstation4000m60) (push) Waiting to run
Build / makefile (ubuntu-latest, id16 id32 sds lgp h316 cdc1700 swtp6800mp-a swtp6800mp-a2 tx-0 ssem b5500 sage pdq3 alpha) (push) Waiting to run
Build / makefile (ubuntu-latest, microvax2 vax730 vax750 vax780 vax8200 vax8600 microvax2000 infoserver100 infoserver150vxt microvax3100 microvax3100e vaxstation3100m30 vaxstation3100m38) (push) Waiting to run
Build / makefile (ubuntu-latest, microvax3100m80 vaxstation4000vlc infoserver1000 nova eclipse hp2100 hp3000 i1401 i1620 s3 altair altairz80 gri i7094) (push) Waiting to run
Build / makefile (ubuntu-latest, pdp1 pdp4 pdp6 pdp7 pdp8 pdp9 pdp10 pdp10-ka pdp10-ki pdp10-kl pdp10-ks pdp11 pdp15 vax) (push) Waiting to run
Build / makefile (ubuntu-latest, scelbi 3b2 i701 i704 i7010 i7070 i7080 i7090 sigma uc15 i650 sel32 intel-mds ibm1130) (push) Waiting to run
This commit is contained in:
parent
732c66eceb
commit
524d540a2a
1 changed files with 31 additions and 24 deletions
55
PDP11/test.c
55
PDP11/test.c
|
@ -166,8 +166,19 @@ void init_stack_registers()
|
|||
STACKFILE[0] = STACKFILE[1] = STACKFILE[2] = STACKFILE[3] = 010000;
|
||||
}
|
||||
|
||||
void emit_branch_instructions(json_t *const target, int *const id)
|
||||
void dump_json(const char *const filename, json_t *const j)
|
||||
{
|
||||
FILE *fh = fopen(filename, "w");
|
||||
json_dumpf(j, fh, JSON_INDENT(1));
|
||||
fclose(fh);
|
||||
|
||||
json_decref(j);
|
||||
}
|
||||
|
||||
void emit_branch_instructions()
|
||||
{
|
||||
int id = 0;
|
||||
json_t *out = json_array();
|
||||
printf("Branch instructions\n");
|
||||
for(int group=0; group<2; group++) {
|
||||
for(int bt=0; bt<8; bt++) {
|
||||
|
@ -196,17 +207,20 @@ void emit_branch_instructions(json_t *const target, int *const id)
|
|||
|
||||
PSW = psw_val;
|
||||
|
||||
json_t *obj = generate_test(instr, id, mem, 1);
|
||||
json_t *obj = generate_test(instr, &id, mem, 1);
|
||||
if (obj)
|
||||
json_array_append_new(target, obj);
|
||||
json_array_append_new(out, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dump_json("pdp1170-valtest-COND-BRANCHES.json", out);
|
||||
}
|
||||
|
||||
void emit_condition_sets(json_t *const target, int *const id)
|
||||
void emit_condition_sets()
|
||||
{
|
||||
int id = 0;
|
||||
json_t *out = json_array();
|
||||
printf("Condition set instructions\n");
|
||||
for(int condition=0; condition<16; condition++) {
|
||||
uint16_t instr = 0240 + condition;
|
||||
|
@ -226,15 +240,18 @@ void emit_condition_sets(json_t *const target, int *const id)
|
|||
|
||||
PSW = psw_val;
|
||||
|
||||
json_t *obj = generate_test(instr, id, mem, 1);
|
||||
json_t *obj = generate_test(instr, &id, mem, 1);
|
||||
if (obj)
|
||||
json_array_append_new(target, obj);
|
||||
json_array_append_new(out, obj);
|
||||
}
|
||||
}
|
||||
dump_json("pdp1170-valtest-CONDITIONS.json", out);
|
||||
}
|
||||
|
||||
void emit_add_sub(json_t *const target, int *const id)
|
||||
void emit_add_sub()
|
||||
{
|
||||
int id = 0;
|
||||
json_t *out = json_array();
|
||||
int count = 0;
|
||||
int total = n_test_values * n_test_values * 2;
|
||||
time_t start = time(NULL);
|
||||
|
@ -262,35 +279,25 @@ void emit_add_sub(json_t *const target, int *const id)
|
|||
|
||||
PSW = 0;
|
||||
|
||||
json_t *obj = generate_test(instr, id, mem, 1);
|
||||
json_t *obj = generate_test(instr, &id, mem, 1);
|
||||
if (obj)
|
||||
json_array_append_new(target, obj);
|
||||
json_array_append_new(out, obj);
|
||||
}
|
||||
|
||||
printf("%.2f%% %f \r", count * 100 / (double)total, total / (double)count * (time(NULL) - start));
|
||||
fflush(NULL);
|
||||
}
|
||||
}
|
||||
dump_json("pdp1170-valtest-ADD_SUB.json", out);
|
||||
}
|
||||
|
||||
void produce_validation_tests()
|
||||
{
|
||||
json_t *out = json_array();
|
||||
srand(123); // for reproducability
|
||||
|
||||
generate_test_values();
|
||||
|
||||
srand(123); // for reproducability
|
||||
|
||||
int id = 0;
|
||||
|
||||
// TODO FIXME opslaan per type in json, id als md5?
|
||||
// emit_branch_instructions(out, &id);
|
||||
|
||||
// emit_condition_sets(out, &id);
|
||||
|
||||
emit_add_sub(out, &id);
|
||||
|
||||
FILE *fh = fopen("testset.json", "w");
|
||||
json_dumpf(out, fh, JSON_INDENT(2));
|
||||
fclose(fh);
|
||||
emit_branch_instructions();
|
||||
emit_condition_sets();
|
||||
emit_add_sub();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue