OpenCores
URL https://opencores.org/ocsvn/a-z80/a-z80/trunk

Subversion Repositories a-z80

[/] [a-z80/] [trunk/] [tools/] [zmac/] [make_fpga.bat] - Diff between revs 3 and 8

Show entire file | Details | Blame | View Log

Rev 3 Rev 8
Line 1... Line 1...
@echo off
@echo off
Rem
Rem
Rem     Creates an Intel HEX file format from a Z80 source file.
Rem     Assembles Z80 source file into object code and generates various
Rem     This hex file is loaded into the ROM module for both the ModelSim
Rem     formats of that code to be used by FPGA test projects.
Rem     and to be included into the target FPGA data file at the "host" level.
Rem
 
Rem     Intel HEX files are used by ModelSim and Altera synthesis,
 
Rem     COE and MIF files are used by Xilinx and its ISim simulation.
Rem
Rem
Rem     Give it an argument of the ASM file you want to use, or you can simply drag
Rem     Give it an argument of the ASM file you want to use, or you can simply drag
Rem     and drop an asm file into it. If you drop an ASM file and there were errors,
Rem     and drop an asm file into it. If you drop an ASM file and there were errors,
Rem     this script will keep the DOS window open so you can see the errors.
Rem     this script will keep the DOS window open so you can see the errors.
Rem
Rem
zmac.exe --zmac %1
zmac.exe --zmac %1
if errorlevel 1 goto error
if errorlevel 1 goto error
bin2hex.exe zout\%~n1.cim fpga.hex
bin2hex.exe zout\%~n1.cim fpga.hex
if errorlevel 1 goto error
if errorlevel 1 goto error
 
python bin2coe.py zout\%~n1.cim ram.coe
 
if errorlevel 1 goto error
 
python bin2mif.py --simple zout\%~n1.cim ram.mif
 
if errorlevel 1 goto error
 
 
Rem     Copy hex files to their target Quartus/ModelSim host directories
Rem     Copy hex files to their target Quartus/ModelSim host directories
copy /Y fpga.hex ..\..\host\basic
copy /Y fpga.hex ..\..\host\basic_de1
copy /Y fpga.hex ..\..\host\basic\simulation\modelsim
copy /Y fpga.hex ..\..\host\basic_de1\simulation\modelsim
 
 
 
Rem     Copy .mif and .coe files to their target Xilinx host directories
 
copy /Y ram.mif ..\..\host\basic_nexys3\work
goto end
goto end
 
 
:error
:error
@echo ------------------------------------------------------
@echo ------------------------------------------------------
@echo Errors assembling %1
@echo Errors processing %1
@echo ------------------------------------------------------
@echo ------------------------------------------------------
cmd
cmd
:end
:end
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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