mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-18 01:02:19 +00:00
rename: add -move-to-cell option in -wire mode
This commit is contained in:
parent
fb024c4d55
commit
77089a8d03
2 changed files with 80 additions and 9 deletions
35
tests/various/rename_wire_move_to_cell.ys
Normal file
35
tests/various/rename_wire_move_to_cell.ys
Normal file
|
@ -0,0 +1,35 @@
|
|||
read_verilog <<EOF
|
||||
module top(input clk, rst, input [7:0] din, output [7:0] dout, input bin, output bout);
|
||||
reg [7:0] dq;
|
||||
reg bq;
|
||||
|
||||
always @(posedge clk, posedge rst) begin
|
||||
if (rst) dq <= '0;
|
||||
else dq <= din;
|
||||
end
|
||||
|
||||
always @(posedge clk) bq <= bin;
|
||||
|
||||
assign dout = dq;
|
||||
assign bout = bq;
|
||||
endmodule
|
||||
EOF
|
||||
|
||||
proc
|
||||
hierarchy -top top
|
||||
|
||||
select -assert-count 1 t:$dff
|
||||
select -assert-count 1 t:$adff
|
||||
select -assert-count 0 t:$dff n:bq %i
|
||||
select -assert-count 0 t:$adff n:dq %i
|
||||
select -assert-count 1 w:bq
|
||||
select -assert-count 1 w:dq
|
||||
|
||||
rename -wire -move-to-cell
|
||||
|
||||
select -assert-count 1 t:$dff
|
||||
select -assert-count 1 t:$adff
|
||||
select -assert-count 1 t:$dff n:bq %i
|
||||
select -assert-count 1 t:$adff n:dq %i
|
||||
select -assert-count 0 w:bq
|
||||
select -assert-count 0 w:dq
|
Loading…
Add table
Add a link
Reference in a new issue