Skip to content

Commit b1bc816

Browse files
committed
Documentation clean up
- Add architecture documentation - High-level design flow with ASCII diagrams - Core components (signatures, annotations, packages, platforms, steps) - Detailed flow from Python → RTLIL → target outputs - Pin allocation flow diagram - Annotation system architecture - Package system architecture - Configuration system - Extension points (custom signatures, steps, packages, platforms) - Add simulation documentation - Basic simulation workflow - What happens during simulation (6-stage process) - SimPlatform internals and automatic model matching - Port instantiation and clock/reset handling - Generated main.cc structure - Configuration options - Simulation commands (build/run/check) - RTL Debugger integration - Event logging for automated testing - Customizing simulation (adding models, custom drivers) - Performance tips and troubleshooting - Complete working example - Created detailed documentation covering: - How to use pin signatures (UARTSignature, GPIOSignature, etc.) - How to create peripherals with SoftwareDriverSignature - Organizing driver C/H files alongside Python peripherals - Using attach_data() to load software into flash - Complete working examples from chipflow-digital-ip - Added comprehensive IOModelOptions documentation: - Full reference of all available options - Examples showing basic and advanced usage - Details on invert, individual_oe, power_domain, clock_domain - Trip point options (CMOS, TTL, VCORE, VREF, SCHMITT_TRIGGER) - Buffer control and initialization options - Add contributor documentation for pin signature architecture - Annotation infrastructure (amaranth_annotate, submodule_metadata) - IOSignature base classes and IOModelOptions - Concrete pin signatures (UART, GPIO, SPI, etc.) - simulatable_interface and SoftwareDriverSignature decorators - Platform consumption patterns (silicon, software) - Complete flow example from signature definition to code generation - Guide for adding new signatures and platform backends
1 parent 23110ab commit b1bc816

12 files changed

+2432
-729
lines changed

chipflow_lib/platform/silicon_step.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ def prepare(self):
108108

109109
def submit(self, rtlil_path, args):
110110
"""Submit the design to the ChipFlow cloud builder.
111+
111112
Options:
112-
--dry-run: Don't actually submit
113-
--wait: Wait until build has completed. Use '-v' to increase level of verbosity
114-
--log-file <file>: Log full debug output to file
113+
--dry-run: Don't actually submit
114+
--wait: Wait until build has completed. Use '-v' to increase level of verbosity
115+
--log-file <file>: Log full debug output to file
115116
"""
116117
if not args.dry_run:
117118
# Check for CHIPFLOW_API_KEY_SECRET or CHIPFLOW_API_KEY

docs/UNFINISHED_IDEAS.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Ideas Extracted from Unfinished Documentation
2+
3+
This file contains useful ideas extracted from the unfinished documentation before it was removed.
4+
These may be implemented in the future or serve as inspiration for documentation improvements.
5+
6+
## Good Ideas from advanced-configuration.rst
7+
8+
### Environment Variables (REAL - should be documented)
9+
- `CHIPFLOW_ROOT`: Root directory of your project (must contain chipflow.toml)
10+
- `CHIPFLOW_API_KEY`: API key for ChipFlow cloud services
11+
- `CHIPFLOW_API_ENDPOINT`: Custom API endpoint (defaults to https://build.chipflow.org)
12+
- `CHIPFLOW_DEBUG`: Enable debug logging (set to "1")
13+
14+
**Action**: Add environment variable reference to chipflow-commands.rst or chipflow-toml-guide.rst
15+
16+
### Custom Step Implementation Example (REAL - should be documented)
17+
The doc had a good basic example:
18+
```python
19+
from chipflow_lib.steps.silicon import SiliconStep
20+
21+
class CustomSiliconStep(SiliconStep):
22+
def prepare(self):
23+
# Custom preparation logic
24+
result = super().prepare()
25+
# Additional processing
26+
return result
27+
28+
def submit(self, rtlil_path, *, dry_run=False):
29+
# Custom submission logic
30+
if dry_run:
31+
# Custom dry run behavior
32+
return
33+
# Custom submission implementation
34+
```
35+
36+
**Action**: Create dedicated "Customizing Steps" guide with real examples
37+
38+
### Git Integration Notes (REAL - worth mentioning)
39+
- Design submissions include Git commit hash for tracking
40+
- ChipFlow warns if submitting from a dirty Git tree
41+
- Version information is embedded in manufacturing metadata
42+
43+
**Action**: Add to silicon workflow documentation
44+
45+
### CI/CD Integration (REAL)
46+
- Use `CHIPFLOW_API_KEY` environment variable
47+
- Standard CI secret handling practices apply
48+
49+
**Action**: Add brief CI/CD section to getting-started or create CI/CD guide
50+
51+
### Multiple Top-Level Components (REAL but needs clarification)
52+
```toml
53+
[chipflow.top]
54+
soc = "my_design.components:MySoC"
55+
uart = "my_design.peripherals:UART"
56+
```
57+
58+
**Note**: This creates multiple top-level instances, NOT a hierarchy. Need to document what this actually does.
59+
60+
**Action**: Clarify [chipflow.top] behavior in chipflow-toml-guide.rst
61+
62+
## Aspirational Features (Not Implemented)
63+
64+
These were in the docs but don't exist in the codebase. Listed here in case they're planned for future:
65+
66+
### From advanced-configuration.rst:
67+
- `[chipflow.clocks]` - Named clock domain configuration
68+
- `[chipflow.silicon.debug]` - heartbeat, logic_analyzer, jtag options
69+
- `[chipflow.silicon.constraints]` - max_area, max_power, target_frequency
70+
- `[chipflow.deps]` - External IP core integration
71+
- `[chipflow.docs]` - Automatic documentation generation
72+
- `[chipflow.sim.options]` - trace_all, seed, custom cycles
73+
- `[chipflow.sim.test_vectors]` - Test vector file support
74+
- Advanced pad configurations - differential pairs, drive strength (8mA), slew rate, pull-up/down, schmitt trigger
75+
76+
### From workflows.rst:
77+
- Board workflow / FPGA deployment (BoardStep doesn't exist)
78+
- `chipflow silicon validate` command
79+
- `chipflow silicon status` command
80+
- Amaranth.sim-style testbenches (ChipFlow uses CXXRTL)
81+
- VCD waveform dumping
82+
- `[chipflow.board]` configuration section
83+
84+
### From create-project.rst:
85+
- Project scaffolding / `pdm init` workflow
86+
- `platform.request()` API pattern
87+
- `[chipflow.resets]` configuration
88+
89+
## Why These Docs Were Removed
90+
91+
The unfinished docs contained too much aspirational content that:
92+
1. Doesn't match the actual API/config schema
93+
2. References unimplemented features
94+
3. Could confuse users about what's real vs planned
95+
4. Wasn't maintained as the codebase evolved
96+
97+
Better to have accurate documentation of what exists than aspirational docs of what might exist someday.
98+
99+
## What Was Kept
100+
101+
Good ideas from these docs have been incorporated into:
102+
- `architecture.rst` - Overall system architecture
103+
- `simulation-guide.rst` - Complete simulation workflow
104+
- `using-pin-signatures.rst` - Pin configuration (the real way)
105+
- Existing `chipflow-toml-guide.rst` and `chipflow-commands.rst`

0 commit comments

Comments
 (0)