From c1cdca61b56eb913586c58282683277e333007fd Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 11 Dec 2020 10:59:28 -0700 Subject: [PATCH 1/7] [HDL] Critical Patch on the digital I/O cell which now outputs 'Z' when input mode is selected --- HDL/common/digital_io_hd.v | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/HDL/common/digital_io_hd.v b/HDL/common/digital_io_hd.v index b88390b..2035066 100644 --- a/HDL/common/digital_io_hd.v +++ b/HDL/common/digital_io_hd.v @@ -32,25 +32,30 @@ module EMBEDDED_IO_HD ( ); wire SOC_DIR_N; + wire SOC_DIR_WIRE; // Use drive-strength 4 for a high fan-out from SoC components - sky130_fd_sc_hd__or2b_4 ISOL_EN_GATE (.B_N(IO_ISOL_N), + sky130_fd_sc_hd__or2b_1 ISOL_EN_GATE (.B_N(IO_ISOL_N), .A(FPGA_DIR), - .X(SOC_DIR) + .X(SOC_DIR_WIRE) ); + sky130_fd_sc_hd__ebufn_4 DIR_PROTECT_GATE (.TE_B(SOC_DIR), + .A(SOC_DIR), + .Z(SOC_DIR) + ); // Use drive-strength 4 for a high fan-out from global routing architecture - sky130_fd_sc_hd__inv_1 INV_SOC_DIR (.A(SOC_DIR), .Y(SOC_DIR_N)); + sky130_fd_sc_hd__inv_1 INV_SOC_DIR (.A(SOC_DIR_WIRE), .Y(SOC_DIR_N)); sky130_fd_sc_hd__ebufn_4 IN_PROTECT_GATE (.TE_B(SOC_DIR_N), .A(SOC_IN), .Z(FPGA_IN) - ); + ); // Use drive-strength 4 for a potential high fan-out from SoC components - sky130_fd_sc_hd__ebufn_4 OUT_PROTECT_GATE (.TE_B(SOC_DIR), + sky130_fd_sc_hd__ebufn_4 OUT_PROTECT_GATE (.TE_B(SOC_DIR_WIRE), .A(FPGA_OUT), .Z(SOC_OUT) - ); + ); endmodule From 9dc1b6efa73563540e1c7af530fad73f751e5489 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 11 Dec 2020 11:25:07 -0700 Subject: [PATCH 2/7] [Doc] Fine tune documentation on I/O design --- DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst b/DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst index 3ef3230..7f3105a 100644 --- a/DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst +++ b/DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst @@ -21,7 +21,7 @@ As shown in :numref:`fig_sofa_hd_embedded_io_schematic`, the I/O circuit used in - An internal configurable memory element to control the direction of I/O cell -The truth table of the I/O cell is consistent with the GPIO cell of Caravel SoC, where +The truth table of the I/O cell is consistent with the GPIO cell of Caravel SoC (which requires an active-low signal to enable output directionality), where - When configuration bit (FF output) is logic ``1``, the I/O cell is in input mode From 88f522026adf91cc2e48fbd3c5887b254f69a57e Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 11 Dec 2020 11:25:28 -0700 Subject: [PATCH 3/7] [Doc] Update I/O schematic to be consistent with HDL netlist --- .../figures/sofa_hd_embedded_io_schematic.svg | 70 +++++++++++-------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/DOC/source/datasheet/sofa_hd/figures/sofa_hd_embedded_io_schematic.svg b/DOC/source/datasheet/sofa_hd/figures/sofa_hd_embedded_io_schematic.svg index 75482cb..d2b829b 100644 --- a/DOC/source/datasheet/sofa_hd/figures/sofa_hd_embedded_io_schematic.svg +++ b/DOC/source/datasheet/sofa_hd/figures/sofa_hd_embedded_io_schematic.svg @@ -1,6 +1,6 @@ - + @@ -28,8 +28,8 @@ - Produced by OmniGraffle 7.18\n2020-11-19 23:01:04 +0000 - + Produced by OmniGraffle 7.18\n2020-12-11 18:21:49 +0000 + switch boundary @@ -38,7 +38,7 @@ - + @@ -76,7 +76,7 @@ base - + SOC_IN @@ -86,13 +86,13 @@ - + - + @@ -103,7 +103,7 @@ - + FPGA_IN @@ -111,31 +111,28 @@ - - - - + SOC_DIR - - + + - - + + - + - + - + @@ -158,7 +155,7 @@ - + @@ -169,7 +166,7 @@ - + @@ -179,8 +176,8 @@ - - + + @@ -199,12 +196,12 @@ - - + + - - + + @@ -229,8 +226,8 @@ - - + + @@ -248,6 +245,21 @@ + + + + + + + + + + + + + + + From 52d98eb7ca88c6827ea62fbf241a948dc9dccbbc Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 11 Dec 2020 11:26:46 -0700 Subject: [PATCH 4/7] [HDL] Revert I/O cell back to the current design in GDS --- HDL/common/digital_io_hd.v | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/HDL/common/digital_io_hd.v b/HDL/common/digital_io_hd.v index 2035066..8e5be55 100644 --- a/HDL/common/digital_io_hd.v +++ b/HDL/common/digital_io_hd.v @@ -32,30 +32,25 @@ module EMBEDDED_IO_HD ( ); wire SOC_DIR_N; - wire SOC_DIR_WIRE; // Use drive-strength 4 for a high fan-out from SoC components sky130_fd_sc_hd__or2b_1 ISOL_EN_GATE (.B_N(IO_ISOL_N), .A(FPGA_DIR), - .X(SOC_DIR_WIRE) - ); - sky130_fd_sc_hd__ebufn_4 DIR_PROTECT_GATE (.TE_B(SOC_DIR), - .A(SOC_DIR), - .Z(SOC_DIR) - ); + .X(SOC_DIR) + ); // Use drive-strength 4 for a high fan-out from global routing architecture - sky130_fd_sc_hd__inv_1 INV_SOC_DIR (.A(SOC_DIR_WIRE), .Y(SOC_DIR_N)); + sky130_fd_sc_hd__inv_1 INV_SOC_DIR (.A(SOC_DIR), .Y(SOC_DIR_N)); sky130_fd_sc_hd__ebufn_4 IN_PROTECT_GATE (.TE_B(SOC_DIR_N), .A(SOC_IN), .Z(FPGA_IN) - ); + ); // Use drive-strength 4 for a potential high fan-out from SoC components - sky130_fd_sc_hd__ebufn_4 OUT_PROTECT_GATE (.TE_B(SOC_DIR_WIRE), + sky130_fd_sc_hd__ebufn_4 OUT_PROTECT_GATE (.TE_B(SOC_DIR), .A(FPGA_OUT), .Z(SOC_OUT) - ); + ); endmodule From 1e490c1714abe3070b86bf1ebb29f8c465a94059 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 11 Dec 2020 16:11:12 -0700 Subject: [PATCH 5/7] [HDL] Add digital I/O self testing testbench --- HDL/common/digital_io_hd.v | 2 +- TESTBENCH/digital_io_hd_test/digital_io_hd_test.v | 3 +++ .../digital_io_hd_test/digital_io_hd_test_include_netlists.v | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 TESTBENCH/digital_io_hd_test/digital_io_hd_test.v create mode 100644 TESTBENCH/digital_io_hd_test/digital_io_hd_test_include_netlists.v diff --git a/HDL/common/digital_io_hd.v b/HDL/common/digital_io_hd.v index 8e5be55..e1b6ea9 100644 --- a/HDL/common/digital_io_hd.v +++ b/HDL/common/digital_io_hd.v @@ -34,7 +34,7 @@ module EMBEDDED_IO_HD ( wire SOC_DIR_N; // Use drive-strength 4 for a high fan-out from SoC components - sky130_fd_sc_hd__or2b_1 ISOL_EN_GATE (.B_N(IO_ISOL_N), + sky130_fd_sc_hd__or2b_4 ISOL_EN_GATE (.B_N(IO_ISOL_N), .A(FPGA_DIR), .X(SOC_DIR) ); diff --git a/TESTBENCH/digital_io_hd_test/digital_io_hd_test.v b/TESTBENCH/digital_io_hd_test/digital_io_hd_test.v new file mode 100644 index 0000000..088ade4 --- /dev/null +++ b/TESTBENCH/digital_io_hd_test/digital_io_hd_test.v @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:772a5684e323a0acb7fce40d406a2e38ccec6ff03b7037fcd28ca3080b80079b +size 5328 diff --git a/TESTBENCH/digital_io_hd_test/digital_io_hd_test_include_netlists.v b/TESTBENCH/digital_io_hd_test/digital_io_hd_test_include_netlists.v new file mode 100644 index 0000000..962bab8 --- /dev/null +++ b/TESTBENCH/digital_io_hd_test/digital_io_hd_test_include_netlists.v @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19837156754b79fa200291b62ff5efc0e643a2eba639f111a0950aa03522c944 +size 513 From 63bc60ccdd10ac00e2fc9e08338fd4bd327a4bf6 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 11 Dec 2020 16:25:23 -0700 Subject: [PATCH 6/7] [Git] Relax the LFS application to get rid of small files --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 4aaecad..c570f03 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ *.gds filter=lfs diff=lfs merge=lfs -text *.spef filter=lfs diff=lfs merge=lfs -text -TESTBENCH/**/*.v filter=lfs diff=lfs merge=lfs -text +TESTBENCH/*/pnr/verilog_testbench/*_tb.v filter=lfs diff=lfs merge=lfs -text From b38a948a564d36a2f34fd2cb072195739ca26529 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 11 Dec 2020 17:24:28 -0700 Subject: [PATCH 7/7] [Doc] Add testing waveform example to documentation --- .../figures/sofa_hd_embedded_io_test_waveform.svg | 4 ++++ .../datasheet/sofa_hd/sofa_hd_circuit_design.rst | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 DOC/source/datasheet/sofa_hd/figures/sofa_hd_embedded_io_test_waveform.svg diff --git a/DOC/source/datasheet/sofa_hd/figures/sofa_hd_embedded_io_test_waveform.svg b/DOC/source/datasheet/sofa_hd/figures/sofa_hd_embedded_io_test_waveform.svg new file mode 100644 index 0000000..d5061c6 --- /dev/null +++ b/DOC/source/datasheet/sofa_hd/figures/sofa_hd_embedded_io_test_waveform.svg @@ -0,0 +1,4 @@ + + + +CLKIO_ISOL_NFPGA_DIRSOC_DIRSOC_INFPGA_INFPGA_OUTSOC_OUT \ No newline at end of file diff --git a/DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst b/DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst index 7f3105a..b304368 100644 --- a/DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst +++ b/DOC/source/datasheet/sofa_hd/sofa_hd_circuit_design.rst @@ -35,6 +35,21 @@ The truth table of the I/O cell is consistent with the GPIO cell of Caravel SoC Schematic of embedded I/O cell used in FPGA +:numref:`fig_sofa_hd_embedded_io_test_waveform` shows an example waveform about how the I/O cell works: + +- When ``IO_ISOL_N`` is enabled/disabled +- When operates in input mode +- When operates in output mode + +.. _fig_sofa_hd_embedded_io_test_waveform: + +.. figure:: ./figures/sofa_hd_embedded_io_test_waveform.svg + :scale: 30% + :alt: Schematic of embedded I/O cell used in FPGA + + An example of waveforms of embedded I/O cell used in FPGA + + .. _sofa_hd_circuit_design_mux: Multiplexer