-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Warren Toomey
committed
Apr 24, 2019
1 parent
2c03a65
commit cffa64d
Showing
4 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
all: alu.rom ucode.rom | ||
# You need to assemble a source code file to make instr.rom before | ||
# you run 'make' to run the Verilog version of the CPU | ||
|
||
# Always run the Verilog simulation | ||
run: a.out instr.rom ucode.rom alu.rom | ||
vvp a.out | ||
|
||
|
||
# Run the Verilog simulation if the assembled program or any of the | ||
# Verilog files have changed | ||
test.vcd: a.out instr.rom ucode.rom alu.rom | ||
|
||
# Build the Verilog simulation | ||
a.out: 74138.v 74139.v 74161.v 74251.v 74574.v 74593.v \ | ||
icarus_tb.v ram.v rom.v tbhelper.v ttlcsvon8.v uart.v | ||
iverilog -g2012 icarus_tb.v | ||
|
||
# Generate the ALU ROM's contents | ||
alu.rom: gen_alu | ||
./gen_alu | ||
|
||
# Generate the Decode ROM's contents | ||
ucode.rom: microcode gen_ucode | ||
./gen_ucode | ||
|
||
# Clean out the Verilog simulation and the assembled program | ||
# but keep the ALU and Decode ROMs | ||
clean: | ||
rm -rf a.out *.vcd instr.rom | ||
|
||
# Clean out everything | ||
realclean: clean | ||
rm -rf *.rom |