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

Subversion Repositories a-z80

[/] [a-z80/] [trunk/] [tools/] [zmac/] [make_fpga.bat] - Blame information for rev 17

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 gdevic
@echo off
2
Rem
3 8 gdevic
Rem     Assembles Z80 source file into object code and generates various
4
Rem     formats of that code to be used by FPGA test projects.
5 3 gdevic
Rem
6 8 gdevic
Rem     Intel HEX files are used by ModelSim and Altera synthesis,
7
Rem     COE and MIF files are used by Xilinx and its ISim simulation.
8
Rem
9 3 gdevic
Rem     Give it an argument of the ASM file you want to use, or you can simply drag
10
Rem     and drop an asm file into it. If you drop an ASM file and there were errors,
11
Rem     this script will keep the DOS window open so you can see the errors.
12
Rem
13
zmac.exe --zmac %1
14
if errorlevel 1 goto error
15
bin2hex.exe zout\%~n1.cim fpga.hex
16
if errorlevel 1 goto error
17 8 gdevic
python bin2coe.py zout\%~n1.cim ram.coe
18
if errorlevel 1 goto error
19
python bin2mif.py --simple zout\%~n1.cim ram.mif
20
if errorlevel 1 goto error
21 3 gdevic
 
22
Rem     Copy hex files to their target Quartus/ModelSim host directories
23 8 gdevic
copy /Y fpga.hex ..\..\host\basic_de1
24
copy /Y fpga.hex ..\..\host\basic_de1\simulation\modelsim
25 3 gdevic
 
26 8 gdevic
Rem     Copy .mif and .coe files to their target Xilinx host directories
27
copy /Y ram.mif ..\..\host\basic_nexys3\work
28 3 gdevic
goto end
29
 
30
:error
31
@echo ------------------------------------------------------
32 8 gdevic
@echo Errors processing %1
33 3 gdevic
@echo ------------------------------------------------------
34
cmd
35
:end

powered by: WebSVN 2.1.0

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