aboutsummaryrefslogtreecommitdiffstats
path: root/tests/techmap
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-26 13:45:16 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-26 13:45:16 -0700
commit528f1c86877d247700bd9445e03c85b3eb437b5c (patch)
tree0b13b133940a5d16596e82f6aeae976c7745781c /tests/techmap
parenta098205479a74ad9c1b1dcb4e0607970fb58b952 (diff)
downloadyosys-528f1c86877d247700bd9445e03c85b3eb437b5c.tar.gz
yosys-528f1c86877d247700bd9445e03c85b3eb437b5c.tar.bz2
yosys-528f1c86877d247700bd9445e03c85b3eb437b5c.zip
Improve tests to check that clkbuf is connected to expected
Diffstat (limited to 'tests/techmap')
-rw-r--r--tests/techmap/clkbufmap.ys27
1 files changed, 21 insertions, 6 deletions
diff --git a/tests/techmap/clkbufmap.ys b/tests/techmap/clkbufmap.ys
index 46ff4d694..5847c3ce5 100644
--- a/tests/techmap/clkbufmap.ys
+++ b/tests/techmap/clkbufmap.ys
@@ -18,9 +18,15 @@ design -save ref
design -load ref
clkbufmap -buf clkbuf o:i
-select -assert-count 1 w:clk1 %a %co t:clkbuf %i
-select -assert-count 1 w:clk2 %a %co t:clkbuf %i
select -assert-count 2 t:clkbuf
+select -set clk1 w:clk1 %a %co t:clkbuf %i # Find 'clk1' fanouts that are 'clkbuf'
+select -assert-count 1 @clk1 # Check there is one such fanout
+select -assert-count 1 @clk1 %x:+[o] %co c:s* %i # Check that the 'o' of that clkbuf drives one fanout
+select -assert-count 1 @clk1 %x:+[o] %co c:s0 %i # And that one fanout is 's0'
+select -set clk2 w:clk2 %a %co t:clkbuf %i
+select -assert-count 1 @clk2
+select -assert-count 1 @clk2 %x:+[o] %co c:s* %i
+select -assert-count 1 @clk2 %x:+[o] %co c:s1 %i
# ----------------------
@@ -28,9 +34,12 @@ design -load ref
setattr -set clkbuf_inhibit 0 w:clk1
setattr -set clkbuf_inhibit 1 w:clk2
clkbufmap -buf clkbuf o:i
-select -assert-count 1 w:clk1 %a %co t:clkbuf %i
-select -assert-count 0 w:clk2 %a %co t:clkbuf %i
select -assert-count 1 t:clkbuf
+select -set clk1 w:clk1 %a %co t:clkbuf %i # Find 'clk1' fanouts that are 'clkbuf'
+select -assert-count 1 @clk1 # Check there is one such fanout
+select -assert-count 1 @clk1 %x:+[o] %co c:s* %i # Check that the 'o' of that clkbuf drives one fanout
+select -assert-count 1 @clk1 %x:+[o] %co c:s0 %i # And that one fanout is 's0'
+select -assert-count 0 w:clk2 %a %co t:clkbuf %i
# ----------------------
@@ -38,9 +47,15 @@ design -load ref
setattr -set clkbuf_inhibit 1 w:clk1
setattr -set buffer_type "bufg" w:clk2
clkbufmap -buf clkbuf o:i w:* a:buffer_type=none a:buffer_type=bufr %u %d
-select -assert-count 1 w:clk1 %a %co t:clkbuf %i
-select -assert-count 1 w:clk2 %a %co t:clkbuf %i
select -assert-count 2 t:clkbuf
+select -set clk1 w:clk1 %a %co t:clkbuf %i # Find 'clk1' fanouts that are 'clkbuf'
+select -assert-count 1 @clk1 # Check there is one such fanout
+select -assert-count 1 @clk1 %x:+[o] %co c:s* %i # Check that the 'o' of that clkbuf drives one fanout
+select -assert-count 1 @clk1 %x:+[o] %co c:s0 %i # And that one fanout is 's0'
+select -set clk2 w:clk2 %a %co t:clkbuf %i # Find 'clk1' fanouts that are 'clkbuf'
+select -assert-count 1 @clk2 # Check there is one such fanout
+select -assert-count 1 @clk2 %x:+[o] %co c:s* %i # Check that the 'o' of that clkbuf drives one fanout
+select -assert-count 1 @clk2 %x:+[o] %co c:s1 %i # And that one fanout is 's0'
# ----------------------