Download server/constants.py from SanketAI/chiforge: direct link, hf CLI and curl.
- Browser
- Download file 749 Bytes
-
https://huggingface.co/spaces/SanketAI/chiforge/resolve/main/server/constants.py
- Command line
-
hf download hf://spaces/SanketAI/chiforge/server/constants.py
-
curl -L -o constants.py https://huggingface.co/spaces/SanketAI/chiforge/resolve/main/server/constants.py
749 Bytes
| """ | |
| Constants used across the ChipForge server environment. | |
| """ | |
| import os | |
| from pathlib import Path | |
| MAX_STEPS = 20 | |
| LOG_TRUNCATE = 2000 # max chars in observation logs | |
| TOOL_TIMEOUT = 30 # seconds | |
| STEP_COST = 0.02 # per-step penalty to encourage efficiency | |
| # Tool paths — absolute for OSS CAD Suite in Docker | |
| VERILATOR = "/opt/oss-cad-suite/bin/verilator" | |
| YOSYS = "/opt/oss-cad-suite/bin/yosys" | |
| VALID_ACTIONS = { | |
| "view_design", | |
| "view_testbench", | |
| "view_synthesis_log", | |
| "view_lint_log", | |
| "view_simulation_log", | |
| "run_simulation", | |
| "run_synthesis", | |
| "run_lint", | |
| "edit_line", | |
| "append_line", | |
| "insert_lines", | |
| "replace_lines", | |
| "write_file", | |
| "submit", | |
| } | |
| TASKS_DIR = Path(__file__).parent / "tasks" | |