Line 62... |
Line 62... |
SRCDIR := ../rtl
|
SRCDIR := ../rtl
|
CPUDIR := ../rtl/cpu
|
CPUDIR := ../rtl/cpu
|
JTAGBUS := wbufifo.v wbubus.v wbucompactlines.v wbucompress.v \
|
JTAGBUS := wbufifo.v wbubus.v wbucompactlines.v wbucompress.v \
|
wbudecompress.v wbudeword.v wbuexec.v wbuidleint.v wbuinput.v \
|
wbudecompress.v wbudeword.v wbuexec.v wbuidleint.v wbuinput.v \
|
wbuoutput.v wbureadcw.v wbusixchar.v wbutohex.v
|
wbuoutput.v wbureadcw.v wbusixchar.v wbutohex.v
|
PERIPHERALS: wbgpio.v wbpwmaudio.v rxuart.v txuart.v uartdev.v \
|
PERIPHERALS:= wbgpio.v wbpwmaudio.v rxuart.v txuart.v uartdev.v \
|
rtcdate.v rtclight.v
|
rtcdate.v rtclight.v sdspi.v spiarbiter.v
|
CPUSRC := zipsystem.v \
|
CPUSRC := zipsystem.v \
|
busdelay.v wbarbiter.v wbdblpriarb.v \
|
busdelay.v wbarbiter.v wbdblpriarb.v icontrol.v \
|
zipcpu.v cpuops.v pfcache.v idecode.v pipemem.v pipefetch.v div.v \
|
zipcpu.v cpuops.v pfcache.v idecode.v pipemem.v pipefetch.v div.v \
|
zipcounter.v zipjiffies.v ziptimer.v wbdmac.v wbwatchdog.v
|
zipcounter.v zipjiffies.v ziptimer.v wbdmac.v wbwatchdog.v
|
SOURCES := toplevel.v jtagser.v busmaster.v \
|
SOURCES := toplevel.v jtagser.v busmaster.v \
|
ioslave.v memdev.v hexmap.v icontrol.v builddate.v \
|
ioslave.v memdev.v builddate.v \
|
wbspiflash.v lldspi.v \
|
wbspiflash.v lldspi.v sdspi.v wbgpio.v \
|
wbsdramng.v wbscope.v wbscopc.v $(JTAGBUS)
|
wbsdram.v wbscope.v wbscopc.v $(JTAGBUS)
|
|
|
RTLFILES := $(addprefix $(SRCDIR)/,$(SOURCES)) $(addprefix $(CPUDIR)/,$(CPUSRC))
|
RTLFILES := $(addprefix $(SRCDIR)/,$(SOURCES)) $(addprefix $(CPUDIR)/,$(CPUSRC))
|
|
|
|
|
all: objdir xula.bit
|
all: objdir xula.bit
|
|
|
.PHONY: objdir
|
.PHONY: objdir
|
objdir:
|
objdir:
|
@bash -c "if [ ! -e $(OBJDIR)/ ]; then $(MKDIR) -p $(OBJDIR)/; fi"
|
@bash -c "if [ ! -e $(OBJDIR)/ ]; then $(MKDIR) -p $(OBJDIR)/; fi"
|
|
|
|
# Synthesize
|
$(OBJDIR)/$(PROJECT).ngc: $(RTLFILES) $(PROJECT).xst
|
$(OBJDIR)/$(PROJECT).ngc: $(RTLFILES) $(PROJECT).xst
|
$(MKDIR) -p xst/projnav.tmp/
|
$(MKDIR) -p xst/projnav.tmp/
|
xst -intstyle ise -ifn $(PROJECT).xst -ofn $(OBJDIR)/$(PROJECT).syr
|
xst -intstyle ise -ifn $(PROJECT).xst -ofn $(OBJDIR)/$(PROJECT).syr
|
mv $(PROJECT).ngc $(OBJDIR)/$(PROJECT).ngc
|
mv $(PROJECT).ngc $(OBJDIR)/$(PROJECT).ngc
|
mv $(PROJECT).ngr $(OBJDIR)/$(PROJECT).ngr
|
mv $(PROJECT).ngr $(OBJDIR)/$(PROJECT).ngr
|
|
|
|
# Translate
|
$(OBJDIR)/$(PROJECT).ngd: $(OBJDIR)/$(PROJECT).ngc
|
$(OBJDIR)/$(PROJECT).ngd: $(OBJDIR)/$(PROJECT).ngc
|
ngdbuild -intstyle ise -dd _ngo -nt timestamp \
|
ngdbuild -intstyle ise -dd _ngo -nt timestamp \
|
-uc $(UCFFILE) -p $(PART) $(OBJDIR)/$(PROJECT).ngc $(OBJDIR)/$(PROJECT).ngd
|
-uc $(UCFFILE) -p $(PART) $(OBJDIR)/$(PROJECT).ngc $(OBJDIR)/$(PROJECT).ngd
|
|
|
|
# Map
|
MAPOPTS := -w -logic_opt on -ol high -xe n -t 1 -xt 0 -r 4 \
|
MAPOPTS := -w -logic_opt on -ol high -xe n -t 1 -xt 0 -r 4 \
|
-global_opt speed -equivalent_register_removal on -mt 2 -detail \
|
-global_opt speed -equivalent_register_removal on -mt 2 -detail \
|
-ir off -ignore_keep_hierarchy -pr off -lc area -power off
|
-ir off -ignore_keep_hierarchy -pr off -lc area -power off
|
$(OBJDIR)/$(PROJECT).ncd: $(OBJDIR)/$(PROJECT).ngd
|
$(OBJDIR)/$(PROJECT)_map.ncd: $(OBJDIR)/$(PROJECT).ngd
|
map -intstyle ise -p $(PART) $(MAPOPTS) \
|
map -intstyle ise -p $(PART) $(MAPOPTS) \
|
-o $(OBJDIR)/$(PROJECT)_map.ncd $(OBJDIR)/$(PROJECT).ngd $(OBJDIR)/$(PROJECT).pcf
|
-o $(OBJDIR)/$(PROJECT)_map.ncd $(OBJDIR)/$(PROJECT).ngd $(OBJDIR)/$(PROJECT).pcf
|
|
|
$(OBJDIR)/$(PROJECT).ncd: $(OBJDIR)/$(PROJECT)_map.ncd
|
# Place and Route / Generate Programming File
|
|
$(PROJECT).bit: $(OBJDIR)/$(PROJECT)_map.ncd
|
par -w -intstyle ise -ol std -mt 4 $(OBJDIR)/$(PROJECT)_map.ncd $(OBJDIR)/$(PROJECT).ncd $(OBJDIR)/$(PROJECT).pcf
|
par -w -intstyle ise -ol std -mt 4 $(OBJDIR)/$(PROJECT)_map.ncd $(OBJDIR)/$(PROJECT).ncd $(OBJDIR)/$(PROJECT).pcf
|
|
bitgen -f $(PROJECT).ut $(OBJDIR)/$(PROJECT).ncd $(PROJECT).bit $(OBJDIR)/$(PROJECT).pcf
|
$(PROJECT).bit: $(OBJDIR)/$(PROJECT).ncd
|
|
bitgen -f $(PROJECT).ut $(OBJDIR)/$(PROJECT).ncd $(PROJECT).bit
|
|
|
|
timing: $(OBJDIR)/$(PROJECT).ncd $(OBJDIR)/$(PROJECT).pcf
|
timing: $(OBJDIR)/$(PROJECT).ncd $(OBJDIR)/$(PROJECT).pcf
|
trce -intstyle ise -v 3 -s 2 -n 3 -fastpaths -xml $(OBJDIR)/$(PROJECT).twx -o $(OBJDIR)/$(PROJECT).ncd -o $(OBJDIR)/$(PROJECT).twr $(OBJDIR)/$(PROJECT).pcf
|
trce -intstyle ise -v 3 -s 2 -n 3 -fastpaths -xml $(OBJDIR)/$(PROJECT).twx -o $(OBJDIR)/$(PROJECT).ncd -o $(OBJDIR)/$(PROJECT).twr $(OBJDIR)/$(PROJECT).pcf
|
|
|
.PHONY: clean
|
.PHONY: clean
|