mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
Moved btor scripts to backends/btor/
This commit is contained in:
parent
da26bb4378
commit
6804edd5d4
2 changed files with 0 additions and 0 deletions
15
backends/btor/btor.ys
Normal file
15
backends/btor/btor.ys
Normal file
|
@ -0,0 +1,15 @@
|
|||
proc;
|
||||
opt; opt_const -mux_undef; opt;
|
||||
rename -hide;;;
|
||||
#converting pmux to mux
|
||||
techmap -map techlibs/common/pmux2mux.v;;
|
||||
memory -nomap;;
|
||||
#flatten design
|
||||
flatten;;
|
||||
#converting asyn memory write to syn memory
|
||||
memory_unpack;
|
||||
#cell output to be a single wire
|
||||
splitnets -driver;
|
||||
setundef -zero -undriven;
|
||||
opt;;;
|
||||
|
35
backends/btor/verilog2btor.sh
Executable file
35
backends/btor/verilog2btor.sh
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Script to writing btor from verilog design
|
||||
#
|
||||
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "Usage: $0 input.v output.btor top-module-name" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! [ -e "$1" ]; then
|
||||
echo "$1 not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FULL_PATH=$(readlink -f $1)
|
||||
DIR=$(dirname $FULL_PATH)
|
||||
|
||||
./yosys -q -p "
|
||||
read_verilog $1;
|
||||
hierarchy -top $3;
|
||||
hierarchy -libdir $DIR;
|
||||
hierarchy -check;
|
||||
proc;
|
||||
opt; opt_const -mux_undef; opt;
|
||||
rename -hide;;;
|
||||
techmap -map $YOSYS_HOME/techlibs/common/pmux2mux.v;;
|
||||
memory -nomap;;
|
||||
flatten;;
|
||||
memory_unpack;
|
||||
splitnets -driver;
|
||||
setundef -zero -undriven;
|
||||
opt;;;
|
||||
write_btor $2;"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue