Skip to content

Commit

Permalink
Remove references to ilang
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko committed Dec 11, 2024
1 parent b01592a commit d9ba4fd
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/bitcnt/test_eq.sby
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ smtbmc yices

[script]
read_verilog -sv test_eq.sv
read_ilang mutated.il
read_rtlil mutated.il
prep -top miter
fmcombine miter ref uut
flatten
Expand Down
2 changes: 1 addition & 1 deletion examples/bitcnt/test_fm.sby
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ smtbmc boolector

[script]
read_verilog -sv test_fm.sv
read_ilang mutated.il
read_rtlil mutated.il
prep -top testbench
flatten
opt -fast
Expand Down
2 changes: 1 addition & 1 deletion examples/picorv32_primes/eq_bmc.sby
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ smtbmc yices
output("verilog_defines -Dmutidx=%s" % task)
--pycode-end--
read_verilog -sv miter.sv
read_ilang mutated.il
read_rtlil mutated.il
prep -top miter
fmcombine miter ref uut
flatten
Expand Down
4 changes: 2 additions & 2 deletions examples/picorv32_primes/eq_bmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ exec 2>&1
set -ex

{
echo "read_ilang ../../database/design.il"
echo "read_rtlil ../../database/design.il"
while read -r idx mut; do
echo "mutate -ctrl mutsel 8 ${idx} ${mut#* }"
done < input.txt
echo "write_ilang mutated.il"
echo "write_rtlil mutated.il"
} > mutate.ys

yosys -ql mutate.log mutate.ys
Expand Down
2 changes: 1 addition & 1 deletion examples/picorv32_primes/eq_sim3.sby
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abc sim3
output("verilog_defines -Dmutidx=%s" % task)
--pycode-end--
read_verilog -sv miter.sv
read_ilang mutated.il
read_rtlil mutated.il
prep -top miter
fmcombine miter ref uut

Expand Down
4 changes: 2 additions & 2 deletions examples/picorv32_primes/eq_sim3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ exec 2>&1
set -ex

{
echo "read_ilang ../../database/design.il"
echo "read_rtlil ../../database/design.il"
while read -r idx mut; do
echo "mutate -ctrl mutsel 8 ${idx} ${mut#* }"
done < input.txt
echo "write_ilang mutated.il"
echo "write_rtlil mutated.il"
} > mutate.ys

yosys -ql mutate.log mutate.ys
Expand Down
2 changes: 1 addition & 1 deletion examples/picorv32_primes/sim_simple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exec 2>&1
set -ex

{
echo "read_ilang ../../database/design.il"
echo "read_rtlil ../../database/design.il"
while read -r idx mut; do
echo "mutate -ctrl mutsel 8 ${idx} ${mut#* }"
done < input.txt
Expand Down
6 changes: 3 additions & 3 deletions mcy.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def reset_status(db, cfg, do_reset=False):

log_step("Creating additional mutations script file.")
with open("database/mutations2.ys", "w") as f:
print("read_ilang database/design.il", file=f)
print("read_rtlil database/design.il", file=f)
print(f"mutate -list {cfg.opt_size} -seed {cfg.opt_seed} -none{''.join(' -cfg %s %d' % (k, v) for k, v, in sorted(cfg.mutopts.items()))}{' -mode ' + cfg.opt_mode if cfg.opt_mode else ''} -o database/mutations2.txt -s database/sources.txt{' ' + ' '.join(cfg.select) if len(cfg.select) else ''}", file=f)

log_step("Creating additional mutations.")
Expand Down Expand Up @@ -473,15 +473,15 @@ def init_command(force, nosetup, trace):
with open("database/design.ys", "w") as f:
for line in cfg.script:
print(line, file=f)
print("write_ilang database/design.il", file=f)
print("write_rtlil database/design.il", file=f)

log_step("Creating design RTL.")
task = Task("yosys -ql database/design.log database/design.ys")
task.wait()

log_step("Creating mutations script file.")
with open("database/mutations.ys", "w") as f:
print("read_ilang database/design.il", file=f)
print("read_rtlil database/design.il", file=f)
print(f"mutate -list {cfg.opt_size} -seed {cfg.opt_seed} -none{''.join(' -cfg %s %d' % (k, v) for k, v, in sorted(cfg.mutopts.items()))}{' -mode ' + cfg.opt_mode if cfg.opt_mode else ''} -o database/mutations.txt -s database/sources.txt{' ' + ' '.join(cfg.select) if len(cfg.select) else ''}", file=f)

log_step("Creating mutations.")
Expand Down
4 changes: 2 additions & 2 deletions scripts/create_mutated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ if [[ ( "$output_file" == *.v ) ]]; then
elif [[ ( "$output_file" == *.sv ) ]]; then
write_cmd="write_verilog -norename -sv $output_file"
elif [[ ( "$output_file" == *.il ) ]]; then
write_cmd="write_ilang $output_file"
write_cmd="write_rtlil $output_file"
else
echo "Unrecognized file extension: '$output_file' (this script can write .v, .sv and .il files)" 1>&2
# usage 1>&2
exit 1
fi

{
echo "read_ilang $design_file"
echo "read_rtlil $design_file"
while read -r idx mut; do
if [[ "$use_ctrl" -eq 1 ]]; then
echo "mutate -ctrl mutsel ${ctrl_width} ${idx} ${mut#* }"
Expand Down

0 comments on commit d9ba4fd

Please sign in to comment.