forked from tanchou/Verilog
Loopback fifo fonctionne mais avec 3 valeur de décalage
This commit is contained in:
45
Semaine_5/UART_ULTRASON_COMMANDS/scripts/build.bat
Normal file
45
Semaine_5/UART_ULTRASON_COMMANDS/scripts/build.bat
Normal file
@@ -0,0 +1,45 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
rem === Aller à la racine du projet ===
|
||||
cd /d %~dp0\..
|
||||
|
||||
rem === Config de base ===
|
||||
set DEVICE=GW2AR-LV18QN88C8/I7
|
||||
set BOARD=tangnano20k
|
||||
set TOP=top_uart_ultrason
|
||||
set CST_FILE=%TOP%.cst
|
||||
set JSON_FILE=runs/%TOP%.json
|
||||
set PNR_JSON=runs/pnr_%TOP%.json
|
||||
set BITSTREAM=runs/%TOP%.fs
|
||||
|
||||
rem === Créer le dossier runs si nécessaire ===
|
||||
if not exist runs (
|
||||
mkdir runs
|
||||
)
|
||||
|
||||
echo === Étape 1 : Synthèse avec Yosys ===
|
||||
yosys -p "read_verilog -sv src/verilog/%TOP%.v IP/verilog/ultrasonic_fpga.v IP/verilog/uart_tx_fifo.v IP/verilog/fifo.v IP/verilog/uart_tx.v; synth_gowin -top %TOP% -json %JSON_FILE%"
|
||||
if errorlevel 1 goto error
|
||||
|
||||
echo === Étape 2 : Placement & Routage avec nextpnr-himbaechel ===
|
||||
nextpnr-himbaechel --json %JSON_FILE% --write %PNR_JSON% --device %DEVICE% --vopt cst=constraints/%CST_FILE% --vopt family=GW2A-18C
|
||||
if errorlevel 1 goto error
|
||||
|
||||
echo === Étape 3 : Packing avec gowin_pack ===
|
||||
gowin_pack -d %DEVICE% -o %BITSTREAM% %PNR_JSON%
|
||||
if errorlevel 1 goto error
|
||||
|
||||
echo === Étape 4 : Flash avec openFPGALoader ===
|
||||
openFPGALoader -b %BOARD% %BITSTREAM%
|
||||
if errorlevel 1 goto error
|
||||
|
||||
echo === Compilation et flash réussis ===
|
||||
goto end
|
||||
|
||||
:error
|
||||
echo === Une erreur est survenue ===
|
||||
|
||||
:end
|
||||
endlocal
|
||||
pause
|
Reference in New Issue
Block a user