OpenCores
URL https://opencores.org/ocsvn/test_project/test_project/trunk

Subversion Repositories test_project

[/] [test_project/] [trunk/] [sim/] [bin/] [Makefile] - Diff between revs 55 and 56

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 55 Rev 56
Line 125... Line 125...
ICARUS_VVP=vvp
ICARUS_VVP=vvp
ICARUS_COMMAND_FILE=icarus.scr
ICARUS_COMMAND_FILE=icarus.scr
VLT_COMMAND_FILE=verilator.scr
VLT_COMMAND_FILE=verilator.scr
SIM_SUCCESS_MESSAGE=deaddead
SIM_SUCCESS_MESSAGE=deaddead
 
 
 
ARCH_SIM_EXE=or32-elf-sim
 
ARCH_SIM_CFG_FILE=or1ksim-orpsocv2.cfg
 
 
# If USE_SDRAM is defined we'll add it to the simulator's defines on the
# If USE_SDRAM is defined we'll add it to the simulator's defines on the
# command line becuase it's used by many different modules and it's easier
# command line becuase it's used by many different modules and it's easier
# to do it this way than make them all include a file.
# to do it this way than make them all include a file.
ifdef USE_SDRAM
ifdef USE_SDRAM
RTL_SIM_FLAGS += "-D USE_SDRAM=$(USE_SDRAM)"
RTL_SIM_FLAGS += "-D USE_SDRAM=$(USE_SDRAM)"
Line 425... Line 428...
# Verilator test loop
# Verilator test loop
################################################################################
################################################################################
 
 
# Verilator defaults to internal memories
# Verilator defaults to internal memories
vlt-tests: prepare_sw_uart_printf prepare_rtl prepare_vlt
vlt-tests: prepare_sw_uart_printf prepare_rtl prepare_vlt
 
        @if [ ! -d $(SIM_RESULTS_DIR) ]; then mkdir -p $(SIM_RESULTS_DIR); fi
        @echo
        @echo
        @echo "Beginning loop that will complete the following tests: $(TESTS)"
        @echo "Beginning loop that will complete the following tests: $(TESTS)"
        @echo
        @echo
        @for TEST in $(TESTS); do \
        @for TEST in $(TESTS); do \
                echo "################################################################################"; \
                echo "################################################################################"; \
Line 452... Line 456...
                TESTS_PERFORMED=`expr $$TESTS_PERFORMED + 1`;\
                TESTS_PERFORMED=`expr $$TESTS_PERFORMED + 1`;\
        done; \
        done; \
        echo "Test results: "$$TESTS_PASSED" out of "$$TESTS_PERFORMED" tests passed"; echo
        echo "Test results: "$$TESTS_PASSED" out of "$$TESTS_PERFORMED" tests passed"; echo
 
 
 
 
 
 
 
################################################################################
 
# Architectural simulator test loop
 
################################################################################
 
 
 
# Verilator defaults to internal memories
 
sim-tests: prepare_sw_uart_printf
 
        @if [ ! -d $(SIM_RESULTS_DIR) ]; then mkdir -p $(SIM_RESULTS_DIR); fi
 
        @echo
 
        @echo "Beginning loop that will complete the following tests: $(TESTS)"
 
        @echo
 
        @for TEST in $(TESTS); do \
 
                echo "################################################################################"; \
 
                echo; \
 
                echo "\t#### Current test: $$TEST ####"; echo; \
 
                echo "\t#### Compiling software ####"; echo; \
 
                CURRENT_TEST_SW_DIR=$(SW_DIR)/`echo $$TEST | cut -d "-" -f 1`; \
 
                $(MAKE) -C $$CURRENT_TEST_SW_DIR $$TEST $(TEST_SW_MAKE_OPTS) UART_PRINTF=1; \
 
                rm -f $(SIM_RUN_DIR)/$(SIM_SRAM_MEM_FILE); \
 
                ln -s $$CURRENT_TEST_SW_DIR/$$TEST.or32 $(SIM_RUN_DIR)/.; \
 
                echo;echo "\t#### Launching architectural simulator ####"; \
 
                time -p $(ARCH_SIM_EXE) --nosrv -f $(SIM_BIN_DIR)/$(ARCH_SIM_CFG_FILE) $$TEST.or32 > $(SIM_RESULTS_DIR)/$$TEST-or1ksim.log 2>&1; \
 
                if [ $$? -gt 0 ]; then exit $$?; fi; \
 
                if [ `tail -n 10 $(SIM_RESULTS_DIR)/$$TEST-or1ksim.log | grep -c $(SIM_SUCCESS_MESSAGE)` -gt 0 ]; then \
 
                        TEST_RESULT=1; \
 
                fi; \
 
                echo; echo "\t####"; \
 
                if [ $$TEST_RESULT -gt 0 ]; then \
 
                        echo "\t#### Test $$TEST PASSED ####";TESTS_PASSED=`expr $$TESTS_PASSED + 1`;\
 
                else    echo "\t#### Test $$TEST FAILED ####";\
 
                fi; \
 
                echo "\t####"; echo; \
 
                TESTS_PERFORMED=`expr $$TESTS_PERFORMED + 1`;\
 
                unlink $(SIM_RUN_DIR)/$$TEST.or32; \
 
        done; \
 
        echo "Test results: "$$TESTS_PASSED" out of "$$TESTS_PERFORMED" tests passed"; echo
 
 
 
 
 
 
################################################################################
################################################################################
# Cleaning rules
# Cleaning rules
################################################################################
################################################################################
 
 
clean-sw:
clean-sw:

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.