jtag-axi


Namejtag-axi JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/aignacio/jtag_axi
SummaryJTAG to AXI bridge python I/F
upload_time2024-09-29 15:58:47
maintainerNone
docs_urlNone
authoraignacio (Anderson Ignacio)
requires_python>=3.6
licenseMIT
keywords soc vip hdl verilog systemverilog jtag
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
[![Regression Tests](https://github.com/aignacio/jtag_axi/actions/workflows/test.yaml/badge.svg)](https://github.com/aignacio/jtag_axi/actions/workflows/test.yaml) [![Lint-SV](https://github.com/aignacio/jtag_axi/actions/workflows/lint.yaml/badge.svg)](https://github.com/aignacio/jtag_axi/actions/workflows/lint.yaml)
# JTAG to AXI master

## Table of Contents
* [Description](#intro)
* [Encoding of AXI registers](#axi_drs)
* [License](#lic)

![rtluarch](docs/jtag_axi_bd.svg)

## <a name="intro"></a> Description

This design implements a JTAG interface that is capable of dispatching AXI Lite transactions into an AXI bus. Its main ob
jectives are:

1. To debug SoC peripherals connected to an AXI bus - dispatch read / write single beat burst AXI transactions.
2. Program memories in SoCs to act as a bootloader interface.

|    **Name**    | **Encoding (4 bits)** | **Access (RW/RO)** |      **Bit length**      |                       **Description**                       |
|:--------------:|:---------------------:|:------------------:|:------------------------:|:-----------------------------------------------------------:|
|     EXTEST     |          0000         |         TBD        |            TBD           |                             TBD                             |
| SAMPLE_PRELOAD |          1010         |         TBD        |            TBD           |                             TBD                             |
|    IC_RESET    |          1100         |         RW         |   IC_RST_WIDTH - Def. 4  | Programmable register to be used to control external resets |
|     IDCODE     |          1110         |         RO         |            32            |        Returns the IDCODE of the device - 0xBADC0FFE        |
|     BYPASS     |          1111         |         RW         |             1            |                Standard bypass jtag register                |
|  ADDR_AXI_REG  |          0001         |         RW         | ADDR_AXI_WIDTH - Def. 32 |         Indicates the AXI address of the transaction        |
| DATA_W_AXI_REG |          0010         |         RW         | DATA_AXI_WIDTH - Def. 64 |             Indicates the AXI data to be written            |
| DATA_R_AXI_REG |          0011         |         RO         | DATA_AXI_WIDTH - Def. 64 |                 Indicates the AXI read data                 |
|  CTRL_AXI_REG  |          0100         |         RW         |             2            |               Controls AXI master I/F dispatch              |
| STATUS_AXI_REG |          0101         |         RO         |             3            |           Return the status of the AXI transaction          |

## <a name="axi_drs"></a> Encoding of AXI registers

The registers `CTRL_AXI_REG` and `STATUS_AXI_REG` follow a specific format and the its encoding is detailed down below.

### STATUS_AXI_REG

| **STATUS_AXI_REG** |                                 **AXI Data Read<br>(32 bits)**                                 |       **Status<br>(3 bits)**       |
|:------------------:|:----------------------------------------------------------------------------------------------:|:----------------------------------:|
|      Bit order     |                                               MSB                                              |                 LSB                |
| **Access (RW/RO)** |                                               RO                                               |                 RO                 |
|   **Description**  | When read transaction is performed,<br>its data will be written here<br>in order as dispatched | Current status of last transaction |

#### Status decoding:

| **Status code** | **Status alias** |                                                                  **Description**                                                                  |
|:---------------:|:----------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------:|
|        0        |     JTAG_IDLE    |                            That is the default state of the design when no <br>transactions (txn) have been dispatched                            |
|        1        |   JTAG_RUNNING   | When a transaction (txn) is started, the design will change to this state. <br>It should stay there until a response is received or it times out. |
|        2        |   JTAG_TIMEOUT   |                                                          Indicates a transaction timeout                                                          |
|        3        |   JTAG_AXI_OKAY  |                                                     Indicates a transaction response: AXI OKAY                                                    |
|        4        |  JTAG_AXI_EXOKAY |                                                    Indicates a transaction response: AXI EXOKAY                                                   |
|        5        |  JTAG_AXI_SLVERR |                                                    Indicates a transaction response: AXI SLVERR                                                   |
|        6        |  JTAG_AXI_DECER  |                                                    Indicates a transaction response: AXI DECER                                                    |

### CTRL_AXI_REG

|    CTRL_AXI_REG    |               **Start<br>(1 bit)**               | **Txn type<br>(1 bit)** |               **Free Slots<br>(3 bits)**              |               **Size AXI txn<br>(3 bits)**              |
|:------------------:|:------------------------------------------------:|:-----------------------:|:-----------------------------------------------------:|:-------------------------------------------------------:|
|      Bit order     |                        MSB                       |           ...           |                          ...                          |                           LSB                           |
| **Access (RW/RO)** |           RW          |            RW           |                           RO                          |                            RW                           |
|   **Description**  | Once written 1, dispatches<br>an AXI transaction |   1 - Write, 0 - Read   | Number of slots available<br>in the Asynchronous FIFO | Size of the AXI transaction<br>following AXIv4 encoding |

## AXI Write - Flow sequence

For a write sequence:
```mermaid
sequenceDiagram
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: IDCODE
JTAG I/F ->> JTAG Debug Adapter (PC): Shift-DR: Get 0xBADC0FFE 
Note left of JTAG Debug Adapter (PC): Check whether the IDCODE <br/> matches 0xBADC0FFE
JTAG Debug Adapter (PC) --> JTAG I/F: Set txn addr
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: ADDR_AXI_REG
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the address of the txn
JTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR
JTAG Debug Adapter (PC) --> JTAG I/F: Set txn data to be written
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: DATA_W_AXI_REG
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the data of the txn
JTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR
JTAG Debug Adapter (PC) --> JTAG I/F: Start txn
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: CTRL_AXI_REG
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the control values of the txn
JTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR

JTAG I/F ->> AXI Master I/F: Txn written into Async. FIFO
AXI Master I/F ->> AXI Bus: Txn issued on the AXI Bus
JTAG Debug Adapter (PC) --> AXI Bus: ...
AXI Bus ->> AXI Master I/F: AXI Slave response from AXI Bus
AXI Master I/F ->> JTAG I/F: Txn response written into Async. FIFO

JTAG Debug Adapter (PC) --> JTAG I/F: Monitor txn status
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: STATUS_AXI_REG
Note right of JTAG I/F: Whenever Update-DR is selected <br/> with IR set to STATUS_AXI_REG <br/> the latest status will be updated <br/> into STATUS_AXI_REG shift register
Note left of JTAG Debug Adapter (PC): If txn_status != JTAG_RUNNING <br/> txn has finished
JTAG I/F ->> JTAG Debug Adapter (PC): Shift-DR: Get STATUS_AXI_REG

Note left of JTAG Debug Adapter (PC): If txn_status == RUNNING <br/> move to Update-DR and then back to Shift-DR <br/> this will update the STATUS_AXI_REG
```

## AXI Read - Flow sequence

For a read sequence:
```mermaid
sequenceDiagram
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: IDCODE
JTAG I/F ->> JTAG Debug Adapter (PC): Shift-DR: Get 0xBADC0FFE 
Note left of JTAG Debug Adapter (PC): Check whether the IDCODE <br/> matches 0xBADC0FFE
JTAG Debug Adapter (PC) --> JTAG I/F: Set txn addr
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: ADDR_AXI_REG
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the address of the txn
JTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR
JTAG Debug Adapter (PC) --> JTAG I/F: Start txn
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: CTRL_AXI_REG
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the control values of the txn
JTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR

JTAG I/F ->> AXI Master I/F: Txn written into Async. FIFO
AXI Master I/F ->> AXI Bus: Txn issued on the AXI Bus
JTAG Debug Adapter (PC) --> AXI Bus: ...
AXI Bus ->> AXI Master I/F: AXI Slave response from AXI Bus
AXI Master I/F ->> JTAG I/F: Txn response written into Async. FIFO

JTAG Debug Adapter (PC) --> JTAG I/F: Monitor txn status
JTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: STATUS_AXI_REG
Note right of JTAG I/F: Whenever Update-DR is selected <br/> with IR set to STATUS_AXI_REG <br/> the latest status will be updated <br/> into STATUS_AXI_REG shift register
Note left of JTAG Debug Adapter (PC): If txn_status != RUNNING <br/> txn has finished
JTAG I/F ->> JTAG Debug Adapter (PC): Shift-DR: Get STATUS_AXI_REG

Note left of JTAG Debug Adapter (PC): If txn_status == RUNNING <br/> move to Update-DR and then back to Shift-DR <br/> this will update the STATUS_AXI_REG
```

## 
```bash
jtag
> cable jlink
> frequency 10000000
> detect
```

---------------------------------------------


## <a name="lic"></a> License
`jtag_axi` is licensed under the permissive MIT license.Please refer to the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/aignacio/jtag_axi",
    "name": "jtag-axi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "soc, vip, hdl, verilog, systemverilog, jtag",
    "author": "aignacio (Anderson Ignacio)",
    "author_email": "<anderson@aignacio.com>",
    "download_url": "https://files.pythonhosted.org/packages/ea/30/9a2f5dfc6711b55642a8f577af715c091bd60ba8df269fd82108e23ef36c/jtag_axi-0.1.0.tar.gz",
    "platform": null,
    "description": "\n[![Regression Tests](https://github.com/aignacio/jtag_axi/actions/workflows/test.yaml/badge.svg)](https://github.com/aignacio/jtag_axi/actions/workflows/test.yaml) [![Lint-SV](https://github.com/aignacio/jtag_axi/actions/workflows/lint.yaml/badge.svg)](https://github.com/aignacio/jtag_axi/actions/workflows/lint.yaml)\n# JTAG to AXI master\n\n## Table of Contents\n* [Description](#intro)\n* [Encoding of AXI registers](#axi_drs)\n* [License](#lic)\n\n![rtluarch](docs/jtag_axi_bd.svg)\n\n## <a name=\"intro\"></a> Description\n\nThis design implements a JTAG interface that is capable of dispatching AXI Lite transactions into an AXI bus. Its main ob\njectives are:\n\n1. To debug SoC peripherals connected to an AXI bus - dispatch read / write single beat burst AXI transactions.\n2. Program memories in SoCs to act as a bootloader interface.\n\n|    **Name**    | **Encoding (4 bits)** | **Access (RW/RO)** |      **Bit length**      |                       **Description**                       |\n|:--------------:|:---------------------:|:------------------:|:------------------------:|:-----------------------------------------------------------:|\n|     EXTEST     |          0000         |         TBD        |            TBD           |                             TBD                             |\n| SAMPLE_PRELOAD |          1010         |         TBD        |            TBD           |                             TBD                             |\n|    IC_RESET    |          1100         |         RW         |   IC_RST_WIDTH - Def. 4  | Programmable register to be used to control external resets |\n|     IDCODE     |          1110         |         RO         |            32            |        Returns the IDCODE of the device - 0xBADC0FFE        |\n|     BYPASS     |          1111         |         RW         |             1            |                Standard bypass jtag register                |\n|  ADDR_AXI_REG  |          0001         |         RW         | ADDR_AXI_WIDTH - Def. 32 |         Indicates the AXI address of the transaction        |\n| DATA_W_AXI_REG |          0010         |         RW         | DATA_AXI_WIDTH - Def. 64 |             Indicates the AXI data to be written            |\n| DATA_R_AXI_REG |          0011         |         RO         | DATA_AXI_WIDTH - Def. 64 |                 Indicates the AXI read data                 |\n|  CTRL_AXI_REG  |          0100         |         RW         |             2            |               Controls AXI master I/F dispatch              |\n| STATUS_AXI_REG |          0101         |         RO         |             3            |           Return the status of the AXI transaction          |\n\n## <a name=\"axi_drs\"></a> Encoding of AXI registers\n\nThe registers `CTRL_AXI_REG` and `STATUS_AXI_REG` follow a specific format and the its encoding is detailed down below.\n\n### STATUS_AXI_REG\n\n| **STATUS_AXI_REG** |                                 **AXI Data Read<br>(32 bits)**                                 |       **Status<br>(3 bits)**       |\n|:------------------:|:----------------------------------------------------------------------------------------------:|:----------------------------------:|\n|      Bit order     |                                               MSB                                              |                 LSB                |\n| **Access (RW/RO)** |                                               RO                                               |                 RO                 |\n|   **Description**  | When read transaction is performed,<br>its data will be written here<br>in order as dispatched | Current status of last transaction |\n\n#### Status decoding:\n\n| **Status code** | **Status alias** |                                                                  **Description**                                                                  |\n|:---------------:|:----------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------:|\n|        0        |     JTAG_IDLE    |                            That is the default state of the design when no <br>transactions (txn) have been dispatched                            |\n|        1        |   JTAG_RUNNING   | When a transaction (txn) is started, the design will change to this state. <br>It should stay there until a response is received or it times out. |\n|        2        |   JTAG_TIMEOUT   |                                                          Indicates a transaction timeout                                                          |\n|        3        |   JTAG_AXI_OKAY  |                                                     Indicates a transaction response: AXI OKAY                                                    |\n|        4        |  JTAG_AXI_EXOKAY |                                                    Indicates a transaction response: AXI EXOKAY                                                   |\n|        5        |  JTAG_AXI_SLVERR |                                                    Indicates a transaction response: AXI SLVERR                                                   |\n|        6        |  JTAG_AXI_DECER  |                                                    Indicates a transaction response: AXI DECER                                                    |\n\n### CTRL_AXI_REG\n\n|    CTRL_AXI_REG    |               **Start<br>(1 bit)**               | **Txn type<br>(1 bit)** |               **Free Slots<br>(3 bits)**              |               **Size AXI txn<br>(3 bits)**              |\n|:------------------:|:------------------------------------------------:|:-----------------------:|:-----------------------------------------------------:|:-------------------------------------------------------:|\n|      Bit order     |                        MSB                       |           ...           |                          ...                          |                           LSB                           |\n| **Access (RW/RO)** |           RW          |            RW           |                           RO                          |                            RW                           |\n|   **Description**  | Once written 1, dispatches<br>an AXI transaction |   1 - Write, 0 - Read   | Number of slots available<br>in the Asynchronous FIFO | Size of the AXI transaction<br>following AXIv4 encoding |\n\n## AXI Write - Flow sequence\n\nFor a write sequence:\n```mermaid\nsequenceDiagram\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: IDCODE\nJTAG I/F ->> JTAG Debug Adapter (PC): Shift-DR: Get 0xBADC0FFE \nNote left of JTAG Debug Adapter (PC): Check whether the IDCODE <br/> matches 0xBADC0FFE\nJTAG Debug Adapter (PC) --> JTAG I/F: Set txn addr\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: ADDR_AXI_REG\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the address of the txn\nJTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR\nJTAG Debug Adapter (PC) --> JTAG I/F: Set txn data to be written\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: DATA_W_AXI_REG\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the data of the txn\nJTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR\nJTAG Debug Adapter (PC) --> JTAG I/F: Start txn\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: CTRL_AXI_REG\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the control values of the txn\nJTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR\n\nJTAG I/F ->> AXI Master I/F: Txn written into Async. FIFO\nAXI Master I/F ->> AXI Bus: Txn issued on the AXI Bus\nJTAG Debug Adapter (PC) --> AXI Bus: ...\nAXI Bus ->> AXI Master I/F: AXI Slave response from AXI Bus\nAXI Master I/F ->> JTAG I/F: Txn response written into Async. FIFO\n\nJTAG Debug Adapter (PC) --> JTAG I/F: Monitor txn status\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: STATUS_AXI_REG\nNote right of JTAG I/F: Whenever Update-DR is selected <br/> with IR set to STATUS_AXI_REG <br/> the latest status will be updated <br/> into STATUS_AXI_REG shift register\nNote left of JTAG Debug Adapter (PC): If txn_status != JTAG_RUNNING <br/> txn has finished\nJTAG I/F ->> JTAG Debug Adapter (PC): Shift-DR: Get STATUS_AXI_REG\n\nNote left of JTAG Debug Adapter (PC): If txn_status == RUNNING <br/> move to Update-DR and then back to Shift-DR <br/> this will update the STATUS_AXI_REG\n```\n\n## AXI Read - Flow sequence\n\nFor a read sequence:\n```mermaid\nsequenceDiagram\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: IDCODE\nJTAG I/F ->> JTAG Debug Adapter (PC): Shift-DR: Get 0xBADC0FFE \nNote left of JTAG Debug Adapter (PC): Check whether the IDCODE <br/> matches 0xBADC0FFE\nJTAG Debug Adapter (PC) --> JTAG I/F: Set txn addr\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: ADDR_AXI_REG\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the address of the txn\nJTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR\nJTAG Debug Adapter (PC) --> JTAG I/F: Start txn\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: CTRL_AXI_REG\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-DR: Shift the control values of the txn\nJTAG Debug Adapter (PC) ->> JTAG I/F: Update-DR\n\nJTAG I/F ->> AXI Master I/F: Txn written into Async. FIFO\nAXI Master I/F ->> AXI Bus: Txn issued on the AXI Bus\nJTAG Debug Adapter (PC) --> AXI Bus: ...\nAXI Bus ->> AXI Master I/F: AXI Slave response from AXI Bus\nAXI Master I/F ->> JTAG I/F: Txn response written into Async. FIFO\n\nJTAG Debug Adapter (PC) --> JTAG I/F: Monitor txn status\nJTAG Debug Adapter (PC) ->> JTAG I/F: Shift-IR: STATUS_AXI_REG\nNote right of JTAG I/F: Whenever Update-DR is selected <br/> with IR set to STATUS_AXI_REG <br/> the latest status will be updated <br/> into STATUS_AXI_REG shift register\nNote left of JTAG Debug Adapter (PC): If txn_status != RUNNING <br/> txn has finished\nJTAG I/F ->> JTAG Debug Adapter (PC): Shift-DR: Get STATUS_AXI_REG\n\nNote left of JTAG Debug Adapter (PC): If txn_status == RUNNING <br/> move to Update-DR and then back to Shift-DR <br/> this will update the STATUS_AXI_REG\n```\n\n## \n```bash\njtag\n> cable jlink\n> frequency 10000000\n> detect\n```\n\n---------------------------------------------\n\n\n## <a name=\"lic\"></a> License\n`jtag_axi` is licensed under the permissive MIT license.Please refer to the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "JTAG to AXI bridge python I/F",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/aignacio/jtag_axi",
        "Source Code": "https://github.com/aignacio/jtag_axi"
    },
    "split_keywords": [
        "soc",
        " vip",
        " hdl",
        " verilog",
        " systemverilog",
        " jtag"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16966872d2bc62c6492d008b146615e1f81b5296677b531accb6b66cfebaa374",
                "md5": "39293aaf64fcc9833f4ff957c767cb36",
                "sha256": "071164455cfd7b58d99c2ecf5c74b32db176fb2926beaf90b90d95c88c156c4b"
            },
            "downloads": -1,
            "filename": "jtag_axi-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "39293aaf64fcc9833f4ff957c767cb36",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 13354,
            "upload_time": "2024-09-29T15:58:45",
            "upload_time_iso_8601": "2024-09-29T15:58:45.436959Z",
            "url": "https://files.pythonhosted.org/packages/16/96/6872d2bc62c6492d008b146615e1f81b5296677b531accb6b66cfebaa374/jtag_axi-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea309a2f5dfc6711b55642a8f577af715c091bd60ba8df269fd82108e23ef36c",
                "md5": "a83e65ef2e8f488fc0f2fca68ed214c7",
                "sha256": "75aef76268bb4ab2e11e9d582ccb536152e7ba934cf6f14886cf4b775a8fb759"
            },
            "downloads": -1,
            "filename": "jtag_axi-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a83e65ef2e8f488fc0f2fca68ed214c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 13453,
            "upload_time": "2024-09-29T15:58:47",
            "upload_time_iso_8601": "2024-09-29T15:58:47.129595Z",
            "url": "https://files.pythonhosted.org/packages/ea/30/9a2f5dfc6711b55642a8f577af715c091bd60ba8df269fd82108e23ef36c/jtag_axi-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-29 15:58:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aignacio",
    "github_project": "jtag_axi",
    "github_not_found": true,
    "lcname": "jtag-axi"
}
        
Elapsed time: 0.38984s