mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 19:52:31 +00:00 
			
		
		
		
	memory_libmap: print message about attributes forcing ram kind
This commit is contained in:
		
							parent
							
								
									911a76affa
								
							
						
					
					
						commit
						7542146fc5
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -431,6 +431,7 @@ void MemMapping::determine_style() { | ||||||
| 	style = ""; | 	style = ""; | ||||||
| 	if (mem.get_bool_attribute(ID::lram)) { | 	if (mem.get_bool_attribute(ID::lram)) { | ||||||
| 		kind = RamKind::Huge; | 		kind = RamKind::Huge; | ||||||
|  | 		log("found attribute 'lram' on memory %s.%s, forced mapping to huge RAM\n", log_id(mem.module->name), log_id(mem.memid)); | ||||||
| 		return; | 		return; | ||||||
| 	} | 	} | ||||||
| 	for (auto attr: {ID::ram_block, ID::rom_block, ID::ram_style, ID::rom_style, ID::ramstyle, ID::romstyle, ID::syn_ramstyle, ID::syn_romstyle}) { | 	for (auto attr: {ID::ram_block, ID::rom_block, ID::ram_style, ID::rom_style, ID::ramstyle, ID::romstyle, ID::syn_ramstyle, ID::syn_romstyle}) { | ||||||
|  | @ -438,6 +439,7 @@ void MemMapping::determine_style() { | ||||||
| 			Const val = mem.attributes.at(attr); | 			Const val = mem.attributes.at(attr); | ||||||
| 			if (val == 1) { | 			if (val == 1) { | ||||||
| 				kind = RamKind::NotLogic; | 				kind = RamKind::NotLogic; | ||||||
|  | 				log("found attribute '%s = 1' on memory %s.%s, disabled mapping to FF\n", log_id(attr), log_id(mem.module->name), log_id(mem.memid)); | ||||||
| 				return; | 				return; | ||||||
| 			} | 			} | ||||||
| 			std::string val_s = val.decode_string(); | 			std::string val_s = val.decode_string(); | ||||||
|  | @ -450,15 +452,20 @@ void MemMapping::determine_style() { | ||||||
| 				// Nothing.
 | 				// Nothing.
 | ||||||
| 			} else if (val_s == "logic" || val_s == "registers") { | 			} else if (val_s == "logic" || val_s == "registers") { | ||||||
| 				kind = RamKind::Logic; | 				kind = RamKind::Logic; | ||||||
|  | 				log("found attribute '%s = %s' on memory %s.%s, forced mapping to FF\n", log_id(attr), val_s.c_str(), log_id(mem.module->name), log_id(mem.memid)); | ||||||
| 			} else if (val_s == "distributed") { | 			} else if (val_s == "distributed") { | ||||||
| 				kind = RamKind::Distributed; | 				kind = RamKind::Distributed; | ||||||
|  | 				log("found attribute '%s = %s' on memory %s.%s, forced mapping to distributed RAM\n", log_id(attr), val_s.c_str(), log_id(mem.module->name), log_id(mem.memid)); | ||||||
| 			} else if (val_s == "block" || val_s == "block_ram" || val_s == "ebr") { | 			} else if (val_s == "block" || val_s == "block_ram" || val_s == "ebr") { | ||||||
| 				kind = RamKind::Block; | 				kind = RamKind::Block; | ||||||
|  | 				log("found attribute '%s = %s' on memory %s.%s, forced mapping to block RAM\n", log_id(attr), val_s.c_str(), log_id(mem.module->name), log_id(mem.memid)); | ||||||
| 			} else if (val_s == "huge" || val_s == "ultra") { | 			} else if (val_s == "huge" || val_s == "ultra") { | ||||||
| 				kind = RamKind::Huge; | 				kind = RamKind::Huge; | ||||||
|  | 				log("found attribute '%s = %s' on memory %s.%s, forced mapping to huge RAM\n", log_id(attr), val_s.c_str(), log_id(mem.module->name), log_id(mem.memid)); | ||||||
| 			} else { | 			} else { | ||||||
| 				kind = RamKind::NotLogic; | 				kind = RamKind::NotLogic; | ||||||
| 				style = val_s; | 				style = val_s; | ||||||
|  | 				log("found attribute '%s = %s' on memory %s.%s, forced mapping to %s RAM\n", log_id(attr), val_s.c_str(), log_id(mem.module->name), log_id(mem.memid), val_s.c_str()); | ||||||
| 			} | 			} | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue