diff options
author | Frederick Yin <fkfd@fkfd.me> | 2022-08-16 11:54:23 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2022-08-16 11:54:23 +0800 |
commit | 9542deeb483a00b6fabed7574720926ce97d7511 (patch) | |
tree | 0f2c1f72c03dd4693fd59df67544d2a4dddc5494 /projects/02/ALU-nostat.tst | |
parent | 9c0cb1d1c32724fc95ac9548e4f8d873d3adaccc (diff) |
Projects, 01-06 completed
Diffstat (limited to 'projects/02/ALU-nostat.tst')
-rw-r--r-- | projects/02/ALU-nostat.tst | 353 |
1 files changed, 353 insertions, 0 deletions
diff --git a/projects/02/ALU-nostat.tst b/projects/02/ALU-nostat.tst new file mode 100644 index 0000000..fa3e448 --- /dev/null +++ b/projects/02/ALU-nostat.tst @@ -0,0 +1,353 @@ +// This file is part of the materials accompanying the book
+// "The Elements of Computing Systems" by Nisan and Schocken,
+// MIT Press. Book site: www.idc.ac.il/tecs
+// File name: projects/02/ALU-nostat.tst
+
+// ALU-nostat.tst provides a partial test of the ALU chip.
+// It IS NOT a replacement for ALU.tst.
+
+// ALU-nostat.tst tests only the computation part of the ALU.
+// The 'zr' and 'ng' status outputs are ignored.
+
+// This test lets you concentrate on getting the ALU computation right without the
+// additional task of handling the status outputs.
+
+// Once your ALU passes ALU-nostat.tst you need to test it with ALU.tst.
+// This way, any comparison failures during ALU.tst will be caused by errors in
+// the handling of the 'zr' and 'ng' status outputs.
+
+load ALU.hdl,
+output-file ALU-nostat.out,
+compare-to ALU-nostat.cmp,
+output-list x%B1.16.1 y%B1.16.1 zx%B1.1.1 nx%B1.1.1 zy%B1.1.1
+ ny%B1.1.1 f%B1.1.1 no%B1.1.1 out%B1.16.1;
+
+set x %B0000000000000000,
+set y %B1111111111111111,
+
+set zx 1,
+set nx 0,
+set zy 1,
+set ny 0,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 1,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 1,
+set ny 0,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 1,
+set ny 1,
+set f 0,
+set no 0,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 0,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 1,
+set ny 1,
+set f 0,
+set no 1,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 0,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 1,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 1,
+set zy 1,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 1,
+set ny 1,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 0,
+set ny 0,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 0,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 0,
+set ny 0,
+set f 0,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 1,
+set zy 0,
+set ny 1,
+set f 0,
+set no 1,
+eval,
+output;
+
+set x %B101101110100000,
+set y %B001111011010010,
+
+set zx 1,
+set nx 0,
+set zy 1,
+set ny 0,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 1,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 1,
+set ny 0,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 1,
+set ny 1,
+set f 0,
+set no 0,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 0,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 1,
+set ny 1,
+set f 0,
+set no 1,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 0,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 1,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 1,
+set zy 1,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 1,
+set ny 1,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 1,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 0,
+set ny 0,
+set f 1,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 1,
+set zy 0,
+set ny 0,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 0,
+set ny 1,
+set f 1,
+set no 1,
+eval,
+output;
+
+set zx 0,
+set nx 0,
+set zy 0,
+set ny 0,
+set f 0,
+set no 0,
+eval,
+output;
+
+set zx 0,
+set nx 1,
+set zy 0,
+set ny 1,
+set f 0,
+set no 1,
+eval,
+output;
|