Skip to content

Commit a3eb2ff

Browse files
committed
Revert some commits
1 parent f806a46 commit a3eb2ff

File tree

7 files changed

+1752
-6152
lines changed

7 files changed

+1752
-6152
lines changed

config/riscv-atom.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

config_generator_core.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,9 @@
6161
)
6262
from core.log import print_green, print_red, print_yellow
6363
from verilator_runner import (
64-
compile_with_dependency_resolution as verilator_compile,
65-
auto_orchestrate as verilator_auto,
66-
)
67-
from verilator_runner_incremental import (
6864
compile_incremental as verilator_incremental,
6965
)
7066
from ghdl_runner import (
71-
analyze_with_dependency_resolution as ghdl_analyze,
72-
auto_orchestrate as ghdl_auto,
73-
)
74-
from ghdl_runner_incremental import (
7567
try_incremental_compilation as ghdl_incremental,
7668
)
7769

@@ -541,16 +533,12 @@ def rank_top_candidates(module_graph, module_graph_inverse, repo_name=None, modu
541533
valid_modules = []
542534
verilog_keywords = {"if", "else", "always", "initial", "begin", "end", "case", "default", "for", "while", "assign"}
543535

544-
print_green(f"[DEBUG] All found modules: {sorted(nodes)}")
545-
546536
for module in nodes:
547537
if (module not in verilog_keywords and
548538
len(module) > 1 and
549539
(module.replace('_', '').isalnum())):
550540
valid_modules.append(module)
551541

552-
print_green(f"[DEBUG] Valid modules after filtering: {sorted(valid_modules)}")
553-
554542
# Find candidates: modules with few parents are preferred
555543
zero_parent_modules = [m for m in valid_modules if not parents_of.get(m, [])]
556544
low_parent_modules = [m for m in valid_modules if len(parents_of.get(m, [])) <= 2]
@@ -612,19 +600,12 @@ def rank_top_candidates(module_graph, module_graph_inverse, repo_name=None, modu
612600

613601
if is_cpu_core and module not in repo_name_matches:
614602
cpu_core_matches.append(module)
615-
print_green(f"[DEBUG] Added likely CPU core: {module}")
616603

617604
candidates = list(set(zero_parent_modules + low_parent_modules + repo_name_matches + cpu_core_matches))
618605

619606
if not candidates:
620607
candidates = valid_modules
621608

622-
# Debug output
623-
print_green(f"[DEBUG] valid_modules count: {len(valid_modules)}")
624-
print_green(f"[DEBUG] zero_parent_modules count: {len(zero_parent_modules)}")
625-
print_green(f"[DEBUG] low_parent_modules count: {len(low_parent_modules)}")
626-
print_green(f"[DEBUG] final candidates count: {len(candidates)}")
627-
628609
repo_lower = (repo_name or "").lower()
629610
scored = []
630611

@@ -858,11 +839,6 @@ def rank_top_candidates(module_graph, module_graph_inverse, repo_name=None, modu
858839
# Sort by score (descending), then by reach (descending), then by name
859840
scored.sort(reverse=True, key=lambda t: (t[0], t[1], t[2]))
860841

861-
# Debug: Print top 20 scored candidates
862-
print_green("[DEBUG] Top 20 scored candidates:")
863-
for i, (s, r, c) in enumerate(scored[:20]):
864-
print_green(f" {i+1}. {c}: score={s}, reach={r}")
865-
866842
ranked = [c for score, _, c in scored if score > -5000]
867843
# If the top few are micro-stage or interface modules, try to skip them in favor of a core-like one
868844
filtered_ranked = [c for c in ranked if not _is_micro_stage_name(c.lower()) and not _is_interface_module_name(c.lower())]

0 commit comments

Comments
 (0)