Merges upstream
This commit is contained in:
10
Makefile
10
Makefile
@@ -3,7 +3,7 @@ FPGA_BOARD = zybo_z7_10
|
|||||||
|
|
||||||
TOCLEAN = $(filter %log %.jou %.rpt %.mmi %.dcp %.csv\
|
TOCLEAN = $(filter %log %.jou %.rpt %.mmi %.dcp %.csv\
|
||||||
%.wdb vivado% updatemem% usage_statistics_webtalk%,$(wildcard *))
|
%.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é
|
# macro de verbosité
|
||||||
VERB := 0
|
VERB := 0
|
||||||
@@ -101,7 +101,7 @@ autotest: mill test-bench/mem/tests/$(PROG).mem ##! Lance la simulation automati
|
|||||||
testall: mill compile
|
testall: mill compile
|
||||||
@PROOT=$(PWD) NPROC=$(shell nproc) ./mill TPchisel.test.testOnly $(TOP_REP).ZzTopAllSpec
|
@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)
|
@$(call check_vars,PROG)
|
||||||
@PROOT=$(PWD) PROG=$(PROG) CYCLES=$(CYCLES) ./mill TPchisel.test.testOnly $(TOP_REP).$(TOP_TEST) -- -DemitVcd=1 -z "gtkwave"
|
@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
|
@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) $<
|
openFPGALoader -b $(FPGA_BOARD) $<
|
||||||
|
|
||||||
##@ Nettoyage
|
##@ Nettoyage
|
||||||
|
TMPREP = /scratch/$(LOGNAME)
|
||||||
clean: ##! Fais le nettoyage
|
clean: ##! Fais le nettoyage
|
||||||
|
<<<<<<< HEAD
|
||||||
rm -rf $(TOCLEAN)
|
rm -rf $(TOCLEAN)
|
||||||
|
=======
|
||||||
|
$(call q, rm -rf $(TOCLEAN),)
|
||||||
|
@if [ -e $(TMPREP) ] && [ ! -d $(TMPREP) ]; then rm -f $(TMPREP) ;fi
|
||||||
|
>>>>>>> d19b059cb74c870536545638e0a521dbf4b485a8
|
||||||
|
|||||||
@@ -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_hi = (volatile uint32_t *)CLINT_TIMER_CMP_HI;
|
||||||
static volatile uint32_t *timer_cmp_lo = (volatile uint32_t *)CLINT_TIMER_CMP_LO;
|
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;
|
uint64_t res = 0;
|
||||||
while (y != 0) {
|
while (y != 0) {
|
||||||
if (y % 2 == 1) {
|
if (y & 1) {
|
||||||
res += x;
|
res += x;
|
||||||
}
|
}
|
||||||
x <<= 1;
|
x <<= 1;
|
||||||
@@ -148,7 +148,7 @@ uint32_t mult(uint64_t x, uint64_t y)
|
|||||||
void timer_set(uint32_t period, uint32_t time)
|
void timer_set(uint32_t period, uint32_t time)
|
||||||
{
|
{
|
||||||
uint64_t now = *timer;
|
uint64_t now = *timer;
|
||||||
*timer_cmp = now + mult(((uint64_t)period >> 8), time);
|
*timer_cmp = now + mult(period >> 8, time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void timer_wait(void)
|
void timer_wait(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user