QuickLogic Open Reconfigurable Computing (QORC) SDK provides components needed to get started on the QuickLogic's EOSS3 device and open source development boards such as Quickfeather.
|gha-ci| |rtd-docs|
Currently, the following boards are supported:
Quickfeather Development Kit <https://www.quicklogic.com/products/eos-s3/quickfeather-development-kit/>
__SparkFun Thing Plus <https://www.quicklogic.com/products/eos-s3/sparkfun-thing-plus/>
__Qomu Development Kit <https://www.quicklogic.com/products/eos-s3/qomu-dev-kit/>
__Easiest way to get started on quickfeather development kit is to build and run example application projects included in this SDK on a quickfeather development kit.
Software
1. Clone this repository using: ``git clone https://github.com/QuickLogic-Corp/qorc-sdk``
2. Navigate to the directory where the repo is cloned: ``cd qorc-sdk``
3. Install/Initialize all required tooling using: ``source envsetup.sh``
For detailed steps or manual installation of each of the tools needed, refer to the docs here: `Quickstart <https://qorc-sdk.readthedocs.io/en/latest/qorc-setup/quickstart.html>`_
Hardware
J-Link Debug probe <https://www.segger.com/products/debug-probes/j-link/>
__The qf_baremetal app tests qf_baremetalsetup which sets up the power domains and clocks without using the S3X_CLK_XXX management, or the power management schemes. As a result the code is smaller and simpler, however all of the responsibility is on the user to get the right power domains enabled, and the clocks set correctly.
.. _lesson-1a-m4-only--qf_helloworldsw:
This section describes how to build and run the qf_helloworldsw project.
Navigate to qf_helloworldsw build folder and run make
::
cd qorc-sdk/qf_apps/qf_helloworldsw/GCC_Project make
| Reset QuickFeather board and press ‘user button’ while blue LED is flashing. | Should switch to mode where green LED is breathing. | If green LED not breathing, press reset again and ‘user button’ within 5 seconds of releasing reset (while blue LED is still flashing)
With green LED breathing, program qf_helloworldsw app into QuickFeather:
::
qfprog --port /dev/ttyXX --m4app output/bin/qf_helloworldsw.bin
replace /dev/ttyXX with the actual device path.
| After programming has completed, reset the QuickFeather board and do not press the user button. | Blue LED should flash for 5 sec and then load the m4app and run it.
Run PuTTY or some other terminal emulator and attach to the QuickFeather (NOTE: the port name will most probably be different than the port name used for programming).
| You should see a banner that says: | |qf_helloworldsw banner|
The prompt ‘[0]’ indicates that you are level 0 in the CLI menus
system. Type diag red
and you should see the red LED on
QuickFeather light up
| Type help
and you should see:
| |qf_helloworld CLI Help|
Which lists what is in the top-level CLI menu:
| Type diag
to enter the diag sub-menu:
| You should see
| |qf_helloworld CLI diag|
Where the [1] diag indicates that you are in a 1st level submenu called diag
| Type help
to get help for this menu and you should see:
| |qf_helloworld CLI diag sub-menu|
You can try these by typing red (should turn the red led off), green
and so forth. Note that if you are level 0, you can access submenu
elements by typing submenuname submenu action
, which is what we
did earlier when we typed diag red
.. _lesson-1b-m4-only--modify-qf_helloworldsw:
| Using the editor of your choice, edit
qorc-sdk/qf_apps/qf_helloworldsw/src/main.c
. Change the line
| dbg_str(“\n\nHello world !!\n\n”)
| to say something else. Save the changes
Now naviagte to qf_helloworldsw build folder and run make.
::
cd qorc-sdk/qf_apps/qf_helloworldsw/GCC_Project
make
Reset QuickFeather board and press ‘user button’ while blue LED is flashing.
With green LED breathing, program the updated qf_helloworldsw app
into QuickFeather:
qfprog --port /dev/ttyXX --m4app output/bin/qf_helloworldsw.bin
After programming has completed, reset the QuickFeather board and do not press the user button.
Run PuTTY or some other terminal emulator and attach to the QuickFeather (NOTE: the port name will most probably be different than the port name used for programming).
You should see a banner and then your changed message.
.. _lesson-2a-fpga-only--qf_helloworldhw:
Navigate to qf_helloworldsw build folder and run make. ::
cd qorc-sdk/qf_apps/qf_helloworldhw/GCC_Project make
Reset QuickFeather board and press ‘user button’ while blue LED is flashing.
With green LED breathing, program qf_helloworldhw app into
QuickFeather:
qfprog --port /dev/ttyXX --m4app output/bin/qf_helloworldhw.bin
After programming has completed, reset the QuickFeather board and do not press the user button.
You should see the green LED flashing about 3 times/second.
You will not see QuickFeather mounted on USB, because now the FPGA is used for the custom FPGA code, not the standard USB2SERIAL code. And because of this you cannot use PuTTY to monitor the application. (See Lesson#3 for how to monitor applications while running custom FPGA code).
How does this work:
.. code:: C
load_fpga(sizeof(axFPGABitStream),axFPGABitStream); // Load bitstream into FPGA S3x_Clk_Enable(S3X_FB_21_CLK); // Start FPGA clock S3x_Clk_Enable(S3X_FB_16_CLK);
load_fpga()
does is take the bitstream from array
axFPGABitSTream and program the FPGAS3x_Clk_Enable(S3X_FB_21_CLK)
does is to enable CLK
21 which is one of two clocks from the M4 that drive the FPGAThe frequency of the clock is specified in src/s3xd_pwrcfg.c to be 48MHz .. code:: C
[CLK_C21] = { .name = "C21", .clkd_id = CLK_C21, .type = SRC_CLK, .sync_clk = SYNC_CLKD (0, 0, 0), .cru_ctrl = CRU_CTRL (0x34, 0x1fe, 9, 0x38, 0x70, 0x1, 8), .def_max_rate = (F_48MHZ), .init_state = INIT_STATE(F_48MHZ, 1, INIT_GATE_OFF),},
.. _lesson-2b-fpga-only--modify-qf_helloworldhw:
Using the editor of your choice, edit qf_apps/qf_helloworldhw/fpga/rtl/helloworldfpga.v
Activate the conda script from quicklogic-fpga-toolchain
and add
it's binaries to PATH. (This step can be skipped if you have
installed the toolchain in the current terminal window and session).
::
export INSTALL_DIR="specify the installpath of fpga-toolchain" export PATH="$INSTALL_DIR/install/bin:$INSTALL_DIR/install/bin/python:$PATH" source "$INSTALL_DIR/conda/etc/profile.d/conda.sh"
Navigate to qf_helloworldhw build folder and run make (note: for make use ql_symbiflow you will have to activate the ql_symbiflow conda)
::
cd qf_apps/qf_helloworldhw/GCC_projects conda activate make conda deactivate
Reset QuickFeather board and press ‘user button’ while blue LED is flashing
With green LED breathing, program the updated qf_helloworldhw app
into QuickFeather:
qfprog --port /dev/ttyXX --m4app output/bin/qf_helloworldhw.bin
After programming has completed, reset the QuickFeather board and do not press the user button
You should see the red LED flashing about 6 times/second
You will not see QuickFeather mounted on USB, because now the FPGA is used for the custom FPGA code, not the standard USB2SERIAL code. And because of this you cannot use PuTTY to monitor the application. (See Lesson#3 for how to monitor applications while running custom FPGA code
.. _lesson-3-advanced-fpga-m4--fpga-qf_advancedfpga:
Go to directory qf_apps/qf_advancedfpga/GCC_projects
Activate conda, run make and deactivate conda
Connect to the QuickFeather UART
Reset QuickFeather board and press ‘user button’ while blue LED is flashing
With green LED breathing, program m4 app into QuickFeather
After programming has completed, reset the QuickFeather board and do not press the user button
The banner should be printed on PuTTY and then the CLI prompt
Now the LED should display green for 500ms, then blue for 500ms and repeat
Set the duration of timeslot 2 to 1000ms by ‘duration2 1000’
Now LED should be blue for 500ms, green for 500ms and red for 1000ms and repeat
To create an application start by choosing an existing application that is a close match to your end goal and simply copy the entire application directory giving the name you want. The make files assume that the application directory is two levels from the top-level directory. For example qorc-sdk/qf_apps/ so you can either create your own project directory and copy the app there, for example qorc-sdk/qf_myprojects/qf_myapp, or put it in one of the existing project directories, for example qorc-sdk/qf_apps/qf_myapp
Please refer to Using Eclipse <https://github.com/QuickLogic-Corp/qorc-sdk/blob/master/using_eclipse.rst>
__ .
.. |qf_helloworldsw banner| image:: docs/getting-started/images/qf_helloworldsw-banner.png .. |qf_helloworld CLI Help| image:: docs/getting-started/images/qf_helloworldsw-cli-help.png .. |qf_helloworld CLI diag| image:: docs/getting-started/images/qf_helloworldsw-cli-diag.png .. |qf_helloworld CLI diag sub-menu| image:: docs/getting-started/images/qf_helloworldsw-cli-diag-help.png
.. |rtd-docs| image:: https://img.shields.io/readthedocs/qorc-sdk?label=READTHEDOCS&logo=read-the-docs&style=for-the-badge :alt: Read the Docs :target: https://qorc-sdk.readthedocs.io/en/latest
.. |gha-ci| image:: https://img.shields.io/github/workflow/status/quicklogic-corp/qorc-sdk/ci-linux-build?logo=github&style=for-the-badge :alt: GitHub Workflow Status :target: https://github.com/quicklogic-corp/qorc-sdk/actions/workflows/ci-linux-build.yml