OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [rtl/] [make_ise/] [generic_xflow_cpld.mk] - Blame information for rev 36

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

Line No. Rev Author Line
1 29 wfjm
# $Id: generic_xflow_cpld.mk 642 2015-02-06 18:53:12Z mueller $
2 2 wfjm
#
3 29 wfjm
# Copyright 2010-2013 by Walter F.J. Mueller 
4
# License disclaimer see LICENSE_gpl_v2.txt in $RETROBASE directory
5
#
6 2 wfjm
#  Revision History:
7
# Date         Rev Version  Comment
8 22 wfjm
# 2013-10-12   539   1.2    use xtwi
9 18 wfjm
# 2013-01-05   470   1.1.1  remove '-r' from all non-dir clean rm's
10 12 wfjm
# 2011-08-13   405   1.1    renamed, moved to rtl/make;
11 2 wfjm
# 2010-03-13   268   1.0    Initial version, cloned from .xflow Rev 252
12
#---
13
#
14
# setup default device
15
#
16
ifndef ISE_PATH
17
ISE_PATH =  xc2c64a-7-vq44
18
endif
19
#
20
# setup defaults for xflow option files for synthesis and implementation
21
#
22
ifndef XFLOWOPT_SYN
23
XFLOWOPT_SYN = xst_vhdl.opt
24
endif
25
#
26
ifndef XFLOWOPT_IMP
27
XFLOWOPT_IMP = balanced.opt
28
endif
29
#
30
XFLOW    = xflow -p ${ISE_PATH}
31
#
32
# $@ first target
33
# $< first dependency
34
# $* stem in rule match
35
#
36
# when chaining, don't delete 'expensive' intermediate files:
37
.SECONDARY :
38
#
39
# Synthesize (xst)
40
#   input:   %.prj      project file
41
#   output:  %.ngc
42
#            %_xst.log  xst log file
43
#
44
# Note: removed "cp ${RETROBASE}/vlib/${XFLOWOPT_SYN} ./ise" option
45
#
46
%.ngc: %.vbom
47
        if [ ! -d ./ise ]; then mkdir ./ise; fi
48
        (cd ./ise; vbomconv --xst_prj ../$< > $*.prj)
49
        (cd ./ise; touch $*.xcf)
50
        if [ -r  $*.xcf ]; then cp $*.xcf ./ise; fi
51
        if [ -r ${XFLOWOPT_SYN} ]; then cp ${XFLOWOPT_SYN} ./ise; fi
52 22 wfjm
        xtwi ${XFLOW} -wd ise -synth ${XFLOWOPT_SYN} $*.prj
53 2 wfjm
        (cd ./ise; chmod -x *.* )
54
        if [ -r ./ise/$*.ngc ]; then cp -p ./ise/$*.ngc .; fi
55
        if [ -r ./ise/$*_xst.log ]; then cp -p ./ise/$*_xst.log .; fi
56
        @ echo "==============================================================="
57
        @ echo "*     Makefile.xflow: XST Diagnostic Summary                  *"
58
        @ echo "==============================================================="
59
        @ grep -i -A 1 ":.*:" $*_xst.log
60
        @ echo "==============================================================="
61
#
62
# the following rule needed to generate an %_*sim.vhd in a ./tb sub-directory
63
# it will look for a matching vbom in the parent directory
64
%.ngc: ../%.vbom
65
        if [ ! -d ./ise ]; then mkdir ./ise; fi
66
        (cd ./ise; vbomconv --xst_prj ../$< > $*.prj)
67
        (cd ./ise; touch $*.xcf)
68
        if [ -r  $*.xcf ]; then cp $*.xcf ./ise; fi
69
        if [ -r ${XFLOWOPT_SYN} ]; then cp ${XFLOWOPT_SYN} ./ise; fi
70 22 wfjm
        xtwi ${XFLOW} -wd ise -synth ${XFLOWOPT_SYN} $*.prj
71 2 wfjm
        (cd ./ise; chmod -x *.* )
72
        if [ -r ./ise/$*.ngc ]; then cp -p ./ise/$*.ngc .; fi
73
        if [ -r ./ise/$*_xst.log ]; then cp -p ./ise/$*_xst.log .; fi
74
        @ echo "==============================================================="
75
        @ echo "*     Makefile.xflow: XST Diagnostic Summary                  *"
76
        @ echo "==============================================================="
77
        @ grep -i -A 1 ":.*:" $*_xst.log
78
        @ echo "==============================================================="
79
#
80
# Fit (map + cpldfit +
81
#   input:   %.ngc      project file
82
#   output:  %.ncd
83
#            %.jed
84
#            %_tra.log  translate (ngdbuild) log file (renamed %.bld)
85
#            %_fit.log  cpldfit log file              (renamed %.rpt)
86
#            %_tim.log  timing analyser log file      (renamed %.tim)
87
#            %_pad.log  pad file                      (renamed %.pad)
88
#
89
# Note: removed "cp ${RETROBASE}/vlib/balanced.opt" option
90
#       currently ise 'density.opt' as steering file
91
#
92
%.ncd %.jed: %.ngc
93
        if [ ! -d ./ise ]; then mkdir ./ise; fi
94
        if [ -r $*.ngc ]; then cp -p $*.ngc ./ise; fi
95
        if [ -r $*.ucf ]; then cp -p $*.ucf ./ise; fi
96
        if [ -r ${XFLOWOPT_IMP} ]; then cp -p ${XFLOWOPT_IMP} ./ise; fi
97 22 wfjm
        xtwi ${XFLOW} -wd ise -fit ${XFLOWOPT_IMP} $<
98 2 wfjm
        (cd ./ise; chmod -x *.* )
99
        if [ -r ./ise/$*.ncd ]; then cp -p ./ise/$*.ncd .; fi
100
        if [ -r ./ise/$*.jed ]; then cp -p ./ise/$*.jed .; fi
101
        if [ -r ./ise/$*.bld ]; then cp -p ./ise/$*.bld ./$*_tra.log; fi
102
        if [ -r ./ise/$*.rpt ]; then cp -p ./ise/$*.rpt ./$*_fit.log; fi
103
        if [ -r ./ise/$*.tim ]; then cp -p ./ise/$*.tim ./$*_tim.log; fi
104
        if [ -r ./ise/$*.pad ]; then cp -p ./ise/$*.pad ./$*_pad.log; fi
105
#
106
# generate dep_xst files from vbom
107
#
108
%.dep_xst: %.vbom
109
        vbomconv --dep_xst $< > $@
110
#
111
# generate cpp'ed ucf files from ucf_cpp
112
#
113
%.ucf : %.ucf_cpp
114
        cpp $*.ucf_cpp $*.ucf
115
#
116
# generate nested dependency rules for cpp'ed ucf files from ucf_cpp
117
#
118
%.dep_ucf_cpp : %.ucf_cpp
119
        cpp -MM $*.ucf_cpp | sed 's/\.o:/\.ucf:/' > $*.dep_ucf_cpp
120
#
121 12 wfjm
.PHONY : ise_clean ise_tmp_clean
122 2 wfjm
#
123
ise_clean: ise_tmp_clean
124 18 wfjm
        rm -f *.ngc
125
        rm -f *.ncd
126
        rm -f *.jed
127
        rm -f *_xst.log
128
        rm -f *_tra.log
129
        rm -f *_fit.log
130
        rm -f *_tim.log
131
        rm -f *_pad.log
132 2 wfjm
#
133
ise_tmp_clean:
134
        rm -rf ./ise
135
#

powered by: WebSVN 2.1.0

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