From 35bdeb2fd092a25d525e83d023a62f00665fe1c9 Mon Sep 17 00:00:00 2001 From: Olivier Muller Date: Tue, 4 Nov 2025 16:58:14 +0100 Subject: [PATCH 1/3] patch du Makefile pour les pb de conflits scratch ENsimag --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4c68c9d..3a45ce4 100644 --- a/Makefile +++ b/Makefile @@ -97,7 +97,7 @@ mill: autotest: mill compile ##! Lance la simulation automatique pour tous les tests ou juste celui fourni dans PROG @PROOT=$(PWD) ./mill TPchisel.test.testOnly $(TOP_REP).$(TOP_TEST) $(FILTRE_TEST) -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 @@ -182,5 +182,7 @@ fpga: download.bit $(COMMON_DIR)/programFPGA.vivado.tcl check_hw ##! Génére le , " Programmation",prog.log ) ##@ Nettoyage +TMPREP = /scratch/$(LOGNAME) clean: ##! Fais le nettoyage $(call q, rm -rf $(TOCLEAN),) + @if [ -e $(TMPREP) ] && [ ! -d $(TMPREP) ]; then rm -f $(TMPREP) ;fi From fa03cb14d8e0f3ce946f7b7ed17fd1726dddaf9b Mon Sep 17 00:00:00 2001 From: Frederic Petrot Date: Tue, 4 Nov 2025 22:29:10 +0100 Subject: [PATCH 2/3] Changement de la multiplication dans invaders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Afin d'éviter les problèmes d'édition de liens avec l'option -Os sous gcc-15 --- bench/invaders.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bench/invaders.c b/bench/invaders.c index 3e59fb5..030f340 100644 --- a/bench/invaders.c +++ b/bench/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) From d19b059cb74c870536545638e0a521dbf4b485a8 Mon Sep 17 00:00:00 2001 From: Olivier Muller Date: Wed, 5 Nov 2025 10:51:43 +0100 Subject: [PATCH 3/3] Makefile: patch d'un bug sur la compilation en mode bavard --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3a45ce4..92fa1fe 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ COMMON_DIR := common 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 @@ -71,7 +71,7 @@ $(MEM_DIR)/%.elf: $(BENCH_DIR)/%.s |$(MEM_DIR) $(CC) $(CFLAGS) -o $@ $<, " Compilation $<",$@.log) $(MEM_DIR)/%.mem: $(MEM_DIR)/%.elf |$(MEM_DIR) $(call q,\ - $(OBJDUMP) $(ODFLAGS) $< | awk -f $(OBTOMEM) | awk -f common/fix_mem.awk," Génération de $@",$@) + $(OBJDUMP) $(ODFLAGS) $< | awk -f $(OBTOMEM) | awk -f common/fix_mem.awk > $@) ###############################################################################