# $Id$: BUILDSTAMP = ./build/buildstamp.vhd SVN_REV = $(shell test -d .svn && svn info | grep '^Revision' | sed -e 's/Revision: *//') SVN_STATUS = $(shell test -d .svn && svn status) ifeq ($(strip $(SVN_REV)),) SVN_REV = 0 endif SVN_CLEAN = 0 ifeq ($(strip $(SVN_STATUS)),) SVN_CLEAN = 1 endif # set the default device_die, A3PE1500|A3PE3000 # it can be defined when calling the Makefile like: # make actel_par device_die="A3PE1500" device_die = "A3PE1500" all: synth actel_par sparp: synth actel_par actel_prog # execute after change in schematic newpin: pinextract actel_par synth: # echo "`define ACTEL" > ./build/defines.v @echo "Updating buildstamp" @/bin/echo -e "\ library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all;\n\n\ package buildstamp is\n\ constant build_date : std_logic_vector(31 downto 0) := x\""$(shell date +%Y%m%d)"\";\n\ constant build_time : std_logic_vector(15 downto 0) := x\""$(shell date +%H%M)"\";\n\ constant build_rev : std_logic_vector(15 downto 0) :=\n\ std_logic_vector(to_unsigned("$(SVN_REV)", 16));\n\ constant build_clean : std_logic := '"$(SVN_CLEAN)"';\n\ end buildstamp;\n\n\ package body buildstamp is end buildstamp;" > $(BUILDSTAMP) -rm -rf precision_$(device_die) NETLIST/top_$(device_die).* REPORTS/precision*$(device_die).txt mkdir precision_$(device_die) precision -shell -rtlplus -file ./script/read_precv.tcl -fileargs $(device_die) -logfile ./REPORTS/precision_$(device_die).log cp precision_$(device_die)/top.edf NETLIST/top_$(device_die).edf head -n 9 REPORTS/precision_report_area_$(device_die).txt sleep 2 grep -A 100 "Clock Frequency Report" REPORTS/precision_report_timing_$(device_die).txt NETLIST/top.edf: synth # Place & Route with Actel Designer actel_par: ./script/actel_par.tcl #./NETLIST/top.edf if [ ! -d $@_$(device_die) ]; then mkdir $@_$(device_die); fi -rm -rf $@_$(device_die)/* designer "SCRIPT:./script/actel_par.tcl $(device_die)" console_mode:show "LOGFILE:./REPORTS/actel_compile_$(device_die).log" grep -i "error" REPORTS/actel_compile_$(device_die).log # program on a Windows machine (cygwin) actel_prog: ./script/actel_prog.tcl ./actel_par_$(device_die)/top_$(device_die).pdb -rm -rf actel_prog flashpro script:./script/actel_prog.tcl SCRIPT_ARGS:"$(device_die)" console_mode:show mv actel_prog/actel_prog.log REPORTS/actel_prog_$(device_die).log # extract the pins from the schematic netlist and write the Actel constraint file in pdc format pinextract: fpc ./script/conv_netl ./script/conv_netl ./script/schematic_netlist.asc U1. ./script/pintable.txt > script/pinout.pdc .PHONY : actel_par pinextract synth newpin all actel_prog sparp