Skip to content

Commit

Permalink
Merge pull request YosysHQ#115 from cr1901/jedec
Browse files Browse the repository at this point in the history
Add DIAMONDVER and JEDEC_BITSTREAM env variables.
  • Loading branch information
gatecat committed Jan 30, 2020
2 parents 30ee6f2 + 315df1a commit 668ce34
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions diamond.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
# You need to set the DIAMONDDIR environment variable to the path where you have
# installed Lattice Diamond, unless it matches this default.

diamonddir="${DIAMONDDIR:-/usr/local/diamond/3.10_x64}"
if [ -z "$DIAMONDVER" ]; then
diamondver="3.10"
else
diamondver="$DIAMONDVER"
fi

diamonddir="${DIAMONDDIR:-/usr/local/diamond/${diamondver}_x64}"
export FOUNDRY="${diamonddir}/ispfpga"
bindir="${diamonddir}/bin/lin64"
LSC_DIAMOND=true
Expand Down Expand Up @@ -194,6 +200,10 @@ fi
# make bitmap
"$fpgabindir"/bitgen -d par_impl.ncd $BITARGS output.bit synth_impl.prf

if [ -n "$JEDEC_BITSTREAM" ]; then
"$fpgabindir"/bitgen -d par_impl.ncd -jedec output.jed synth_impl.prf
fi

# dump bitmap
"$fpgabindir"/bstool -d output.bit > output.dump

Expand Down Expand Up @@ -226,6 +236,9 @@ fi
if [ -z "$USE_NCL" ]; then
cp "$2.tmp"/output.ncl "$2_out.ncl"
fi
if [ -n "$JEDEC_BITSTREAM" ]; then
cp "$2.tmp"/output.jed "$2.jed"
fi
if [ -n "$BACKANNO" ]; then
cp "$2.tmp"/par_impl.sdf "$2.sdf"
fi
fi

0 comments on commit 668ce34

Please sign in to comment.