Skip to content

Commit

Permalink
Timing models for LP and HX devices
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffordwolf committed Feb 1, 2016
1 parent 8b61165 commit 81c33a3
Show file tree
Hide file tree
Showing 18 changed files with 1,255 additions and 650 deletions.
6 changes: 3 additions & 3 deletions examples/hx8kboard/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PROJ = example
PIN_DEF = hx8kboard.pcf
DEVICE = 8k
DEVICE = hx8k

all: $(PROJ).rpt $(PROJ).bin

%.blif: %.v
yosys -p 'synth_ice40 -top top -blif $@' $<

%.asc: $(PIN_DEF) %.blif
arachne-pnr -d $(DEVICE) -o $@ -p $^
arachne-pnr -d $(subst hx,,$(subst lp,,$(DEVICE))) -o $@ -p $^

%.bin: %.asc
icepack $< $@

%.rpt: %.asc
icetime -mtr $@ $<
icetime -d $(DEVICE) -mtr $@ $<

prog: $(PROJ).bin
iceprog $<
Expand Down
4 changes: 4 additions & 0 deletions examples/iceblink/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
example.bin
example.blif
example.asc
example.rpt
9 changes: 6 additions & 3 deletions examples/iceblink/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
PROJ = example
PIN_DEF = iceblink.pcf
DEVICE = 1k
DEVICE = hx1k

all: $(PROJ).bin
all: $(PROJ).rpt $(PROJ).bin

%.blif: %.v
yosys -p 'synth_ice40 -top top -blif $@' $<

%.asc: $(PIN_DEF) %.blif
arachne-pnr -d $(DEVICE) -o $@ -p $^ -P vq100
arachne-pnr -d $(subst hx,,$(subst lp,,$(DEVICE))) -o $@ -p $^ -P vq100

%.bin: %.asc
icepack $< $@

%.rpt: %.asc
icetime -d $(DEVICE) -mtr $@ $<

prog: $(PROJ).bin
iCEburn.py -e -v -w $<

Expand Down
6 changes: 3 additions & 3 deletions examples/icestick/Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PROJ = example
PIN_DEF = icestick.pcf
DEVICE = 1k
DEVICE = hx1k

all: $(PROJ).rpt $(PROJ).bin

%.blif: %.v
yosys -p 'synth_ice40 -top top -blif $@' $<

%.asc: $(PIN_DEF) %.blif
arachne-pnr -d $(DEVICE) -o $@ -p $^
arachne-pnr -d $(subst hx,,$(subst lp,,$(DEVICE))) -o $@ -p $^

%.bin: %.asc
icepack $< $@

%.rpt: %.asc
icetime -mtr $@ $<
icetime -d $(DEVICE) -mtr $@ $<

prog: $(PROJ).bin
iceprog $<
Expand Down
5 changes: 4 additions & 1 deletion icefuzz/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
*.glb
*.psb
*.tmp/
*.txt
*.asc
*.vsb
*.sdf
/work_*/
__pycache__
bitdata_*.txt
data_*.txt
database_*.txt
timings_*.html
28 changes: 18 additions & 10 deletions icefuzz/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include ../config.mk
export LC_ALL=C
export ICE_SBTIMER_LP=1

TESTS =
TESTS += binop
Expand Down Expand Up @@ -40,22 +41,28 @@ endif

timings:
ifeq ($(EIGTHK),_8k)
cp tmedges_8k.txt tmedges.tmp
cp tmedges.txt tmedges.tmp
set -e; for f in work_*/*.vsb; do echo $$f; yosys -q -f verilog -s tmedges.ys $$f; done
sort -u tmedges.tmp > tmedges_8k.txt && rm -f tmedges.tmp
python3 timings.py -t timings_8k.txt work_*/*.sdf > timings_8k.new
mv timings_8k.new timings_8k.txt
sort -u tmedges.tmp > tmedges.txt && rm -f tmedges.tmp
python3 timings.py -t timings_hx8k.txt work_*/*.sdf > timings_hx8k.new
mv timings_hx8k.new timings_hx8k.txt
python3 timings.py -t timings_lp8k.txt work_*/*.slp > timings_lp8k.new
mv timings_lp8k.new timings_lp8k.txt
else
cp tmedges_1k.txt tmedges.tmp
cp tmedges.txt tmedges.tmp
set -e; for f in work_*/*.vsb; do echo $$f; yosys -q -f verilog -s tmedges.ys $$f; done
sort -u tmedges.tmp > tmedges_1k.txt && rm -f tmedges.tmp
python3 timings.py -t timings_1k.txt work_*/*.sdf > timings_1k.new
mv timings_1k.new timings_1k.txt
sort -u tmedges.tmp > tmedges.txt && rm -f tmedges.tmp
python3 timings.py -t timings_hx1k.txt work_*/*.sdf > timings_hx1k.new
mv timings_hx1k.new timings_hx1k.txt
python3 timings.py -t timings_lp1k.txt work_*/*.slp > timings_lp1k.new
mv timings_lp1k.new timings_lp1k.txt
endif

timings_html:
python3 timings.py -h tmedges_1k.txt -t timings_1k.txt -l "HX1K with default temp/volt settings" > timings_1k.html
python3 timings.py -h tmedges_8k.txt -t timings_8k.txt -l "HX8K with default temp/volt settings" > timings_8k.html
python3 timings.py -h tmedges.txt -t timings_hx1k.txt -l "HX1K with default temp/volt settings" > timings_hx1k.html
python3 timings.py -h tmedges.txt -t timings_hx8k.txt -l "HX8K with default temp/volt settings" > timings_hx8k.html
python3 timings.py -h tmedges.txt -t timings_lp1k.txt -l "LP1K with default temp/volt settings" > timings_lp1k.html
python3 timings.py -h tmedges.txt -t timings_lp8k.txt -l "LP8K with default temp/volt settings" > timings_lp8k.html

data_cached.txt: cached_io.txt cached_logic.txt cached_ramb$(EIGTHK).txt cached_ramt$(EIGTHK).txt
gawk '{ print "io", $$0; }' cached_io.txt > data_cached.new
Expand Down Expand Up @@ -113,6 +120,7 @@ clean:
rm -rf data_*.txt
rm -rf bitdata_*.txt
rm -rf database_*.txt
rm -rf timings_*.html

.PHONY: database datafiles check clean

8 changes: 8 additions & 0 deletions icefuzz/icecube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ fi
# run netlister
"$icecubedir"/sbt_backend/bin/linux/opt/netlister --verilog "$PWD"/outputs/netlist/top_sbt.v --vhdl "$PWD"/outputs/netlist/top_sbt.vhd --lib "$PWD"/netlist/oadb-top --view rt --device "$icecubedir"/sbt_backend/devices/$devfile --splitio --in-sdc-file "$PWD"/outputs/packer/top_pk.sdc --out-sdc-file "$PWD"/outputs/netlist/top_sbt.sdc

if [ -n "$ICE_SBTIMER_LP" ]; then
"$icecubedir"/sbt_backend/bin/linux/opt/sbtimer --des-lib "$PWD"/netlist/oadb-top --lib-file "$icecubedir"/sbt_backend/devices/$libfile --sdc-file "$PWD"/outputs/netlist/top_sbt.sdc --sdf-file "$PWD"/outputs/netlist/top_sbt_lp.sdf --report-file "$PWD"/outputs/netlist/top_timing_lp.rpt --device-file "$icecubedir"/sbt_backend/devices/$devfile --timing-summary
fi

# hacks for sbtimer so it knows what device we are dealing with
ln -fs . sbt
ln -fs . foobar_Implmnt
Expand Down Expand Up @@ -304,6 +308,10 @@ cp "$1.tmp"/outputs/placer/top_sbt.pcf "$1.psb"
cp "$1.tmp"/outputs/netlist/top_sbt.v "$1.vsb"
cp "$1.tmp"/outputs/netlist/top_sbt.sdf "$1.sdf"
cp "$1.tmp"/outputs/netlist/top_timing.rpt "$1.rpt"
if [ -n "$ICE_SBTIMER_LP" ]; then
cp "$1.tmp"/outputs/netlist/top_sbt_lp.sdf "$1.slp"
cp "$1.tmp"/outputs/netlist/top_timing_lp.rpt "$1.rlp"
fi

$scriptdir/../icepack/iceunpack "$1.bin" "$1.asc"

1 change: 1 addition & 0 deletions icefuzz/pinloc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ pinloc-*.exp.new
pinloc-*.log
pinloc-*.pcf
pinloc-*.rpt
pinloc-*.txt
pinloc-*.v
2 changes: 1 addition & 1 deletion icefuzz/timings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import getopt, sys, re

ignore_cells = set([
"ADTTRIBUF", "CascadeBuf", "DL", "GIOBUG", "LUT_MUX", "MUX4",
"ADTTRIBUF", "DL", "GIOBUG", "LUT_MUX", "MUX4",
"PLL40_2_FEEDBACK_PATH_DELAY", "PLL40_2_FEEDBACK_PATH_EXTERNAL",
"PLL40_2_FEEDBACK_PATH_PHASE_AND_DELAY", "PLL40_2_FEEDBACK_PATH_SIMPLE",
"PLL40_2F_FEEDBACK_PATH_DELAY", "PLL40_2F_FEEDBACK_PATH_EXTERNAL",
Expand Down
3 changes: 3 additions & 0 deletions icefuzz/timings_1k.txt → icefuzz/timings_hx1k.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CELL CascadeBuf
IOPATH I O 118.382:130.906:147.283 146.568:162.074:182.35

CELL CascadeMux
IOPATH I O 0:0:0 0:0:0

Expand Down
2 changes: 1 addition & 1 deletion icefuzz/timings_8k.txt → icefuzz/timings_hx8k.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CELL CascadeBuf
IOPATH I O 137.402:178.5:217.075 170.116:221:268.76
IOPATH I O 118.382:130.906:147.283 146.568:162.074:182.35

CELL CascadeMux
IOPATH I O 0:0:0 0:0:0
Expand Down
Loading

0 comments on commit 81c33a3

Please sign in to comment.