diff options
author | Lofty <dan.ravensloft@gmail.com> | 2022-04-11 13:21:47 +0100 |
---|---|---|
committer | Lofty <dan.ravensloft@gmail.com> | 2022-08-08 16:03:28 +0100 |
commit | a48dcd1d40a845cfb8b18cbe986faf0b780880be (patch) | |
tree | ab422ceb1f993c9f6155b049dc5f5da7b0a58290 /tests | |
parent | 60a787fa50062169c1aae4ecb199d13c0b6f25b6 (diff) | |
download | yosys-a48dcd1d40a845cfb8b18cbe986faf0b780880be.tar.gz yosys-a48dcd1d40a845cfb8b18cbe986faf0b780880be.tar.bz2 yosys-a48dcd1d40a845cfb8b18cbe986faf0b780880be.zip |
rename: add -scramble-name option to randomly rename selections
Diffstat (limited to 'tests')
-rw-r--r-- | tests/various/rename_scramble_name.ys | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/various/rename_scramble_name.ys b/tests/various/rename_scramble_name.ys new file mode 100644 index 000000000..9a36d0922 --- /dev/null +++ b/tests/various/rename_scramble_name.ys @@ -0,0 +1,31 @@ +read_verilog <<EOF +module top(); + wire a, b, c; +endmodule +EOF + +proc +hierarchy -top top +rename -seed 2 -scramble-name w:* +select -assert-none w:a w:b w:c +select -assert-count 3 w:$_*_ +select -assert-none w:$_*_ %% %n +design -reset + +read_verilog <<EOF +module foo(input a, b, output c); + assign c = a + b; +endmodule + +module top(); + wire a, b, c; + foo bar(.a(a), .b(b), .c(c)); +endmodule +EOF + +proc +hierarchy -top top +rename -seed 2 -scramble-name c:bar +select -assert-none c:bar +select -assert-count 1 c:$_*_ +select -assert-none c:$_*_ w:* foo/c:$add$<<EOF:2$1 %% %n |