chipfoundry-cli 1.2.0__tar.gz → 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chipfoundry_cli-1.2.0 → chipfoundry_cli-1.2.2}/PKG-INFO +267 -12
- {chipfoundry_cli-1.2.0 → chipfoundry_cli-1.2.2}/README.md +266 -11
- {chipfoundry_cli-1.2.0 → chipfoundry_cli-1.2.2}/chipfoundry_cli/main.py +340 -21
- {chipfoundry_cli-1.2.0 → chipfoundry_cli-1.2.2}/chipfoundry_cli/utils.py +218 -2
- {chipfoundry_cli-1.2.0 → chipfoundry_cli-1.2.2}/pyproject.toml +1 -1
- {chipfoundry_cli-1.2.0 → chipfoundry_cli-1.2.2}/LICENSE +0 -0
- {chipfoundry_cli-1.2.0 → chipfoundry_cli-1.2.2}/chipfoundry_cli/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: chipfoundry-cli
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: CLI tool to automate ChipFoundry project submission to SFTP server
|
|
5
5
|
Home-page: https://chipfoundry.io
|
|
6
6
|
License: Apache-2.0
|
|
@@ -59,39 +59,45 @@ cf --help
|
|
|
59
59
|
cd my_project
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
2. **
|
|
62
|
+
2. **Initialize your project** (required first step):
|
|
63
|
+
```bash
|
|
64
|
+
cf init
|
|
65
|
+
```
|
|
66
|
+
This creates `.cf/project.json` with project metadata. **Must be run before any other commands.**
|
|
67
|
+
|
|
68
|
+
3. **Set up the project** (replaces `make setup`):
|
|
63
69
|
```bash
|
|
64
70
|
cf setup
|
|
65
71
|
```
|
|
66
72
|
|
|
67
|
-
|
|
73
|
+
4. **Generate SSH Key** (if you don't have one):
|
|
68
74
|
```bash
|
|
69
75
|
cf keygen
|
|
70
76
|
```
|
|
71
77
|
|
|
72
|
-
|
|
78
|
+
5. **Register your key** at [https://chipfoundry.io/sftp-registration](https://chipfoundry.io/sftp-registration)
|
|
73
79
|
|
|
74
|
-
|
|
80
|
+
6. **Configure your credentials**:
|
|
75
81
|
```bash
|
|
76
82
|
cf config
|
|
77
83
|
```
|
|
78
84
|
|
|
79
|
-
|
|
85
|
+
7. **Upload your project**:
|
|
80
86
|
```bash
|
|
81
87
|
cf push
|
|
82
88
|
```
|
|
83
89
|
|
|
84
|
-
|
|
90
|
+
8. **Download results** (when available):
|
|
85
91
|
```bash
|
|
86
92
|
cf pull
|
|
87
93
|
```
|
|
88
94
|
|
|
89
|
-
|
|
95
|
+
9. **View tapeout report**:
|
|
90
96
|
```bash
|
|
91
97
|
cf view-tapeout-report
|
|
92
98
|
```
|
|
93
99
|
|
|
94
|
-
|
|
100
|
+
10. **Confirm final tapeout** (when ready to send GDS to foundry):
|
|
95
101
|
```bash
|
|
96
102
|
cf confirm
|
|
97
103
|
```
|
|
@@ -222,10 +228,23 @@ cf config
|
|
|
222
228
|
cf init [--project-root DIRECTORY]
|
|
223
229
|
```
|
|
224
230
|
|
|
231
|
+
> [!IMPORTANT]
|
|
232
|
+
> This command **must be run first** after cloning a repository. It is required before running:
|
|
233
|
+
> - `cf gpio-config`
|
|
234
|
+
> - `cf harden`
|
|
235
|
+
> - `cf precheck`
|
|
236
|
+
> - `cf verify`
|
|
237
|
+
> - `cf push`
|
|
238
|
+
>
|
|
239
|
+
> If you skip this step, other commands will show an error directing you to run `cf init` first.
|
|
240
|
+
|
|
241
|
+
**What it does:**
|
|
225
242
|
- **Smart defaults**: Auto-detects project name from directory and project type from GDS files
|
|
226
243
|
- **Interactive prompts**: Shows detected values in prompts for easy acceptance
|
|
227
244
|
- Creates `.cf/project.json` with project metadata
|
|
228
|
-
|
|
245
|
+
|
|
246
|
+
> [!NOTE]
|
|
247
|
+
> GDS hash is generated during `push`, not `init`
|
|
229
248
|
|
|
230
249
|
### Setup a ChipFoundry Project
|
|
231
250
|
|
|
@@ -235,6 +254,9 @@ cf setup [OPTIONS]
|
|
|
235
254
|
|
|
236
255
|
**Replaces `make setup`** - Comprehensive project setup with all dependencies.
|
|
237
256
|
|
|
257
|
+
**Prerequisites:**
|
|
258
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
259
|
+
|
|
238
260
|
**What it does:**
|
|
239
261
|
1. Initializes project configuration (`.cf/project.json`)
|
|
240
262
|
2. Syncs with upstream repository
|
|
@@ -275,6 +297,237 @@ cf setup --skip-openlane --skip-pdk
|
|
|
275
297
|
- Detailed documentation: [docs/cf-setup.md](docs/cf-setup.md)
|
|
276
298
|
- Migration guide: [docs/MIGRATION.md](docs/MIGRATION.md)
|
|
277
299
|
|
|
300
|
+
### Configure GPIO Settings
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
cf gpio-config [--project-root DIRECTORY]
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Replaces manual editing of `verilog/rtl/user_defines.v`** - Interactive GPIO configuration tool.
|
|
307
|
+
|
|
308
|
+
**Prerequisites:**
|
|
309
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
310
|
+
- GPIO configuration is required before `cf precheck` or `cf verify`
|
|
311
|
+
|
|
312
|
+
**What it does:**
|
|
313
|
+
1. Presents an interactive form for configuring GPIO pins 5-37 (GPIO 0-4 are fixed system pins)
|
|
314
|
+
2. Shows available GPIO modes in a table with descriptions
|
|
315
|
+
3. Allows selection by number, partial key, or full mode name
|
|
316
|
+
4. Saves configuration to `.cf/project.json` (as hex values)
|
|
317
|
+
5. Automatically updates `verilog/rtl/user_defines.v` with the new configuration
|
|
318
|
+
6. Automatically runs `gen_gpio_defaults.py` to generate GPIO defaults for simulation (if Caravel is installed)
|
|
319
|
+
|
|
320
|
+
**Prerequisites:**
|
|
321
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
322
|
+
- Must be run before `cf precheck` or `cf verify`
|
|
323
|
+
- GPIO configuration is required for verification and precheck to run
|
|
324
|
+
|
|
325
|
+
**GPIO Modes Available:**
|
|
326
|
+
- Management modes: `mgmt_input_nopull`, `mgmt_input_pulldown`, `mgmt_input_pullup`, `mgmt_output`, `mgmt_bidirectional`, `mgmt_analog`
|
|
327
|
+
- User modes: `user_input_nopull`, `user_input_pulldown`, `user_input_pullup`, `user_output`, `user_bidirectional`, `user_output_monitored`, `user_analog`
|
|
328
|
+
|
|
329
|
+
**Usage:**
|
|
330
|
+
- Enter a number (1-13) to select a mode from the table
|
|
331
|
+
- Enter a partial key (e.g., "user_out" matches "user_output")
|
|
332
|
+
- Enter the full key name (e.g., "user_output")
|
|
333
|
+
- Press Enter to keep current valid value (invalid values require input)
|
|
334
|
+
|
|
335
|
+
**Examples:**
|
|
336
|
+
```bash
|
|
337
|
+
# Configure GPIO settings interactively
|
|
338
|
+
cf gpio-config
|
|
339
|
+
|
|
340
|
+
# Configure for a specific project directory
|
|
341
|
+
cf gpio-config --project-root /path/to/project
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
**What gets updated:**
|
|
345
|
+
- `.cf/project.json`: GPIO configuration stored as hex values (e.g., `"5": "13'h1808"`)
|
|
346
|
+
- `verilog/rtl/user_defines.v`: GPIO mode definitions updated (e.g., `USER_CONFIG_GPIO_5_INIT`)
|
|
347
|
+
|
|
348
|
+
> [!NOTE]
|
|
349
|
+
> Invalid modes cannot be saved. All GPIOs must have valid configurations.
|
|
350
|
+
|
|
351
|
+
### Harden a Macro
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
cf harden [MACRO] [OPTIONS]
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**Replaces `make harden` and `make <macro_name>`** - Harden macros using LibreLane/OpenLane.
|
|
358
|
+
|
|
359
|
+
**Prerequisites:**
|
|
360
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
361
|
+
- OpenLane must be installed (via `cf setup`)
|
|
362
|
+
|
|
363
|
+
**What it does:**
|
|
364
|
+
1. Lists available macros in `openlane/` directory
|
|
365
|
+
2. Runs the hardening flow (synthesis, placement, routing) for a specific macro
|
|
366
|
+
3. Generates GDS, LEF, and other output files
|
|
367
|
+
4. Supports both Nix and Docker execution environments
|
|
368
|
+
|
|
369
|
+
**Key Options:**
|
|
370
|
+
- `--list` or no argument: List all available macros
|
|
371
|
+
- `MACRO`: Name of macro to harden (e.g., `user_proj_example`, `user_project_wrapper`)
|
|
372
|
+
- `--project-root`: Specify project directory
|
|
373
|
+
- `--tag`: Custom run tag (defaults to timestamp)
|
|
374
|
+
- `--pdk`: PDK to use (default: sky130A)
|
|
375
|
+
- `--use-nix`: Force use of Nix (fails if Nix not available)
|
|
376
|
+
- `--use-docker`: Force use of Docker (fails if Docker not available)
|
|
377
|
+
- `--dry-run`: Show configuration without running
|
|
378
|
+
|
|
379
|
+
**Examples:**
|
|
380
|
+
```bash
|
|
381
|
+
# List all available macros
|
|
382
|
+
cf harden --list
|
|
383
|
+
|
|
384
|
+
# Harden a specific macro (replaces make user_proj_example)
|
|
385
|
+
cf harden user_proj_example
|
|
386
|
+
|
|
387
|
+
# Harden with custom tag and PDK
|
|
388
|
+
cf harden user_proj_example --tag my_run --pdk sky130B
|
|
389
|
+
|
|
390
|
+
# Preview hardening configuration
|
|
391
|
+
cf harden user_proj_example --dry-run
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
**Workflow:**
|
|
395
|
+
1. **Macro Hardening**: Harden individual macros first
|
|
396
|
+
```bash
|
|
397
|
+
cf harden user_proj_example
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
2. **Integration**: Update `openlane/user_project_wrapper/config.json` to reference your macros
|
|
401
|
+
|
|
402
|
+
3. **Wrapper Hardening**: Harden the top-level wrapper
|
|
403
|
+
```bash
|
|
404
|
+
cf harden user_project_wrapper
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**Output Files:**
|
|
408
|
+
- `gds/<macro>.gds` - GDSII layout file
|
|
409
|
+
- `lef/<macro>.lef` - LEF file for integration
|
|
410
|
+
- `verilog/gl/<macro>.v` - Gate-level netlist
|
|
411
|
+
- `spef/<macro>.spef` - Parasitic extraction file
|
|
412
|
+
- `sdc/<macro>.sdc` - Timing constraints
|
|
413
|
+
|
|
414
|
+
### Run Precheck Validation
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
cf precheck [OPTIONS]
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**Replaces `make precheck`** - Run MPW precheck validation on your project.
|
|
421
|
+
|
|
422
|
+
**Prerequisites:**
|
|
423
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
424
|
+
- **Must run `cf gpio-config` first** - GPIO configuration is required
|
|
425
|
+
- Precheck tools must be installed (via `cf setup`)
|
|
426
|
+
- PDK must be installed (via `cf setup`)
|
|
427
|
+
- Docker must be available
|
|
428
|
+
|
|
429
|
+
**What it does:**
|
|
430
|
+
1. Validates your design against MPW (Multi-Project Wafer) requirements
|
|
431
|
+
2. Runs DRC, LVS, and other design rule checks
|
|
432
|
+
3. Ensures your design will fit into the SoC reference design
|
|
433
|
+
4. Generates reports highlighting any violations
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
**Key Options:**
|
|
437
|
+
- `--project-root`: Specify project directory
|
|
438
|
+
- `--disable-lvs`: Skip LVS check, run specific checks only
|
|
439
|
+
- `--checks`: Run specific checks (can be specified multiple times)
|
|
440
|
+
- Available: `license`, `makefile`, `default`, `documentation`, `consistency`, `gpio_defines`, `xor`, `magic_drc`, `klayout_feol`, `klayout_beol`, `klayout_offgrid`, `klayout_met_min_ca_density`, `klayout_pin_label_purposes_overlapping_drawing`, `klayout_zeroarea`
|
|
441
|
+
- `--dry-run`: Show command without running
|
|
442
|
+
|
|
443
|
+
**Examples:**
|
|
444
|
+
```bash
|
|
445
|
+
# Run all precheck validations (replaces make precheck)
|
|
446
|
+
cf precheck
|
|
447
|
+
|
|
448
|
+
# Run without LVS check
|
|
449
|
+
cf precheck --disable-lvs
|
|
450
|
+
|
|
451
|
+
# Run specific checks only
|
|
452
|
+
cf precheck --checks license --checks makefile --checks gpio_defines
|
|
453
|
+
|
|
454
|
+
# Preview precheck command
|
|
455
|
+
cf precheck --dry-run
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
**What gets checked:**
|
|
459
|
+
- License compliance
|
|
460
|
+
- Makefile structure
|
|
461
|
+
- GPIO configuration validity
|
|
462
|
+
- Design consistency
|
|
463
|
+
- DRC (Design Rule Check)
|
|
464
|
+
- LVS (Layout vs Schematic)
|
|
465
|
+
- And more...
|
|
466
|
+
|
|
467
|
+
> [!NOTE]
|
|
468
|
+
> Precheck is required before submitting your design for fabrication.
|
|
469
|
+
|
|
470
|
+
### Run Verification Tests
|
|
471
|
+
|
|
472
|
+
```bash
|
|
473
|
+
cf verify [TEST] [OPTIONS]
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
**Replaces `make verify-<test>-rtl` and `make verify-<test>-gl`** - Run Cocotb verification tests.
|
|
477
|
+
|
|
478
|
+
**Prerequisites:**
|
|
479
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
480
|
+
- **Must run `cf gpio-config` first** - GPIO configuration is required
|
|
481
|
+
- Cocotb environment must be set up (via `cf setup`)
|
|
482
|
+
- Caravel must be installed (via `cf setup`)
|
|
483
|
+
|
|
484
|
+
**What it does:**
|
|
485
|
+
1. Runs functional verification tests using Cocotb
|
|
486
|
+
2. Supports both RTL and gate-level (GL) simulations
|
|
487
|
+
3. Can run individual tests or all tests
|
|
488
|
+
4. Uses Docker container for consistent test environment
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
**Key Options:**
|
|
492
|
+
- `TEST`: Name of specific test to run (e.g., `counter_la`)
|
|
493
|
+
- `--project-root`: Specify project directory
|
|
494
|
+
- `--sim`: Simulation type - `rtl` (default) or `gl` (gate-level)
|
|
495
|
+
- `--list`: List all available tests
|
|
496
|
+
- `--all`: Run all tests
|
|
497
|
+
- `--tag`: Run tests from a specific YAML test list (e.g., `user_proj_tests`)
|
|
498
|
+
- `--dry-run`: Show configuration without running
|
|
499
|
+
|
|
500
|
+
**Examples:**
|
|
501
|
+
```bash
|
|
502
|
+
# List all available tests
|
|
503
|
+
cf verify --list
|
|
504
|
+
|
|
505
|
+
# Run a specific test (RTL simulation, replaces make verify-counter_la-rtl)
|
|
506
|
+
cf verify counter_la
|
|
507
|
+
|
|
508
|
+
# Run gate-level simulation (replaces make verify-counter_la-gl)
|
|
509
|
+
cf verify counter_la --sim gl
|
|
510
|
+
|
|
511
|
+
# Run all tests
|
|
512
|
+
cf verify --all
|
|
513
|
+
|
|
514
|
+
# Run all RTL tests
|
|
515
|
+
cf verify --all --sim rtl
|
|
516
|
+
|
|
517
|
+
# Run tests from a specific test list
|
|
518
|
+
cf verify --tag user_proj_tests
|
|
519
|
+
|
|
520
|
+
# Preview verification command
|
|
521
|
+
cf verify counter_la --dry-run
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
**Test Types:**
|
|
525
|
+
- **RTL Simulation**: Tests your RTL design
|
|
526
|
+
- **Gate-Level (GL) Simulation**: Tests the synthesized gate-level netlist
|
|
527
|
+
|
|
528
|
+
> [!NOTE]
|
|
529
|
+
> Verification tests ensure your design works correctly before hardening and submission.
|
|
530
|
+
|
|
278
531
|
### Push a Project (Upload)
|
|
279
532
|
|
|
280
533
|
```bash
|
|
@@ -336,7 +589,8 @@ cf confirm [OPTIONS]
|
|
|
336
589
|
- `--sftp-username`: Override configured username
|
|
337
590
|
- `--sftp-key`: Override configured key path
|
|
338
591
|
|
|
339
|
-
|
|
592
|
+
> [!IMPORTANT]
|
|
593
|
+
> This command confirms that your current GDS file is ready to be sent to the foundry for tapeout. Only run this when you are completely satisfied with your design and ready for final tapeout processing. This action cannot be easily undone.
|
|
340
594
|
|
|
341
595
|
### View Tapeout Report
|
|
342
596
|
|
|
@@ -455,7 +709,8 @@ The CLI tracks your project submission state through the `submission_state` fiel
|
|
|
455
709
|
cf confirm # Confirm current GDS file is ready for foundry tapeout
|
|
456
710
|
```
|
|
457
711
|
|
|
458
|
-
|
|
712
|
+
> [!IMPORTANT]
|
|
713
|
+
> Only run `cf confirm` when you are completely satisfied with your GDS file and ready to send it to the foundry for tapeout processing. This action cannot be easily undone.
|
|
459
714
|
|
|
460
715
|
---
|
|
461
716
|
|
|
@@ -34,39 +34,45 @@ cf --help
|
|
|
34
34
|
cd my_project
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
2. **
|
|
37
|
+
2. **Initialize your project** (required first step):
|
|
38
|
+
```bash
|
|
39
|
+
cf init
|
|
40
|
+
```
|
|
41
|
+
This creates `.cf/project.json` with project metadata. **Must be run before any other commands.**
|
|
42
|
+
|
|
43
|
+
3. **Set up the project** (replaces `make setup`):
|
|
38
44
|
```bash
|
|
39
45
|
cf setup
|
|
40
46
|
```
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
4. **Generate SSH Key** (if you don't have one):
|
|
43
49
|
```bash
|
|
44
50
|
cf keygen
|
|
45
51
|
```
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+
5. **Register your key** at [https://chipfoundry.io/sftp-registration](https://chipfoundry.io/sftp-registration)
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
6. **Configure your credentials**:
|
|
50
56
|
```bash
|
|
51
57
|
cf config
|
|
52
58
|
```
|
|
53
59
|
|
|
54
|
-
|
|
60
|
+
7. **Upload your project**:
|
|
55
61
|
```bash
|
|
56
62
|
cf push
|
|
57
63
|
```
|
|
58
64
|
|
|
59
|
-
|
|
65
|
+
8. **Download results** (when available):
|
|
60
66
|
```bash
|
|
61
67
|
cf pull
|
|
62
68
|
```
|
|
63
69
|
|
|
64
|
-
|
|
70
|
+
9. **View tapeout report**:
|
|
65
71
|
```bash
|
|
66
72
|
cf view-tapeout-report
|
|
67
73
|
```
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
10. **Confirm final tapeout** (when ready to send GDS to foundry):
|
|
70
76
|
```bash
|
|
71
77
|
cf confirm
|
|
72
78
|
```
|
|
@@ -197,10 +203,23 @@ cf config
|
|
|
197
203
|
cf init [--project-root DIRECTORY]
|
|
198
204
|
```
|
|
199
205
|
|
|
206
|
+
> [!IMPORTANT]
|
|
207
|
+
> This command **must be run first** after cloning a repository. It is required before running:
|
|
208
|
+
> - `cf gpio-config`
|
|
209
|
+
> - `cf harden`
|
|
210
|
+
> - `cf precheck`
|
|
211
|
+
> - `cf verify`
|
|
212
|
+
> - `cf push`
|
|
213
|
+
>
|
|
214
|
+
> If you skip this step, other commands will show an error directing you to run `cf init` first.
|
|
215
|
+
|
|
216
|
+
**What it does:**
|
|
200
217
|
- **Smart defaults**: Auto-detects project name from directory and project type from GDS files
|
|
201
218
|
- **Interactive prompts**: Shows detected values in prompts for easy acceptance
|
|
202
219
|
- Creates `.cf/project.json` with project metadata
|
|
203
|
-
|
|
220
|
+
|
|
221
|
+
> [!NOTE]
|
|
222
|
+
> GDS hash is generated during `push`, not `init`
|
|
204
223
|
|
|
205
224
|
### Setup a ChipFoundry Project
|
|
206
225
|
|
|
@@ -210,6 +229,9 @@ cf setup [OPTIONS]
|
|
|
210
229
|
|
|
211
230
|
**Replaces `make setup`** - Comprehensive project setup with all dependencies.
|
|
212
231
|
|
|
232
|
+
**Prerequisites:**
|
|
233
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
234
|
+
|
|
213
235
|
**What it does:**
|
|
214
236
|
1. Initializes project configuration (`.cf/project.json`)
|
|
215
237
|
2. Syncs with upstream repository
|
|
@@ -250,6 +272,237 @@ cf setup --skip-openlane --skip-pdk
|
|
|
250
272
|
- Detailed documentation: [docs/cf-setup.md](docs/cf-setup.md)
|
|
251
273
|
- Migration guide: [docs/MIGRATION.md](docs/MIGRATION.md)
|
|
252
274
|
|
|
275
|
+
### Configure GPIO Settings
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
cf gpio-config [--project-root DIRECTORY]
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Replaces manual editing of `verilog/rtl/user_defines.v`** - Interactive GPIO configuration tool.
|
|
282
|
+
|
|
283
|
+
**Prerequisites:**
|
|
284
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
285
|
+
- GPIO configuration is required before `cf precheck` or `cf verify`
|
|
286
|
+
|
|
287
|
+
**What it does:**
|
|
288
|
+
1. Presents an interactive form for configuring GPIO pins 5-37 (GPIO 0-4 are fixed system pins)
|
|
289
|
+
2. Shows available GPIO modes in a table with descriptions
|
|
290
|
+
3. Allows selection by number, partial key, or full mode name
|
|
291
|
+
4. Saves configuration to `.cf/project.json` (as hex values)
|
|
292
|
+
5. Automatically updates `verilog/rtl/user_defines.v` with the new configuration
|
|
293
|
+
6. Automatically runs `gen_gpio_defaults.py` to generate GPIO defaults for simulation (if Caravel is installed)
|
|
294
|
+
|
|
295
|
+
**Prerequisites:**
|
|
296
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
297
|
+
- Must be run before `cf precheck` or `cf verify`
|
|
298
|
+
- GPIO configuration is required for verification and precheck to run
|
|
299
|
+
|
|
300
|
+
**GPIO Modes Available:**
|
|
301
|
+
- Management modes: `mgmt_input_nopull`, `mgmt_input_pulldown`, `mgmt_input_pullup`, `mgmt_output`, `mgmt_bidirectional`, `mgmt_analog`
|
|
302
|
+
- User modes: `user_input_nopull`, `user_input_pulldown`, `user_input_pullup`, `user_output`, `user_bidirectional`, `user_output_monitored`, `user_analog`
|
|
303
|
+
|
|
304
|
+
**Usage:**
|
|
305
|
+
- Enter a number (1-13) to select a mode from the table
|
|
306
|
+
- Enter a partial key (e.g., "user_out" matches "user_output")
|
|
307
|
+
- Enter the full key name (e.g., "user_output")
|
|
308
|
+
- Press Enter to keep current valid value (invalid values require input)
|
|
309
|
+
|
|
310
|
+
**Examples:**
|
|
311
|
+
```bash
|
|
312
|
+
# Configure GPIO settings interactively
|
|
313
|
+
cf gpio-config
|
|
314
|
+
|
|
315
|
+
# Configure for a specific project directory
|
|
316
|
+
cf gpio-config --project-root /path/to/project
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
**What gets updated:**
|
|
320
|
+
- `.cf/project.json`: GPIO configuration stored as hex values (e.g., `"5": "13'h1808"`)
|
|
321
|
+
- `verilog/rtl/user_defines.v`: GPIO mode definitions updated (e.g., `USER_CONFIG_GPIO_5_INIT`)
|
|
322
|
+
|
|
323
|
+
> [!NOTE]
|
|
324
|
+
> Invalid modes cannot be saved. All GPIOs must have valid configurations.
|
|
325
|
+
|
|
326
|
+
### Harden a Macro
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
cf harden [MACRO] [OPTIONS]
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**Replaces `make harden` and `make <macro_name>`** - Harden macros using LibreLane/OpenLane.
|
|
333
|
+
|
|
334
|
+
**Prerequisites:**
|
|
335
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
336
|
+
- OpenLane must be installed (via `cf setup`)
|
|
337
|
+
|
|
338
|
+
**What it does:**
|
|
339
|
+
1. Lists available macros in `openlane/` directory
|
|
340
|
+
2. Runs the hardening flow (synthesis, placement, routing) for a specific macro
|
|
341
|
+
3. Generates GDS, LEF, and other output files
|
|
342
|
+
4. Supports both Nix and Docker execution environments
|
|
343
|
+
|
|
344
|
+
**Key Options:**
|
|
345
|
+
- `--list` or no argument: List all available macros
|
|
346
|
+
- `MACRO`: Name of macro to harden (e.g., `user_proj_example`, `user_project_wrapper`)
|
|
347
|
+
- `--project-root`: Specify project directory
|
|
348
|
+
- `--tag`: Custom run tag (defaults to timestamp)
|
|
349
|
+
- `--pdk`: PDK to use (default: sky130A)
|
|
350
|
+
- `--use-nix`: Force use of Nix (fails if Nix not available)
|
|
351
|
+
- `--use-docker`: Force use of Docker (fails if Docker not available)
|
|
352
|
+
- `--dry-run`: Show configuration without running
|
|
353
|
+
|
|
354
|
+
**Examples:**
|
|
355
|
+
```bash
|
|
356
|
+
# List all available macros
|
|
357
|
+
cf harden --list
|
|
358
|
+
|
|
359
|
+
# Harden a specific macro (replaces make user_proj_example)
|
|
360
|
+
cf harden user_proj_example
|
|
361
|
+
|
|
362
|
+
# Harden with custom tag and PDK
|
|
363
|
+
cf harden user_proj_example --tag my_run --pdk sky130B
|
|
364
|
+
|
|
365
|
+
# Preview hardening configuration
|
|
366
|
+
cf harden user_proj_example --dry-run
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**Workflow:**
|
|
370
|
+
1. **Macro Hardening**: Harden individual macros first
|
|
371
|
+
```bash
|
|
372
|
+
cf harden user_proj_example
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
2. **Integration**: Update `openlane/user_project_wrapper/config.json` to reference your macros
|
|
376
|
+
|
|
377
|
+
3. **Wrapper Hardening**: Harden the top-level wrapper
|
|
378
|
+
```bash
|
|
379
|
+
cf harden user_project_wrapper
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Output Files:**
|
|
383
|
+
- `gds/<macro>.gds` - GDSII layout file
|
|
384
|
+
- `lef/<macro>.lef` - LEF file for integration
|
|
385
|
+
- `verilog/gl/<macro>.v` - Gate-level netlist
|
|
386
|
+
- `spef/<macro>.spef` - Parasitic extraction file
|
|
387
|
+
- `sdc/<macro>.sdc` - Timing constraints
|
|
388
|
+
|
|
389
|
+
### Run Precheck Validation
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
cf precheck [OPTIONS]
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Replaces `make precheck`** - Run MPW precheck validation on your project.
|
|
396
|
+
|
|
397
|
+
**Prerequisites:**
|
|
398
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
399
|
+
- **Must run `cf gpio-config` first** - GPIO configuration is required
|
|
400
|
+
- Precheck tools must be installed (via `cf setup`)
|
|
401
|
+
- PDK must be installed (via `cf setup`)
|
|
402
|
+
- Docker must be available
|
|
403
|
+
|
|
404
|
+
**What it does:**
|
|
405
|
+
1. Validates your design against MPW (Multi-Project Wafer) requirements
|
|
406
|
+
2. Runs DRC, LVS, and other design rule checks
|
|
407
|
+
3. Ensures your design will fit into the SoC reference design
|
|
408
|
+
4. Generates reports highlighting any violations
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
**Key Options:**
|
|
412
|
+
- `--project-root`: Specify project directory
|
|
413
|
+
- `--disable-lvs`: Skip LVS check, run specific checks only
|
|
414
|
+
- `--checks`: Run specific checks (can be specified multiple times)
|
|
415
|
+
- Available: `license`, `makefile`, `default`, `documentation`, `consistency`, `gpio_defines`, `xor`, `magic_drc`, `klayout_feol`, `klayout_beol`, `klayout_offgrid`, `klayout_met_min_ca_density`, `klayout_pin_label_purposes_overlapping_drawing`, `klayout_zeroarea`
|
|
416
|
+
- `--dry-run`: Show command without running
|
|
417
|
+
|
|
418
|
+
**Examples:**
|
|
419
|
+
```bash
|
|
420
|
+
# Run all precheck validations (replaces make precheck)
|
|
421
|
+
cf precheck
|
|
422
|
+
|
|
423
|
+
# Run without LVS check
|
|
424
|
+
cf precheck --disable-lvs
|
|
425
|
+
|
|
426
|
+
# Run specific checks only
|
|
427
|
+
cf precheck --checks license --checks makefile --checks gpio_defines
|
|
428
|
+
|
|
429
|
+
# Preview precheck command
|
|
430
|
+
cf precheck --dry-run
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
**What gets checked:**
|
|
434
|
+
- License compliance
|
|
435
|
+
- Makefile structure
|
|
436
|
+
- GPIO configuration validity
|
|
437
|
+
- Design consistency
|
|
438
|
+
- DRC (Design Rule Check)
|
|
439
|
+
- LVS (Layout vs Schematic)
|
|
440
|
+
- And more...
|
|
441
|
+
|
|
442
|
+
> [!NOTE]
|
|
443
|
+
> Precheck is required before submitting your design for fabrication.
|
|
444
|
+
|
|
445
|
+
### Run Verification Tests
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
cf verify [TEST] [OPTIONS]
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**Replaces `make verify-<test>-rtl` and `make verify-<test>-gl`** - Run Cocotb verification tests.
|
|
452
|
+
|
|
453
|
+
**Prerequisites:**
|
|
454
|
+
- **Must run `cf init` first** - Project initialization is required
|
|
455
|
+
- **Must run `cf gpio-config` first** - GPIO configuration is required
|
|
456
|
+
- Cocotb environment must be set up (via `cf setup`)
|
|
457
|
+
- Caravel must be installed (via `cf setup`)
|
|
458
|
+
|
|
459
|
+
**What it does:**
|
|
460
|
+
1. Runs functional verification tests using Cocotb
|
|
461
|
+
2. Supports both RTL and gate-level (GL) simulations
|
|
462
|
+
3. Can run individual tests or all tests
|
|
463
|
+
4. Uses Docker container for consistent test environment
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
**Key Options:**
|
|
467
|
+
- `TEST`: Name of specific test to run (e.g., `counter_la`)
|
|
468
|
+
- `--project-root`: Specify project directory
|
|
469
|
+
- `--sim`: Simulation type - `rtl` (default) or `gl` (gate-level)
|
|
470
|
+
- `--list`: List all available tests
|
|
471
|
+
- `--all`: Run all tests
|
|
472
|
+
- `--tag`: Run tests from a specific YAML test list (e.g., `user_proj_tests`)
|
|
473
|
+
- `--dry-run`: Show configuration without running
|
|
474
|
+
|
|
475
|
+
**Examples:**
|
|
476
|
+
```bash
|
|
477
|
+
# List all available tests
|
|
478
|
+
cf verify --list
|
|
479
|
+
|
|
480
|
+
# Run a specific test (RTL simulation, replaces make verify-counter_la-rtl)
|
|
481
|
+
cf verify counter_la
|
|
482
|
+
|
|
483
|
+
# Run gate-level simulation (replaces make verify-counter_la-gl)
|
|
484
|
+
cf verify counter_la --sim gl
|
|
485
|
+
|
|
486
|
+
# Run all tests
|
|
487
|
+
cf verify --all
|
|
488
|
+
|
|
489
|
+
# Run all RTL tests
|
|
490
|
+
cf verify --all --sim rtl
|
|
491
|
+
|
|
492
|
+
# Run tests from a specific test list
|
|
493
|
+
cf verify --tag user_proj_tests
|
|
494
|
+
|
|
495
|
+
# Preview verification command
|
|
496
|
+
cf verify counter_la --dry-run
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
**Test Types:**
|
|
500
|
+
- **RTL Simulation**: Tests your RTL design
|
|
501
|
+
- **Gate-Level (GL) Simulation**: Tests the synthesized gate-level netlist
|
|
502
|
+
|
|
503
|
+
> [!NOTE]
|
|
504
|
+
> Verification tests ensure your design works correctly before hardening and submission.
|
|
505
|
+
|
|
253
506
|
### Push a Project (Upload)
|
|
254
507
|
|
|
255
508
|
```bash
|
|
@@ -311,7 +564,8 @@ cf confirm [OPTIONS]
|
|
|
311
564
|
- `--sftp-username`: Override configured username
|
|
312
565
|
- `--sftp-key`: Override configured key path
|
|
313
566
|
|
|
314
|
-
|
|
567
|
+
> [!IMPORTANT]
|
|
568
|
+
> This command confirms that your current GDS file is ready to be sent to the foundry for tapeout. Only run this when you are completely satisfied with your design and ready for final tapeout processing. This action cannot be easily undone.
|
|
315
569
|
|
|
316
570
|
### View Tapeout Report
|
|
317
571
|
|
|
@@ -430,7 +684,8 @@ The CLI tracks your project submission state through the `submission_state` fiel
|
|
|
430
684
|
cf confirm # Confirm current GDS file is ready for foundry tapeout
|
|
431
685
|
```
|
|
432
686
|
|
|
433
|
-
|
|
687
|
+
> [!IMPORTANT]
|
|
688
|
+
> Only run `cf confirm` when you are completely satisfied with your GDS file and ready to send it to the foundry for tapeout processing. This action cannot be easily undone.
|
|
434
689
|
|
|
435
690
|
---
|
|
436
691
|
|