Skip to content

Commit

Permalink
select: add t:@<name> test
Browse files Browse the repository at this point in the history
  • Loading branch information
widlarizer committed Oct 15, 2024
1 parent 09be035 commit f9f509b
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions tests/select/mod-attribute.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
read_rtlil <<EOT
module \pdk_not

wire input 1 \A
wire output 2 \Y

cell $_NOT_ \not
connect \A \A
connect \Y \Y
end

end

module \pdk_buf

wire input 1 \A
wire output 2 \Y

cell $_BUF_ \buf
connect \A \A
connect \Y \Y
end

end

module \top
wire input 1 \A
wire output 2 \Y
wire \w

cell \pdk_buf \buf
connect \A \A
connect \Y \w
end

cell \pdk_not \not
connect \A \w
connect \Y \Y
end

end
EOT

cellmatch -lut_attrs *

select -set buffers a:lut=2'b10 %m
select -set inverters a:lut=2'b01 %m

select -assert-count 1 t:@buffers t:pdk_buf %i
select -assert-count 0 t:@buffers t:pdk_not %i
select -assert-count 0 t:@inverters t:pdk_buf %i
select -assert-count 1 t:@inverters t:pdk_not %i

0 comments on commit f9f509b

Please sign in to comment.