Skip to content

Commit

Permalink
Merge branch '#2' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
maruuusa83 committed Oct 5, 2018
2 parents cc61b25 + c24647c commit c1a69a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ BIN_DIR=$(PROJECT_ROOT)/bin
TEST_DIR=$(PROJECT_ROOT)/test

SRC_DIR=$(PROJECT_ROOT)/src
SRC=riscv.v lib/gpregs.v lib/alu.v lib/alu_controller.v lib/controller.v
SRC_DIR_LST=$(shell find $(SRC_DIR) -type d)
SRC=$(foreach dir, $(SRC_DIR_LST), $(wildcard $(dir)/*.v))

export PROJECT_ROOT
export BIN_DIR
Expand Down
11 changes: 6 additions & 5 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
# https://github.com/maruuusa83/risc-v/blob/master/LICENSE
#

TEST_NAME=tb_riscv.v lib/tb_gpregs.v lib/tb_alu.v lib/tb_alu_controller.v lib/tb_controller.v tb_r_type.v

TEST_DIR=$(PROJECT_ROOT)/test
TEST_EXECUTABLE=$(TEST_NAME:.v=.o)
TEST_DIR_LST=$(shell find $(TEST_DIR) -type d)
TEST_SRC=$(foreach dir, $(TEST_DIR_LST), $(wildcard $(dir)/tb_*.v))

TEST_EXECUTABLE=$(TEST_SRC:.v=.o)

IV=iverilog
IVFLAGS=-g2005-sv -DDEBUG
Expand All @@ -18,9 +19,9 @@ IVFLAGS=-g2005-sv -DDEBUG
all: $(TEST_EXECUTABLE)

.v.o:
$(IV) $(IVFLAGS) -o $@ $< $(addprefix $(SRC_DIR)/, $(SRC))
$(IV) $(IVFLAGS) -o $@ $< $(SRC)

tb_riscv.o: $(addprefix $(SRC_DIR)/, $(SRC))
tb_riscv.o: $(SRC)
lib/tb_gpregs.o: $(SRC_DIR)/lib/gpregs.v
lib/tb_alu.o: $(SRC_DIR)/lib/alu.v
lib/tb_controller.o: $(SRC_DIR)/lib/controller.v
Expand Down

0 comments on commit c1a69a6

Please sign in to comment.