diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-11-24 18:49:44 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-11-24 18:49:44 +0000 |
commit | 3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c (patch) | |
tree | 7d604206a2deb29c9f097ff1f3b7de78f44b34a3 /scripts/yosys-cmp/lse.sh | |
download | butterstick-3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c.tar.gz butterstick-3291d86ec38031e191ec1e7e5e8ddfa74b77cb7c.zip |
Squashed 'picorv32/' content from commit f00a88c
git-subtree-dir: picorv32
git-subtree-split: f00a88c36eaab478b64ee27d8162e421049bcc66
Diffstat (limited to 'scripts/yosys-cmp/lse.sh')
-rw-r--r-- | scripts/yosys-cmp/lse.sh | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/scripts/yosys-cmp/lse.sh b/scripts/yosys-cmp/lse.sh new file mode 100644 index 0000000..a802c67 --- /dev/null +++ b/scripts/yosys-cmp/lse.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +set -ex + +rm -rf lse.tmp +mkdir lse.tmp +cd lse.tmp + +cat > lse.prj << EOT +#device +-a SBTiCE40 +-d iCE40HX8K +-t CT256 +#constraint file + +#options +-frequency 200 +-optimization_goal Area +-twr_paths 3 +-bram_utilization 100.00 +-ramstyle Auto +-romstyle Auto +-use_carry_chain 1 +-carry_chain_length 0 +-resource_sharing 1 +-propagate_constants 1 +-remove_duplicate_regs 1 +-max_fanout 10000 +-fsm_encoding_style Auto +-use_io_insertion 1 +-use_io_reg auto +-ifd +-resolve_mixed_drivers 0 +-RWCheckOnRam 0 +-fix_gated_clocks 1 +-top picorv32 + +-ver "../../../picorv32.v" +-p "." + +#set result format/file last +-output_edif output.edf + +#set log file +-logfile "lse.log" +EOT + +icecubedir="${ICECUBEDIR:-/opt/lscc/iCEcube2.2014.08}" +export FOUNDRY="$icecubedir/LSE" +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:}$icecubedir/LSE/bin/lin" +"$icecubedir"/LSE/bin/lin/synthesis -f lse.prj + +grep 'viewRef.*cellRef' output.edf | sed 's,.*cellRef *,,; s,[ )].*,,;' | sort | uniq -c |