项目作者: acsor

项目描述 :
Automated batch Hardware Simulator tester for the Nand2tetris project.
高级语言: Python
项目地址: git://github.com/acsor/AutoN2T.git
创建时间: 2018-10-23T13:03:50Z
项目社区:https://github.com/acsor/AutoN2T

开源协议:MIT License

下载


AutoN2T

Simple Python script to evaluate a batch of *.tst files by means of the
HardwareSimulator.[sh|bat] command-line interface from the Nand2tetris
project
.

Usage

On the first run, you’ll need to specify the location of the
HardwareSimulator.[sh|bat] executable. You can do that likeso:

  1. ./auton2t.py executable <path to executable>

Afterwards checking the completion of any *.hdl file will be as easy as doing:

  1. ./auton2t.py report <directory containing *.tst files>

As an example

  1. auton2t report nand2tetris/homeworks/first/

would yield on a hypothetical nand2tetris/homeworks/first/ directory

  1. [Hardware Simulator executable in /home/acsor/installs/nand2tetris/tools/HardwareSimulator.sh]
  2. DMux4Way.tst End of script - Comparison ended successfully
  3. Not.tst End of script - Comparison ended successfully
  4. DMux8Way.tst End of script - Comparison ended successfully
  5. Mux16.tst End of script - Comparison ended successfully
  6. Nand16.tst End of script - Comparison ended successfully
  7. Or.tst End of script - Comparison ended successfully
  8. And16.tst End of script - Comparison ended successfully
  9. Or8Way.tst End of script - Comparison ended successfully
  10. Or16.tst End of script - Comparison ended successfully
  11. Mux.tst End of script - Comparison ended successfully
  12. Not16.tst End of script - Comparison ended successfully
  13. DMux.tst End of script - Comparison ended successfully
  14. Mux4Way16.tst End of script - Comparison ended successfully
  15. Xor.tst End of script - Comparison ended successfully
  16. Mux8Way16.tst End of script - Comparison ended successfully
  17. And.tst End of script - Comparison ended successfully

Testing

AutoN2T provides no (unit) testing — mind you, this was just supposed to
be a two-hour break from university duties and I intend not to allocate any
more time to it. If some CPU gets hot please feel free to report it to the
Issues or (better yet) Pull Requests page ;-).

About

AutoN2T is built on top of the argparse module for the command-line
interface and retrocompatible subprocess high-level APIs. Everything else is
just pure Python.