mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	abc9: deprecate abc9_ff.init wire for (* abc9_init *) attr
This commit is contained in:
		
							parent
							
								
									cb7bc6a12f
								
							
						
					
					
						commit
						00d41905df
					
				
					 2 changed files with 14 additions and 24 deletions
				
			
		| 
						 | 
					@ -192,20 +192,9 @@ void prep_dff(RTLIL::Module *module)
 | 
				
			||||||
		clkdomain_t key(abc9_clock);
 | 
							clkdomain_t key(abc9_clock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		auto r = clk_to_mergeability.insert(std::make_pair(abc9_clock, clk_to_mergeability.size() + 1));
 | 
							auto r = clk_to_mergeability.insert(std::make_pair(abc9_clock, clk_to_mergeability.size() + 1));
 | 
				
			||||||
		auto r2 YS_ATTRIBUTE(unused) = cell->attributes.insert(std::make_pair(ID(abc9_mergeability), r.first->second));
 | 
							auto r2  = cell->attributes.insert(ID(abc9_mergeability));;
 | 
				
			||||||
		log_assert(r2.second);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		Wire *abc9_init_wire = module->wire(stringf("%s.init", cell->name.c_str()));
 | 
					 | 
				
			||||||
		if (abc9_init_wire == NULL)
 | 
					 | 
				
			||||||
			log_error("'%s.init' is not a wire present in module '%s'.\n", cell->name.c_str(), log_id(module));
 | 
					 | 
				
			||||||
		log_assert(GetSize(abc9_init_wire) == 1);
 | 
					 | 
				
			||||||
		SigSpec abc9_init = assign_map(abc9_init_wire);
 | 
					 | 
				
			||||||
		if (!abc9_init.is_fully_const())
 | 
					 | 
				
			||||||
			log_error("'%s.init' is not a constant wire present in module '%s'.\n", cell->name.c_str(), log_id(module));
 | 
					 | 
				
			||||||
		if (abc9_init == State::S1)
 | 
					 | 
				
			||||||
			log_error("'%s.init' in module '%s' has value 1'b1 which is not supported by 'abc9 -dff'.\n", cell->name.c_str(), log_id(module));
 | 
					 | 
				
			||||||
		r2 = cell->attributes.insert(std::make_pair(ID(abc9_init), abc9_init.as_const()));
 | 
					 | 
				
			||||||
		log_assert(r2.second);
 | 
							log_assert(r2.second);
 | 
				
			||||||
 | 
							r2.first->second = r.first->second;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	RTLIL::Module *holes_module = design->module(stringf("%s$holes", module->name.c_str()));
 | 
						RTLIL::Module *holes_module = design->module(stringf("%s$holes", module->name.c_str()));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -68,9 +68,10 @@
 | 
				
			||||||
// (c) a special abc9_ff.clock wire to capture its clock domain and polarity
 | 
					// (c) a special abc9_ff.clock wire to capture its clock domain and polarity
 | 
				
			||||||
//     (indicated to `abc9' so that it only performs sequential synthesis
 | 
					//     (indicated to `abc9' so that it only performs sequential synthesis
 | 
				
			||||||
//     (with reachability analysis) correctly on one domain at a time)
 | 
					//     (with reachability analysis) correctly on one domain at a time)
 | 
				
			||||||
// (d) a special abc9_ff.init wire to encode the flop's initial state
 | 
					// (d) an (* abc9_init *) attribute on the $__ABC9_FF_ cell capturing its
 | 
				
			||||||
//     NOTE: in order to perform sequential synthesis, `abc9' also requires
 | 
					//     initial state
 | 
				
			||||||
//     that the initial value of all flops be zero
 | 
					//     NOTE: in order to perform sequential synthesis, `abc9' requires that
 | 
				
			||||||
 | 
					//     the initial value of all flops be zero
 | 
				
			||||||
// (e) a special _TECHMAP_REPLACE_.abc9_ff.Q wire that will be used for feedback
 | 
					// (e) a special _TECHMAP_REPLACE_.abc9_ff.Q wire that will be used for feedback
 | 
				
			||||||
//     into the (combinatorial) FD* cell to facilitate clock-enable behaviour
 | 
					//     into the (combinatorial) FD* cell to facilitate clock-enable behaviour
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -103,11 +104,11 @@ module FDRE (output Q, (* techmap_autopurge *) input C, CE, D, R);
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  endgenerate
 | 
					  endgenerate
 | 
				
			||||||
 | 
					  (* abc9_init = 1'b0 *)
 | 
				
			||||||
  $__ABC9_FF_ abc9_ff (.D($Q), .Q(QQ));
 | 
					  $__ABC9_FF_ abc9_ff (.D($Q), .Q(QQ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Special signals
 | 
					  // Special signals
 | 
				
			||||||
  wire [1:0] abc9_ff.clock = {C, IS_C_INVERTED};
 | 
					  wire [1:0] abc9_ff.clock = {C, IS_C_INVERTED};
 | 
				
			||||||
  wire [0:0] abc9_ff.init = 1'b0;
 | 
					 | 
				
			||||||
  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
 | 
					  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
module FDRE_1 (output Q, (* techmap_autopurge *) input C, CE, D, R);
 | 
					module FDRE_1 (output Q, (* techmap_autopurge *) input C, CE, D, R);
 | 
				
			||||||
| 
						 | 
					@ -130,11 +131,11 @@ module FDRE_1 (output Q, (* techmap_autopurge *) input C, CE, D, R);
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  endgenerate
 | 
					  endgenerate
 | 
				
			||||||
 | 
					  (* abc9_init = 1'b0 *)
 | 
				
			||||||
  $__ABC9_FF_ abc9_ff (.D($Q), .Q(QQ));
 | 
					  $__ABC9_FF_ abc9_ff (.D($Q), .Q(QQ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Special signals
 | 
					  // Special signals
 | 
				
			||||||
  wire [1:0] abc9_ff.clock = {C, 1'b1 /* IS_C_INVERTED */};
 | 
					  wire [1:0] abc9_ff.clock = {C, 1'b1 /* IS_C_INVERTED */};
 | 
				
			||||||
  wire [0:0] abc9_ff.init = 1'b0;
 | 
					 | 
				
			||||||
  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
 | 
					  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -166,11 +167,11 @@ module FDSE (output Q, (* techmap_autopurge *) input C, CE, D, S);
 | 
				
			||||||
      .D(D), .Q($Q), .C(C), .CE(CE), .S(S)
 | 
					      .D(D), .Q($Q), .C(C), .CE(CE), .S(S)
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  end endgenerate
 | 
					  end endgenerate
 | 
				
			||||||
 | 
					  (* abc9_init = 1'b0 *)
 | 
				
			||||||
  $__ABC9_FF_ abc9_ff (.D($Q), .Q(QQ));
 | 
					  $__ABC9_FF_ abc9_ff (.D($Q), .Q(QQ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Special signals
 | 
					  // Special signals
 | 
				
			||||||
  wire [1:0] abc9_ff.clock = {C, IS_C_INVERTED};
 | 
					  wire [1:0] abc9_ff.clock = {C, IS_C_INVERTED};
 | 
				
			||||||
  wire [0:0] abc9_ff.init = 1'b0;
 | 
					 | 
				
			||||||
  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
 | 
					  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
module FDSE_1 (output Q, (* techmap_autopurge *) input C, CE, D, S);
 | 
					module FDSE_1 (output Q, (* techmap_autopurge *) input C, CE, D, S);
 | 
				
			||||||
| 
						 | 
					@ -192,11 +193,11 @@ module FDSE_1 (output Q, (* techmap_autopurge *) input C, CE, D, S);
 | 
				
			||||||
      .D(D), .Q($Q), .C(C), .CE(CE), .S(S)
 | 
					      .D(D), .Q($Q), .C(C), .CE(CE), .S(S)
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  end endgenerate
 | 
					  end endgenerate
 | 
				
			||||||
 | 
					  (* abc9_init = 1'b0 *)
 | 
				
			||||||
  $__ABC9_FF_ abc9_ff (.D($Q), .Q(QQ));
 | 
					  $__ABC9_FF_ abc9_ff (.D($Q), .Q(QQ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Special signals
 | 
					  // Special signals
 | 
				
			||||||
  wire [1:0] abc9_ff.clock = {C, 1'b1 /* IS_C_INVERTED */};
 | 
					  wire [1:0] abc9_ff.clock = {C, 1'b1 /* IS_C_INVERTED */};
 | 
				
			||||||
  wire [0:0] abc9_ff.init = 1'b0;
 | 
					 | 
				
			||||||
  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
 | 
					  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -242,11 +243,11 @@ module FDCE (output Q, (* techmap_autopurge *) input C, CE, D, CLR);
 | 
				
			||||||
    // Since this is an async flop, async behaviour is dealt with here
 | 
					    // Since this is an async flop, async behaviour is dealt with here
 | 
				
			||||||
    $__ABC9_ASYNC0 abc_async (.A($QQ), .S(CLR ^ IS_CLR_INVERTED), .Y(QQ));
 | 
					    $__ABC9_ASYNC0 abc_async (.A($QQ), .S(CLR ^ IS_CLR_INVERTED), .Y(QQ));
 | 
				
			||||||
  end endgenerate
 | 
					  end endgenerate
 | 
				
			||||||
 | 
					  (* abc9_init = 1'b0 *)
 | 
				
			||||||
  $__ABC9_FF_ abc9_ff (.D($Q), .Q($QQ));
 | 
					  $__ABC9_FF_ abc9_ff (.D($Q), .Q($QQ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Special signals
 | 
					  // Special signals
 | 
				
			||||||
  wire [1:0] abc9_ff.clock = {C, IS_C_INVERTED};
 | 
					  wire [1:0] abc9_ff.clock = {C, IS_C_INVERTED};
 | 
				
			||||||
  wire [0:0] abc9_ff.init = 1'b0;
 | 
					 | 
				
			||||||
  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
 | 
					  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
module FDCE_1 (output Q, (* techmap_autopurge *) input C, CE, D, CLR);
 | 
					module FDCE_1 (output Q, (* techmap_autopurge *) input C, CE, D, CLR);
 | 
				
			||||||
| 
						 | 
					@ -280,11 +281,11 @@ module FDCE_1 (output Q, (* techmap_autopurge *) input C, CE, D, CLR);
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    $__ABC9_ASYNC0 abc_async (.A($QQ), .S(CLR), .Y(QQ));
 | 
					    $__ABC9_ASYNC0 abc_async (.A($QQ), .S(CLR), .Y(QQ));
 | 
				
			||||||
  end endgenerate
 | 
					  end endgenerate
 | 
				
			||||||
 | 
					  (* abc9_init = 1'b0 *)
 | 
				
			||||||
  $__ABC9_FF_ abc9_ff (.D($Q), .Q($QQ));
 | 
					  $__ABC9_FF_ abc9_ff (.D($Q), .Q($QQ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Special signals
 | 
					  // Special signals
 | 
				
			||||||
  wire [1:0] abc9_ff.clock = {C, 1'b1 /* IS_C_INVERTED */};
 | 
					  wire [1:0] abc9_ff.clock = {C, 1'b1 /* IS_C_INVERTED */};
 | 
				
			||||||
  wire [0:0] abc9_ff.init = 1'b0;
 | 
					 | 
				
			||||||
  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
 | 
					  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -328,11 +329,11 @@ module FDPE (output Q, (* techmap_autopurge *) input C, CE, D, PRE);
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    $__ABC9_ASYNC1 abc_async (.A($QQ), .S(PRE ^ IS_PRE_INVERTED), .Y(QQ));
 | 
					    $__ABC9_ASYNC1 abc_async (.A($QQ), .S(PRE ^ IS_PRE_INVERTED), .Y(QQ));
 | 
				
			||||||
  end endgenerate
 | 
					  end endgenerate
 | 
				
			||||||
 | 
					  (* abc9_init = 1'b0 *)
 | 
				
			||||||
  $__ABC9_FF_ abc9_ff (.D($Q), .Q($QQ));
 | 
					  $__ABC9_FF_ abc9_ff (.D($Q), .Q($QQ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Special signals
 | 
					  // Special signals
 | 
				
			||||||
  wire [1:0] abc9_ff.clock = {C, IS_C_INVERTED};
 | 
					  wire [1:0] abc9_ff.clock = {C, IS_C_INVERTED};
 | 
				
			||||||
  wire [0:0] abc9_ff.init = 1'b0;
 | 
					 | 
				
			||||||
  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
 | 
					  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
module FDPE_1 (output Q, (* techmap_autopurge *) input C, CE, D, PRE);
 | 
					module FDPE_1 (output Q, (* techmap_autopurge *) input C, CE, D, PRE);
 | 
				
			||||||
| 
						 | 
					@ -366,11 +367,11 @@ module FDPE_1 (output Q, (* techmap_autopurge *) input C, CE, D, PRE);
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    $__ABC9_ASYNC1 abc_async (.A($QQ), .S(PRE), .Y(QQ));
 | 
					    $__ABC9_ASYNC1 abc_async (.A($QQ), .S(PRE), .Y(QQ));
 | 
				
			||||||
  end endgenerate
 | 
					  end endgenerate
 | 
				
			||||||
 | 
					  (* abc9_init = 1'b0 *)
 | 
				
			||||||
  $__ABC9_FF_ abc9_ff (.D($Q), .Q($QQ));
 | 
					  $__ABC9_FF_ abc9_ff (.D($Q), .Q($QQ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Special signals
 | 
					  // Special signals
 | 
				
			||||||
  wire [1:0] abc9_ff.clock = {C, 1'b1 /* IS_C_INVERTED */};
 | 
					  wire [1:0] abc9_ff.clock = {C, 1'b1 /* IS_C_INVERTED */};
 | 
				
			||||||
  wire [0:0] abc9_ff.init = 1'b0;
 | 
					 | 
				
			||||||
  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
 | 
					  wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
`endif
 | 
					`endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue