would emit more memory than 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
9635fdda03
commit
65b3baa73b
1 changed files with 58 additions and 10 deletions
68
PDP11/test.c
68
PDP11/test.c
|
@ -123,17 +123,14 @@ json_t *generate_test(uint16_t instruction, int *const id, struct mem_t *mem, si
|
|||
|
||||
json_t *memory_o = json_array();
|
||||
|
||||
json_t *get_mem_i_0 = json_object();
|
||||
json_object_set(get_mem_i_0, "0100", json_integer(PReadW(0100)));
|
||||
json_array_append_new(memory_o, get_mem_i_0);
|
||||
for(size_t i=0; i<n_mem; i++) {
|
||||
char buffer[16];
|
||||
sprintf(buffer, "%06o", mem[i].addr);
|
||||
|
||||
json_t *get_mem_i_2 = json_object();
|
||||
json_object_set(get_mem_i_2, "0102", json_integer(PReadW(0102)));
|
||||
json_array_append_new(memory_o, get_mem_i_2);
|
||||
|
||||
json_t *get_mem_i_4 = json_object();
|
||||
json_object_set(get_mem_i_4, "0104", json_integer(PReadW(0104)));
|
||||
json_array_append_new(memory_o, get_mem_i_4);
|
||||
json_t *get_mem = json_object();
|
||||
json_object_set(get_mem, buffer, json_integer(PReadW(mem[i].addr)));
|
||||
json_array_append_new(memory_o, get_mem);
|
||||
}
|
||||
|
||||
json_object_set(after, "memory", memory_o);
|
||||
|
||||
|
@ -315,6 +312,56 @@ void emit_add_sub_c()
|
|||
dump_json(filename, out);
|
||||
}
|
||||
|
||||
void emit_bit_instructions()
|
||||
{
|
||||
printf("bit instructions\n");
|
||||
const char *const filename = "pdp1170-valtest-BIT-INSTRUCTIONS.json";
|
||||
if (file_exist(filename))
|
||||
return;
|
||||
int id = 0;
|
||||
json_t *out = json_array();
|
||||
int count = 0;
|
||||
int total = n_test_values * n_test_values * 3 * 2 * 2;
|
||||
time_t start = time(NULL);
|
||||
for(int word=0; word<2; word++) {
|
||||
for(int group=3; group<6; group++) {
|
||||
uint16_t instr = (word << 15) | (group << 12) | (1 << 6 /* src=R1 */);
|
||||
|
||||
for(int v1=0; v1<n_test_values; v1++) {
|
||||
for(int v2=0; v2<n_test_values; v2++) {
|
||||
for(int psw_val=0; psw_val<2; psw_val++) {
|
||||
count++;
|
||||
|
||||
init_simh();
|
||||
|
||||
saved_PC = 0100;
|
||||
|
||||
randomize_registers_all_values();
|
||||
REGFILE[0][0] = REGFILE[0][1] = v1;
|
||||
REGFILE[1][0] = REGFILE[1][1] = v2;
|
||||
|
||||
init_stack_registers();
|
||||
|
||||
struct mem_t mem[1] = {
|
||||
{ 0100, instr }
|
||||
};
|
||||
|
||||
PSW = psw_val;
|
||||
|
||||
json_t *obj = generate_test(instr, &id, mem, 1);
|
||||
if (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(filename, out);
|
||||
}
|
||||
|
||||
void produce_validation_tests()
|
||||
{
|
||||
srand(123); // for reproducability
|
||||
|
@ -324,4 +371,5 @@ void produce_validation_tests()
|
|||
emit_branch_instructions();
|
||||
emit_condition_sets();
|
||||
emit_add_sub_c();
|
||||
emit_bit_instructions();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue