mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Merge pull request #1562 from whitequark/write_cxxrtl
write_cxxrtl: new backend
This commit is contained in:
		
						commit
						7c06cb6157
					
				
					 6 changed files with 2834 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
					@ -546,6 +546,7 @@ $(eval $(call add_include_file,libs/json11/json11.hpp))
 | 
				
			||||||
$(eval $(call add_include_file,passes/fsm/fsmdata.h))
 | 
					$(eval $(call add_include_file,passes/fsm/fsmdata.h))
 | 
				
			||||||
$(eval $(call add_include_file,frontends/ast/ast.h))
 | 
					$(eval $(call add_include_file,frontends/ast/ast.h))
 | 
				
			||||||
$(eval $(call add_include_file,backends/ilang/ilang_backend.h))
 | 
					$(eval $(call add_include_file,backends/ilang/ilang_backend.h))
 | 
				
			||||||
 | 
					$(eval $(call add_include_file,backends/cxxrtl/cxxrtl.h))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
OBJS += kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o kernel/yosys.o
 | 
					OBJS += kernel/driver.o kernel/register.o kernel/rtlil.o kernel/log.o kernel/calc.o kernel/yosys.o
 | 
				
			||||||
OBJS += kernel/cellaigs.o kernel/celledges.o
 | 
					OBJS += kernel/cellaigs.o kernel/celledges.o
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								backends/cxxrtl/Makefile.inc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								backends/cxxrtl/Makefile.inc
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					OBJS += backends/cxxrtl/cxxrtl.o
 | 
				
			||||||
							
								
								
									
										1688
									
								
								backends/cxxrtl/cxxrtl.cc
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1688
									
								
								backends/cxxrtl/cxxrtl.cc
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										1138
									
								
								backends/cxxrtl/cxxrtl.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1138
									
								
								backends/cxxrtl/cxxrtl.h
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -1034,6 +1034,8 @@ void run_backend(std::string filename, std::string command, RTLIL::Design *desig
 | 
				
			||||||
			command = "verilog";
 | 
								command = "verilog";
 | 
				
			||||||
		else if (filename.size() > 3 && filename.compare(filename.size()-3, std::string::npos, ".il") == 0)
 | 
							else if (filename.size() > 3 && filename.compare(filename.size()-3, std::string::npos, ".il") == 0)
 | 
				
			||||||
			command = "ilang";
 | 
								command = "ilang";
 | 
				
			||||||
 | 
							else if (filename.size() > 3 && filename.compare(filename.size()-3, std::string::npos, ".cc") == 0)
 | 
				
			||||||
 | 
								command = "cxxrtl";
 | 
				
			||||||
		else if (filename.size() > 4 && filename.compare(filename.size()-4, std::string::npos, ".aig") == 0)
 | 
							else if (filename.size() > 4 && filename.compare(filename.size()-4, std::string::npos, ".aig") == 0)
 | 
				
			||||||
			command = "aiger";
 | 
								command = "aiger";
 | 
				
			||||||
		else if (filename.size() > 5 && filename.compare(filename.size()-5, std::string::npos, ".blif") == 0)
 | 
							else if (filename.size() > 5 && filename.compare(filename.size()-5, std::string::npos, ".blif") == 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -207,6 +207,7 @@ namespace RTLIL {
 | 
				
			||||||
	struct SigSpec;
 | 
						struct SigSpec;
 | 
				
			||||||
	struct Wire;
 | 
						struct Wire;
 | 
				
			||||||
	struct Cell;
 | 
						struct Cell;
 | 
				
			||||||
 | 
						struct Memory;
 | 
				
			||||||
	struct Module;
 | 
						struct Module;
 | 
				
			||||||
	struct Design;
 | 
						struct Design;
 | 
				
			||||||
	struct Monitor;
 | 
						struct Monitor;
 | 
				
			||||||
| 
						 | 
					@ -229,6 +230,7 @@ using RTLIL::Design;
 | 
				
			||||||
namespace hashlib {
 | 
					namespace hashlib {
 | 
				
			||||||
	template<> struct hash_ops<RTLIL::Wire*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<RTLIL::Wire*> : hash_obj_ops {};
 | 
				
			||||||
	template<> struct hash_ops<RTLIL::Cell*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<RTLIL::Cell*> : hash_obj_ops {};
 | 
				
			||||||
 | 
						template<> struct hash_ops<RTLIL::Memory*> : hash_obj_ops {};
 | 
				
			||||||
	template<> struct hash_ops<RTLIL::Module*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<RTLIL::Module*> : hash_obj_ops {};
 | 
				
			||||||
	template<> struct hash_ops<RTLIL::Design*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<RTLIL::Design*> : hash_obj_ops {};
 | 
				
			||||||
	template<> struct hash_ops<RTLIL::Monitor*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<RTLIL::Monitor*> : hash_obj_ops {};
 | 
				
			||||||
| 
						 | 
					@ -236,6 +238,7 @@ namespace hashlib {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	template<> struct hash_ops<const RTLIL::Wire*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<const RTLIL::Wire*> : hash_obj_ops {};
 | 
				
			||||||
	template<> struct hash_ops<const RTLIL::Cell*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<const RTLIL::Cell*> : hash_obj_ops {};
 | 
				
			||||||
 | 
						template<> struct hash_ops<const RTLIL::Memory*> : hash_obj_ops {};
 | 
				
			||||||
	template<> struct hash_ops<const RTLIL::Module*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<const RTLIL::Module*> : hash_obj_ops {};
 | 
				
			||||||
	template<> struct hash_ops<const RTLIL::Design*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<const RTLIL::Design*> : hash_obj_ops {};
 | 
				
			||||||
	template<> struct hash_ops<const RTLIL::Monitor*> : hash_obj_ops {};
 | 
						template<> struct hash_ops<const RTLIL::Monitor*> : hash_obj_ops {};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue