Skip to content

Commit b450579

Browse files
authored
Make OG fud installable as a script again (#2534)
Looks like dadff7e removed the `fud` command-line tool. This brings it back—with the goal of being able to `uv tool install ./fud`. I think it is exciting that no one noticed for a little while; that means that no one tried to set up OG fud from scratch in that time! I am still getting some errors, when I do this install with `uv`, about a missing dependency on the `calyx-py` library. But we're getting closer?
1 parent b4140ef commit b450579

File tree

4 files changed

+13
-21
lines changed

4 files changed

+13
-21
lines changed

docs/intro.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ Congratulations! You've simulated your first hardware design with Calyx.
183183
[icarus verilog]: http://iverilog.icarus.com
184184
[jq]: https://stedolan.github.io/jq/
185185
[jq-install]: https://stedolan.github.io/jq/
186-
[flit]: https://flit.readthedocs.io/en/latest/
187186
[interpreter]: ./running-calyx/interpreter.md
188187
[homebrew]: https://brew.sh
189188
[fud-icarus]: ./running-calyx/fud/index.md#icarus-verilog

docs/running-calyx/fud/index.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,29 @@ The source for fud is [here](https://github.com/calyxir/calyx/tree/master/fud).
1717
1818
`fud` currently has a dependency on [calyx-py](builder/calyx-py.md), which you need to install first.
1919

20-
You need [Flit](https://flit.readthedocs.io/en/latest/) to install `fud`. Install it with `pip3 install flit`.
21-
22-
You can then install `fud` with
20+
You need [uv][] to install `fud`.
21+
Follow its [installation instructions][uv install].
22+
Then:
2323

2424
```bash
25-
cd fud && flit install
25+
uv tool install ./fud
2626
```
27-
(If using this method to install `fud`, `pip3` should be version >= 20)
2827

2928
If you are working on `fud` itself, you can install it with a symlink with:
30-
```bash
31-
cd fud && flit install --symlink
32-
```
33-
34-
You can also install `fud` with
3529

3630
```bash
37-
flit build
38-
pip3 install dist/fud-0.3.0-py3-none-any.whl
31+
uv tool install -e ./fud
3932
```
4033

4134
Finally, point `fud` to the root of the repository:
35+
4236
```
4337
fud config global.root <full path to Calyx repository>
4438
```
4539

40+
[uv]: https://docs.astral.sh/uv/
41+
[uv install]: https://docs.astral.sh/uv/#installation
42+
4643
## Configuration
4744

4845
Fud uses a global configuration file to locate tool paths and default values.

docs/running-calyx/fud/xilinx.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ You can set `fud` up to use either a local installation of the Xilinx tools or o
1717
The simplest way to use the Xilinx tools is to synthesize RTL or HLS designs to collect statistics about them.
1818
This route will not produce actual, runnable executables; see the next section for that.
1919

20-
### Installing Dependencies
21-
22-
`fud` uses extra dependencies to invoke the Xilinx toolchains.
23-
Run the following command to install all required dependencies:
24-
```
25-
cd fud && flit install -s --deps all
26-
```
27-
2820
### Setting up Remote Tools
2921

3022
> Follow these instructions if you're attempting to run `vivado` or `vivado-hls` on a server from your local machine. If you are working directly on a server with these tools, skip to the [run instructions](#run).

fud/pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ dependencies = [
2121
"numpy",
2222
"simplejson",
2323
"networkx>=2.6",
24+
"calyx-ast",
2425
]
2526

2627
[project.optional-dependencies]
2728
remote = ["paramiko", "scp"]
2829
fpga = ["pynq"]
30+
31+
[project.scripts]
32+
fud = "fud.main:main"

0 commit comments

Comments
 (0)