mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-28 10:19:26 +00:00 
			
		
		
		
	Liberty file caching with new libcache command
				
					
				
			This adds optional in-memory caching of parsed liberty files to speed up flows that repeatedly parse the same liberty files. To avoid increasing the memory overhead by default, the caching is disabled by default. The caching can be controlled globally or on a per path basis using the new `libcache` command, which also allows purging cached data.
This commit is contained in:
		
							parent
							
								
									26a4b9b0c6
								
							
						
					
					
						commit
						0f13b55173
					
				
					 9 changed files with 253 additions and 17 deletions
				
			
		
							
								
								
									
										58
									
								
								tests/liberty/libcache.ys
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								tests/liberty/libcache.ys
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,58 @@ | |||
| libcache -enable busdef.lib | ||||
| 
 | ||||
| logger -expect log "Caching is disabled by default." 1 | ||||
| logger -expect log "Caching is enabled for `busdef.lib'." 1 | ||||
| libcache -list | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Caching data" 1 | ||||
| log Caching data | ||||
| read_liberty normal.lib; design -reset | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Caching data" 1 | ||||
| read_liberty -lib busdef.lib; design -reset | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Using caching data" 1 | ||||
| log Using caching data | ||||
| read_liberty normal.lib; design -reset | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Using cached data" 1 | ||||
| read_liberty -lib busdef.lib; design -reset | ||||
| logger -check-expected | ||||
| 
 | ||||
| libcache -purge busdef.lib | ||||
| 
 | ||||
| logger -expect log "Caching is disabled by default." 1 | ||||
| logger -expect log "Caching is enabled for `busdef.lib'." 1 | ||||
| log Caching is enabled for `busdef.lib'. | ||||
| libcache -list | ||||
| logger -check-expected | ||||
| 
 | ||||
| libcache -enable -all | ||||
| 
 | ||||
| logger -expect log "Caching is enabled by default." 1 | ||||
| libcache -list | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Caching data" 1 | ||||
| read_liberty normal.lib; design -reset | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Caching data" 1 | ||||
| read_liberty -lib busdef.lib; design -reset | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Using cached data" 1 | ||||
| read_liberty -lib busdef.lib; design -reset | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Using cached data" 1 | ||||
| read_liberty normal.lib; design -reset | ||||
| logger -check-expected | ||||
| 
 | ||||
| logger -expect log "Using cached data" 1 | ||||
| dfflibmap -liberty normal.lib | ||||
| logger -check-expected | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue