最初のページ 戻る 次へ 最後のページ

命令セット(instructionSet.h)

ニーモニックとマシン語の対応は

cpu.vとは独立に記述

/* instructionSet.h */

`define ADD 4'b0000

`define ADC 4'b0001

`define SUB 4'b0010

`define SUC 4'b0011

`define AND 4'b0100

`define OR 4'b0101

`define XOR 4'b0110

`define NOT 4'b0111

`define LD 4'b1000

`define B 4'b1011

`define FIN 4'b1111

これらの命令でプログラムを

つくることができるのか?

cpu.vの

最初でinclude

16進数でもよい