From 9b4c9d2b934e5473a08c50893459e54206e4169a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= <pczarnecki@antmicro.com>
Date: Tue, 24 May 2022 15:42:26 +0200
Subject: [PATCH 1/8] eos-s3: bump yosys, plugins and vtr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
---
 eos-s3/environment.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eos-s3/environment.yml b/eos-s3/environment.yml
index 1e2afad..d751a2a 100644
--- a/eos-s3/environment.yml
+++ b/eos-s3/environment.yml
@@ -3,9 +3,9 @@ channels:
   - conda-forge
   - litex-hub
 dependencies:
-  - litex-hub::quicklogic-yosys=0.8.0_105_gd282be04=20210625_074838
-  - litex-hub::quicklogic-yosys-plugins=1.2.0_11_g21045a9=20210625_074838
-  - litex-hub::vtr-optimized=8.0.0_4023_ge73e88940=20210625_074838
+  - litex-hub::yosys=0.15_51_g6318db615=20220317_162926_py37
+  - litex-hub::symbiflow-yosys-plugins=1.0.0_7_832_ga2a80a1=20220317_162926
+  - litex-hub::vtr-optimized=8.0.0_5338_g829c06d8f=20220409_131122
   - make
   - lxml
   - simplejson

From b7a0f3af88b3eb1ed3b597f41d679554c8f94326 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= <pczarnecki@antmicro.com>
Date: Mon, 30 May 2022 16:10:28 +0200
Subject: [PATCH 2/8] eos-s3: btn_counter: fix part name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
---
 eos-s3/btn_counter/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eos-s3/btn_counter/Makefile b/eos-s3/btn_counter/Makefile
index f33de95..abdc9bd 100644
--- a/eos-s3/btn_counter/Makefile
+++ b/eos-s3/btn_counter/Makefile
@@ -3,7 +3,7 @@ current_dir := $(patsubst %/,%,$(dir $(mkfile_path)))
 TOP:=top
 VERILOG:=btn_counter.v
 DEVICE := ql-eos-s3
-PARTNAME := pd64
+PARTNAME := PD64
 PCF:=chandalar.pcf
 
 all:

From 7c9cabf1713b7891cfe1ee98e439216f751e257d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= <pczarnecki@antmicro.com>
Date: Tue, 31 May 2022 16:11:42 +0200
Subject: [PATCH 3/8] eos-s3: btn_counter: fix pcf after bumping VPR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We are now using multi bit ports in post implementation netlists

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
---
 eos-s3/btn_counter/chandalar.pcf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eos-s3/btn_counter/chandalar.pcf b/eos-s3/btn_counter/chandalar.pcf
index 31331dd..2081207 100644
--- a/eos-s3/btn_counter/chandalar.pcf
+++ b/eos-s3/btn_counter/chandalar.pcf
@@ -1,5 +1,5 @@
 set_io clk      A3
-set_io led(0)   H7
-set_io led(1)   G7
-set_io led(2)   F6
-set_io led(3)   E8
+set_io led[0]   H7
+set_io led[1]   G7
+set_io led[2]   F6
+set_io led[3]   E8

From 9fd3b7966dd7bb5e374725177b42d5a79ddb3716 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= <pczarnecki@antmicro.com>
Date: Tue, 7 Jun 2022 14:11:30 +0200
Subject: [PATCH 4/8] eos-s3: bump quicklogic-fasm
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
---
 eos-s3/requirements.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eos-s3/requirements.txt b/eos-s3/requirements.txt
index 368945e..05c9ab2 100644
--- a/eos-s3/requirements.txt
+++ b/eos-s3/requirements.txt
@@ -1,3 +1,3 @@
 python-constraint
 serial
-git+https://github.com/QuickLogic-Corp/quicklogic-fasm@57b6e60574a9d483dc94710d0d3ff42a62b4ec41
+git+https://github.com/QuickLogic-Corp/quicklogic-fasm@aaf4c314a165b6185b0983019d8aae4d0d4db6cb

From 703f6d8e33edc88bb8efc7ee157b8d19c675f8ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= <pczarnecki@antmicro.com>
Date: Tue, 7 Jun 2022 14:53:04 +0200
Subject: [PATCH 5/8] docs: getting: eos-s3: bump f4pga-arch-defs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
---
 docs/getting.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/getting.rst b/docs/getting.rst
index 06c022d..106f6b8 100644
--- a/docs/getting.rst
+++ b/docs/getting.rst
@@ -143,7 +143,7 @@ Download architecture definitions:
       .. code-block:: bash
          :name: download-arch-def-eos-s3
 
-         wget -qO- https://storage.googleapis.com/symbiflow-arch-defs-install/quicklogic-arch-defs-d6d05185.tar.gz | tar -xzC $F4PGA_INSTALL_DIR/$FPGA_FAM/
+         wget -qO- https://storage.googleapis.com/symbiflow-arch-defs-install/quicklogic-arch-defs-qlf-fc5d8da.tar.gz | tar -xzC $F4PGA_INSTALL_DIR/$FPGA_FAM/
 
 If the above commands exited without errors, you have successfully installed and configured your working environment.
 

From 7f8600a47cc22f16da55b975a025968f4babae10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= <pczarnecki@antmicro.com>
Date: Tue, 7 Jun 2022 14:58:38 +0200
Subject: [PATCH 6/8] eos-s3: env: add f4pga
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
---
 eos-s3/requirements.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eos-s3/requirements.txt b/eos-s3/requirements.txt
index 05c9ab2..4f07802 100644
--- a/eos-s3/requirements.txt
+++ b/eos-s3/requirements.txt
@@ -1,3 +1,4 @@
 python-constraint
 serial
 git+https://github.com/QuickLogic-Corp/quicklogic-fasm@aaf4c314a165b6185b0983019d8aae4d0d4db6cb
+https://github.com/chipsalliance/f4pga/archive/main.zip#subdirectory=f4pga

From ef5a8f241d8b3869441cd217dbb74c85755b4dfa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= <pczarnecki@antmicro.com>
Date: Fri, 10 Jun 2022 11:59:20 +0200
Subject: [PATCH 7/8] docs: building examples: eos-s3: set F4PGA_ENV variables
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
---
 docs/building-examples.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/docs/building-examples.rst b/docs/building-examples.rst
index e6886ee..216c0c6 100644
--- a/docs/building-examples.rst
+++ b/docs/building-examples.rst
@@ -47,6 +47,8 @@ Next, prepare the environment:
          :name: conda-prep-env-eos-s3
 
          export PATH="$F4PGA_INSTALL_DIR/$FPGA_FAM/quicklogic-arch-defs/bin:$PATH";
+         export F4PGA_ENV_BIN="$F4PGA_INSTALL_DIR/$FPGA_FAM/quicklogic-arch-defs/bin";
+         export F4PGA_ENV_SHARE="$F4PGA_INSTALL_DIR/$FPGA_FAM/quicklogic-arch-defs/share/symbiflow";
          source "$F4PGA_INSTALL_DIR/$FPGA_FAM/conda/etc/profile.d/conda.sh"
 
 Finally, enter your working Conda environment:

From 4c49ee1e3a396694036a656400285ab93b123e30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Czarnecki?= <pczarnecki@antmicro.com>
Date: Fri, 10 Jun 2022 15:34:34 +0200
Subject: [PATCH 8/8] eos-s3: btn_counter: set FPGA_FAM one more time before
 make
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Paweł Czarnecki <pczarnecki@antmicro.com>
---
 eos-s3/btn_counter/README.rst | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eos-s3/btn_counter/README.rst b/eos-s3/btn_counter/README.rst
index da0bef0..595017e 100644
--- a/eos-s3/btn_counter/README.rst
+++ b/eos-s3/btn_counter/README.rst
@@ -7,4 +7,6 @@ counter example, run the following command:
 .. code-block:: bash
    :name: eos-s3-counter
 
+   #FIXME: make sure FPGA_FAM is available and remove env var export
+   export FPGA_FAM=eos-s3
    make -C btn_counter