blob: 25583833bb53cd46ca625e18c26fa614428655e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// common types for nandgame
// learning:
// you need an include guard if you include files
// in multiple files.
// otherwise, iverilog and verilator will
// complain when loading the test bench and the
// corresponding uut.
`ifndef NANDGAME_TYPES_SV
`define NANDGAME_TYPES_SV
typedef enum logic [1:0] {
LOGIC_AND = 2'b00,
LOGIC_OR = 2'b01,
LOGIC_XOR = 2'b10,
LOGIC_NEGT = 2'b11
} LogicCode;
typedef enum logic [1:0] {
ARITH_PLUS = 2'b00,
ARITH_INC = 2'b01,
ARITH_MINUS = 2'b10,
ARITH_DEC = 2'b11
} ArithCode;
`endif
|