From 12c2916fd37d83f6cd260944bd86c0010505a890 Mon Sep 17 00:00:00 2001 From: Leonardo Romor Date: Mon, 10 Mar 2025 21:39:44 +0100 Subject: [PATCH 1/2] repo: updated README.md with basic information --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9db2b21..b4d6034 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ +[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![Continuous Integration](https://github.com/lromor/fpga-assembler/workflows/ci/badge.svg)](https://github.com/lromor/fpga-assembler/actions/workflows/ci.yml) + [fasm-spec]: https://fasm.readthedocs.io/en/stable/# -# FPGA Assembler +[bazel]: https://bazel.build/ +[counter-example]: https://github.com/chipsalliance/f4pga-examples/blob/13f11197b33dae1cde3bf146f317d63f0134eacf/xc7/counter_test/counter.v + +# fpga-assembler + +This command-line tool converts [FASM][fasm-spec] files into bitstreams, simplifying the assembly of human-readable FPGA configurations into the binary formats needed to program various FPGAs. + +At this stage, it can generate a set of frames in the same manner as [fasm2frames](https://github.com/chipsalliance/f4pga-xc-fasm/blob/25dc605c9c0896204f0c3425b52a332034cf5e5c/xc_fasm/fasm2frames.py). +It has been tested with the Artix-7 [counter example][counter-example], where it produces identical frames—at approximately 10 times the speed. + +## Usage + +First, install [Bazel][bazel] and ensure you have a basic C/C++ toolchain set up. Then run: +`` +bazel run -c opt //fpga:fpga-as -- --prjxray_db_path=/some/path/prjxray-db/artix7 --part=xc7a35tcsg324-1 < /some/path.fasm +`` From bb48364f100168faf0e6d97c84e332b20ddffc35 Mon Sep 17 00:00:00 2001 From: Leonardo Romor Date: Tue, 11 Mar 2025 10:13:35 +0100 Subject: [PATCH 2/2] readme: add discussed fixes --- README.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b4d6034..8284166 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Continuous Integration](https://github.com/lromor/fpga-assembler/workflows/ci/badge.svg)](https://github.com/lromor/fpga-assembler/actions/workflows/ci.yml) -[fasm-spec]: https://fasm.readthedocs.io/en/stable/# -[bazel]: https://bazel.build/ -[counter-example]: https://github.com/chipsalliance/f4pga-examples/blob/13f11197b33dae1cde3bf146f317d63f0134eacf/xc7/counter_test/counter.v - # fpga-assembler This command-line tool converts [FASM][fasm-spec] files into bitstreams, simplifying the assembly of human-readable FPGA configurations into the binary formats needed to program various FPGAs. @@ -16,6 +12,24 @@ It has been tested with the Artix-7 [counter example][counter-example], where it First, install [Bazel][bazel] and ensure you have a basic C/C++ toolchain set up. Then run: -`` +``` bazel run -c opt //fpga:fpga-as -- --prjxray_db_path=/some/path/prjxray-db/artix7 --part=xc7a35tcsg324-1 < /some/path.fasm -`` +``` + +## Installation + +For installing the binary in your home directory (e.g., ~/bin), run the following command: + +``` +bazel build -c opt //fpga:fpga-as && install -D --strip bazel-bin/fpga/fpga-as ~/bin/fpga-as +``` + +or install in system directory that requires root-access: + +``` +sudo install -D --strip bazel-bin/fpga/fpga-as /usr/local/bin/fpga-as +``` + +[fasm-spec]: https://fasm.readthedocs.io/en/stable/# +[bazel]: https://bazel.build/ +[counter-example]: https://github.com/chipsalliance/f4pga-examples/blob/13f11197b33dae1cde3bf146f317d63f0134eacf/xc7/counter_test/counter.v