mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 09:55:20 +00:00
parent
d46259becd
commit
e91368a5f4
|
@ -422,11 +422,7 @@ struct FsmExtractPass : public Pass {
|
||||||
log_header(design, "Executing FSM_EXTRACT pass (extracting FSM from design).\n");
|
log_header(design, "Executing FSM_EXTRACT pass (extracting FSM from design).\n");
|
||||||
extra_args(args, 1, design);
|
extra_args(args, 1, design);
|
||||||
|
|
||||||
CellTypes ct;
|
CellTypes ct(design);
|
||||||
ct.setup_internals();
|
|
||||||
ct.setup_internals_mem();
|
|
||||||
ct.setup_stdcells();
|
|
||||||
ct.setup_stdcells_mem();
|
|
||||||
|
|
||||||
for (auto &mod_it : design->modules_)
|
for (auto &mod_it : design->modules_)
|
||||||
{
|
{
|
||||||
|
|
33
tests/various/bug1781.ys
Normal file
33
tests/various/bug1781.ys
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
read_verilog <<EOT
|
||||||
|
|
||||||
|
module top(input clk, input rst);
|
||||||
|
|
||||||
|
reg [1:0] state;
|
||||||
|
|
||||||
|
always @(posedge clk, posedge rst) begin
|
||||||
|
if (rst)
|
||||||
|
state <= 0;
|
||||||
|
else
|
||||||
|
case (state)
|
||||||
|
2'b00: state <= 2'b01;
|
||||||
|
2'b01: state <= 2'b10;
|
||||||
|
2'b10: state <= 2'b00;
|
||||||
|
endcase
|
||||||
|
end
|
||||||
|
|
||||||
|
sub sub_i(.i(state == 0));
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
||||||
|
|
||||||
|
(* blackbox, keep *)
|
||||||
|
module sub(input i);
|
||||||
|
endmodule
|
||||||
|
|
||||||
|
EOT
|
||||||
|
|
||||||
|
proc
|
||||||
|
fsm
|
||||||
|
|
||||||
|
# Make sure there is a driver
|
||||||
|
select -assert-any t:sub %ci %a w:* %i %ci c:* %i
|
Loading…
Reference in a new issue