Skip to content

Commit a76faec

Browse files
committed
sdc: remove vestigial code for tracked constraint followup work
1 parent 35801c2 commit a76faec

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

passes/cmds/sdc/sdc.cc

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -585,14 +585,6 @@ struct GetterOpts : TclOpts {
585585
}
586586
};
587587

588-
// void build_normal_result(Tcl_Interp* interp, size_t list_len, size_t width, const std::string& name, Tcl_Obj*& result, const BitSelection& matching_bits) {
589-
// if (!result)
590-
// result = Tcl_NewListObj(list_len, nullptr);
591-
// for (size_t i = 0; i < width; i++)
592-
// if (matching_bits.is_set(i))
593-
// Tcl_ListObjAppendElement(interp, result, Tcl_NewStringObj(name.c_str(), name.size()));
594-
// }
595-
596588
template <typename T>
597589
void merge_or_init(const T& key, dict<T, BitSelection>& dst, const BitSelection& src) {
598590
if (dst.count(key) == 0) {
@@ -683,62 +675,6 @@ void apply_args(Tcl_Interp *interp, std::function<void(const char*)> op, Tcl_Obj
683675
}
684676
}
685677

686-
static int ys_track_typed_key_cmd(ClientData data, Tcl_Interp *interp, int objc, Tcl_Obj* const objv[])
687-
{
688-
log("ys_track_typed_key_cmd\n");
689-
auto* objects = (SdcObjects*)data;
690-
if (objc != 5)
691-
log_error("ys_track_typed_key: Unexpected number of arguments: %d (expected 5)\n", objc);
692-
693-
if (objects->collect_mode != SdcObjects::CollectMode::FullConstraint)
694-
return TCL_OK;
695-
696-
std::string key_name = Tcl_GetString(objv[1]);
697-
Tcl_Obj* key_value = objv[2];
698-
std::string key_expect_type = Tcl_GetString(objv[3]);
699-
std::string proc_name = Tcl_GetString(objv[4]);
700-
701-
auto track_typed = [key_expect_type, objects, proc_name, key_name](const char* str) -> void {
702-
auto split = split_at(str);
703-
if (!split)
704-
log_error("%s: key %s should be a typed SDC object, but is something weird: %s\n",
705-
proc_name.c_str(), key_name.c_str(), str);
706-
707-
if (key_expect_type == "pin") {
708-
log("PIN! %s\n", str);
709-
bool found = false;
710-
for (auto [name, pin] : objects->design_pins) {
711-
log_error("TODO temporarily disabled due to working on a different flow\n");
712-
// if (name + "/" + pin.name.str() == str) {
713-
// found = true;
714-
// objects->constrained_pins.insert(std::make_pair(name, pin));
715-
// break; // resolved, expected unique
716-
// }
717-
}
718-
if (!found)
719-
log_error("%s: pin %s not found\n", proc_name.c_str(), str);
720-
} else if (key_expect_type == "port") {
721-
bool found = false;
722-
log_error("TODO temporarily disabled due to working on a different flow\n");
723-
// for (auto [name, ] : objects->design_ports) {
724-
// if (name == str) {
725-
// found = true;
726-
// objects->constrained_ports.insert(name);
727-
// break; // resolved, expected unique
728-
// }
729-
// }
730-
if (!found)
731-
log_error("%s: port %s not found\n", proc_name.c_str(), str);
732-
} else {
733-
// TODO
734-
log_warning("%s: unsupported type %s\n", proc_name.c_str(), key_expect_type.c_str());
735-
}
736-
};
737-
apply_args(interp, track_typed, key_value);
738-
return TCL_OK;
739-
}
740-
741-
742678
class SDCInterpreter
743679
{
744680
private:

0 commit comments

Comments
 (0)