adumont / hrm-cpu

Human Resource Machine - CPU Design #HRM
https://twitter.com/i/moments/1017515777610649601
GNU General Public License v3.0
71 stars 8 forks source link

Tests in Python? #59

Open adumont opened 4 years ago

adumont commented 4 years ago

HW tests are run from python, would make sense to do the same with sw tests?

Maybe Python --> Verilator? (instead of iverilog testbench?) --> rewrite the testbench?

Also programmed tests instead of static tests like now?

Static tests: test.in / test.out are written to files, beforehand.

Programmed tests I mean I would write something like

for example, test for A*B, 15 rounds with random values:

for i in range(15) a=random(10) b=random(25) in.append(a) in.append(b) out.append(a*b)

runTest("mul",in,out)