diff --git a/Makefile b/Makefile index 80fe676..fe32c58 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ FPGA_BOARD = zybo_z7_10 TOCLEAN = $(filter %log %.jou %.rpt %.mmi %.dcp %.csv\ %.wdb vivado% updatemem% usage_statistics_webtalk%,$(wildcard *)) -TOCLEAN += $(wildcard _*) .Xil out RTL build download.bit +TOCLEAN += $(wildcard _*) .Xil out RTL build download.bit $(MEM_DIR) # macro de verbosité VERB := 0 @@ -101,7 +101,7 @@ autotest: mill test-bench/mem/tests/$(PROG).mem ##! Lance la simulation automati testall: mill compile @PROOT=$(PWD) NPROC=$(shell nproc) ./mill TPchisel.test.testOnly $(TOP_REP).ZzTopAllSpec -simulation: compile ##! Lance gtkwave sur le test fourni dans PROG +simulation: mill compile ##! Lance gtkwave sur le test fourni dans PROG @$(call check_vars,PROG) @PROOT=$(PWD) PROG=$(PROG) CYCLES=$(CYCLES) ./mill TPchisel.test.testOnly $(TOP_REP).$(TOP_TEST) -- -DemitVcd=1 -z "gtkwave" @gtkwave -a common/config.gtkw ./build/chiselsim/ZzTopSpec/Simulation-pour-gtkwave/workdir-verilator/trace.vcd @@ -163,5 +163,11 @@ flash: download.bit openFPGALoader -b $(FPGA_BOARD) $< ##@ Nettoyage +TMPREP = /scratch/$(LOGNAME) clean: ##! Fais le nettoyage +<<<<<<< HEAD rm -rf $(TOCLEAN) +======= + $(call q, rm -rf $(TOCLEAN),) + @if [ -e $(TMPREP) ] && [ ! -d $(TMPREP) ]; then rm -f $(TMPREP) ;fi +>>>>>>> d19b059cb74c870536545638e0a521dbf4b485a8 diff --git a/bench/programs/invaders.c b/bench/programs/invaders.c index 3e59fb5..030f340 100644 --- a/bench/programs/invaders.c +++ b/bench/programs/invaders.c @@ -132,11 +132,11 @@ static volatile uint32_t *timer_lo = (volatile uint32_t *)CLINT_TIMER_LOW; static volatile uint32_t *timer_cmp_hi = (volatile uint32_t *)CLINT_TIMER_CMP_HI; static volatile uint32_t *timer_cmp_lo = (volatile uint32_t *)CLINT_TIMER_CMP_LO; -uint32_t mult(uint64_t x, uint64_t y) +uint64_t mult(uint32_t x, uint32_t y) { uint64_t res = 0; while (y != 0) { - if (y % 2 == 1) { + if (y & 1) { res += x; } x <<= 1; @@ -148,7 +148,7 @@ uint32_t mult(uint64_t x, uint64_t y) void timer_set(uint32_t period, uint32_t time) { uint64_t now = *timer; - *timer_cmp = now + mult(((uint64_t)period >> 8), time); + *timer_cmp = now + mult(period >> 8, time); } void timer_wait(void)