mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	FfData: some refactoring.
- FfData now keeps track of the module and underlying cell, if any (so calling emit on FfData created from a cell will replace the existing cell) - FfData implementation is split off to its own .cc file for faster compilation - the "flip FF data sense by inserting inverters in front and after" functionality that zinit uses is moved onto FfData class and beefed up to have dffsr support, to support more use cases
This commit is contained in:
		
							parent
							
								
									356ec7bb39
								
							
						
					
					
						commit
						4e70c30775
					
				
					 14 changed files with 663 additions and 549 deletions
				
			
		| 
						 | 
				
			
			@ -31,6 +31,7 @@ stat
 | 
			
		|||
select -assert-count 1 t:BUFG
 | 
			
		||||
select -assert-count 6 t:FDRE
 | 
			
		||||
select -assert-count 1 t:LUT1
 | 
			
		||||
select -assert-count 8 t:LUT4
 | 
			
		||||
select -assert-max 1 t:LUT3
 | 
			
		||||
select -assert-max 8 t:LUT4
 | 
			
		||||
select -assert-count 5 t:MUXF5
 | 
			
		||||
select -assert-none t:BUFG t:FDRE t:LUT1 t:LUT4 t:MUXF5 %% t:* %D
 | 
			
		||||
select -assert-none t:BUFG t:FDRE t:LUT1 t:LUT3 t:LUT4 t:MUXF5 %% t:* %D
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,7 +20,8 @@ EOT
 | 
			
		|||
equiv_opt -assert -multiclock zinit
 | 
			
		||||
design -load postopt
 | 
			
		||||
 | 
			
		||||
select -assert-count 20 t:$_NOT_
 | 
			
		||||
select -assert-count 16 t:$_NOT_
 | 
			
		||||
select -assert-count 4 t:$xor
 | 
			
		||||
select -assert-count 1 w:unused a:init %i
 | 
			
		||||
select -assert-count 1 w:Q a:init=13'bxxxx1xxxxxxxx %i
 | 
			
		||||
select -assert-count 4 c:dff0 c:dff2 c:dff4 c:dff6 %% t:$_DFF_??1_ %i
 | 
			
		||||
| 
						 | 
				
			
			@ -52,7 +53,7 @@ design -load postopt
 | 
			
		|||
 | 
			
		||||
select -assert-count 0 t:$_NOT_
 | 
			
		||||
select -assert-count 1 w:unused a:init %i
 | 
			
		||||
select -assert-count 1 w:Q a:init=13'bxxxx1xxxxxxxx %i
 | 
			
		||||
select -assert-count 1 w:Q a:init=13'bx00x100000000 %i
 | 
			
		||||
select -assert-count 4 c:dff0 c:dff2 c:dff4 c:dff6 %% t:$_DFF_??0_ %i
 | 
			
		||||
select -assert-count 4 c:dff1 c:dff3 c:dff5 c:dff7 %% t:$_DFF_??1_ %i
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -142,7 +143,7 @@ EOT
 | 
			
		|||
zinit
 | 
			
		||||
 | 
			
		||||
select -assert-count 0 t:$_NOT_
 | 
			
		||||
select -assert-count 0 w:Q a:init %i
 | 
			
		||||
select -assert-count 1 w:Q a:init=24'b0 %i
 | 
			
		||||
select -assert-count 4 c:dff0 c:dff2 c:dff4 c:dff6 %% t:$_DFFE_??0P_ %i
 | 
			
		||||
select -assert-count 4 c:dff1 c:dff3 c:dff5 c:dff7 %% t:$_DFFE_??1P_ %i
 | 
			
		||||
select -assert-count 4 c:dff8 c:dff10 c:dff12 c:dff14 %% t:$_SDFF_??0_ %i
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue