mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	sdc: unknown handler experiment
This commit is contained in:
		
							parent
							
								
									c9488c4fd0
								
							
						
					
					
						commit
						4a347db75a
					
				
					 2 changed files with 18 additions and 10 deletions
				
			
		|  | @ -384,7 +384,7 @@ public: | |||
| 			log_error("Tcl_Init() call failed - %s\n",Tcl_ErrnoMsg(Tcl_GetErrno())); | ||||
| 
 | ||||
| 		objects = std::make_unique<SdcObjects>(design); | ||||
| 		objects->collect_mode = SdcObjects::CollectMode::FullConstraint; | ||||
| 		objects->collect_mode = SdcObjects::CollectMode::SimpleGetter; | ||||
| 		Tcl_CreateObjCommand(interp, "get_pins", sdc_get_pins_cmd, (ClientData) objects.get(), NULL); | ||||
| 		Tcl_CreateObjCommand(interp, "get_ports", sdc_get_ports_cmd, (ClientData) objects.get(), NULL); | ||||
| 		Tcl_CreateObjCommand(interp, "ys_track_typed_key", ys_track_typed_key_cmd, (ClientData) objects.get(), NULL); | ||||
|  | @ -396,7 +396,8 @@ public: | |||
| struct SdcPass : public Pass { | ||||
| 	// TODO help
 | ||||
| 	SdcPass() : Pass("sdc", "sniff at some SDC") { } | ||||
| 	void execute(std::vector<std::string> args, RTLIL::Design *design) override { | ||||
| void execute(std::vector<std::string> args, RTLIL::Design *design) override { | ||||
| 		log_header(design, "Executing SDC pass.\n"); | ||||
| 		// if (args.size() < 2)
 | ||||
| 		// 	log_cmd_error("Missing SDC file.\n");
 | ||||
| 		// TODO optional extra stub file
 | ||||
|  |  | |||
|  | @ -7,15 +7,22 @@ proc is_suppressed {args} { | |||
|     return 0 | ||||
| } | ||||
| 
 | ||||
| proc create_clock {args} { | ||||
|     return "CLOCK@" | ||||
| } | ||||
| proc get_clocks {args} { | ||||
|     return "CLOCK@" | ||||
| } | ||||
| 
 | ||||
| stub current_design | ||||
| # stub current_design | ||||
| #stub ys_track_typed_key | ||||
| stub ys_track_untyped_key | ||||
| stub ys_err_key | ||||
| stub ys_err_flag | ||||
| 
 | ||||
| proc unknown {args} { | ||||
|     global sdc_call_index | ||||
|     global sdc_calls | ||||
|     if {![info exists sdc_call_index]} { | ||||
|         set sdc_call_index 0 | ||||
|     } | ||||
|     if {![info exists sdc_calls]} { | ||||
|         set sdc_calls {} | ||||
|     } | ||||
|     incr sdc_call_index | ||||
|     lappend sdc_calls $args | ||||
|     return $sdc_call_index | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue