Skip to content

Commit

Permalink
enhance(dma): irq flag as bit array
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Jun 29, 2024
1 parent fed71e0 commit 07442ae
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 22 deletions.
31 changes: 25 additions & 6 deletions data/registers/dma_v53.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DMA with 32 channels
block/CHCTRL:
description: no description available.
items:
Expand Down Expand Up @@ -77,14 +78,20 @@ fieldset/ChAbort:
- name: CHABORT
description: "Write 1 to bit n to abort channel n. The bits should only be set when the corresponding channels are enabled. Otherwise, the writes will be ignored for channels that are not enabled. (N: Number of channels)."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/ChEN:
description: Channel Enable Register.
fields:
- name: CHEN
description: Alias of the Enable field of all ChnCtrl registers.
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/ChanReqCtrl:
description: Channel &index0 DMA Request Control Register.
fields:
Expand Down Expand Up @@ -239,28 +246,40 @@ fieldset/INTABORTSTS:
- name: STS
description: "The abort status of channel, one bit per channel. The abort status is set when a channel transfer is aborted. 0x0: Channel n has no abort status 0x1: Channel n has abort status."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/INTERRSTS:
description: Error Interrupt Status Register.
fields:
- name: STS
description: "The error status, one bit per channel. The error status is set when a channel transfer encounters the following error events: - Bus error - Unaligned address - Unaligned transfer width - Reserved configuration 0x0: Channel n has no error status 0x1: Channel n has error status."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/INTHALFSTS:
description: Harlf Complete Interrupt Status.
fields:
- name: STS
description: half transfer done irq status.
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/INTTCSTS:
description: Trans Complete Interrupt Status Register.
fields:
- name: STS
description: "The terminal count status, one bit per channel. The terminal count status is set when a channel transfer finishes without the abort or error event. 0x0: Channel n has no terminal count status 0x1: Channel n has terminal count status."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/LLPointer:
description: Channel &index0 Linked List Pointer Low Part Register.
fields:
Expand Down
26 changes: 21 additions & 5 deletions data/registers/dma_v62.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DMA with 8 channels, with IDLE_FLAG
block/CHCTRL:
description: no description available.
items:
Expand Down Expand Up @@ -73,14 +74,20 @@ fieldset/ChAbort:
- name: CHABORT
description: "Write 1 to bit n to abort channel n. The bits should only be set when the corresponding channels are enabled. Otherwise, the writes will be ignored for channels that are not enabled. (N: Number of channels)."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/ChEN:
description: Channel Enable Register.
fields:
- name: CHEN
description: Alias of the Enable field of all ChnCtrl registers.
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/Ctrl:
description: Channel n Control Register.
fields:
Expand Down Expand Up @@ -227,15 +234,24 @@ fieldset/IntStatus:
- name: ERROR
description: "The error status, one bit per channel. The error status is set when a channel transfer encounters the following error events: - Bus error - Unaligned address - Unaligned transfer width - Reserved configuration 0x0: Channel n has no error status 0x1: Channel n has error status."
bit_offset: 0
bit_size: 8
bit_size: 1
array:
len: 8
stride: 1
- name: ABORT
description: "The abort status of channel, one bit per channel. The abort status is set when a channel transfer is aborted. 0x0: Channel n has no abort status 0x1: Channel n has abort status."
bit_offset: 8
bit_size: 8
bit_size: 1
array:
len: 8
stride: 1
- name: TC
description: "The terminal count status, one bit per channel. The terminal count status is set when a channel transfer finishes without the abort or error event. 0x0: Channel n has no terminal count status 0x1: Channel n has terminal count status."
bit_offset: 16
bit_size: 8
bit_size: 1
array:
len: 8
stride: 1
fieldset/LLPointer:
description: Channel n Linked List Pointer Low Part Register.
fields:
Expand Down
26 changes: 21 additions & 5 deletions data/registers/dma_v67.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DMA with 8 channels
block/CHCTRL:
description: no description available.
items:
Expand Down Expand Up @@ -69,14 +70,20 @@ fieldset/ChAbort:
- name: CHABORT
description: "Write 1 to bit n to abort channel n. The bits should only be set when the corresponding channels are enabled. Otherwise, the writes will be ignored for channels that are not enabled. (N: Number of channels)."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/ChEN:
description: Channel Enable Register.
fields:
- name: CHEN
description: Alias of the Enable field of all ChnCtrl registers.
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/Ctrl:
description: Channel n Control Register.
fields:
Expand Down Expand Up @@ -216,15 +223,24 @@ fieldset/IntStatus:
- name: ERROR
description: "The error status, one bit per channel. The error status is set when a channel transfer encounters the following error events: - Bus error - Unaligned address - Unaligned transfer width - Reserved configuration 0x0: Channel n has no error status 0x1: Channel n has error status."
bit_offset: 0
bit_size: 8
bit_size: 1
array:
len: 8
stride: 1
- name: ABORT
description: "The abort status of channel, one bit per channel. The abort status is set when a channel transfer is aborted. 0x0: Channel n has no abort status 0x1: Channel n has abort status."
bit_offset: 8
bit_size: 8
bit_size: 1
array:
len: 8
stride: 1
- name: TC
description: "The terminal count status, one bit per channel. The terminal count status is set when a channel transfer finishes without the abort or error event. 0x0: Channel n has no terminal count status 0x1: Channel n has terminal count status."
bit_offset: 16
bit_size: 8
bit_size: 1
array:
len: 8
stride: 1
fieldset/LLPointer:
description: Channel n Linked List Pointer Low Part Register.
fields:
Expand Down
31 changes: 25 additions & 6 deletions data/registers/dma_v6e.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DMA with 32 channels, with SwapTable
block/CHCTRL:
description: no description available.
items:
Expand Down Expand Up @@ -81,14 +82,20 @@ fieldset/ChAbort:
- name: CHABORT
description: "Write 1 to bit n to abort channel n. The bits should only be set when the corresponding channels are enabled. Otherwise, the writes will be ignored for channels that are not enabled. (N: Number of channels)."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/ChEN:
description: Channel Enable Register.
fields:
- name: CHEN
description: Alias of the Enable field of all ChnCtrl registers.
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/ChanReqCtrl:
description: Channel &index0 DMA Request Control Register.
fields:
Expand Down Expand Up @@ -255,28 +262,40 @@ fieldset/INTABORTSTS:
- name: STS
description: "The abort status of channel, one bit per channel. The abort status is set when a channel transfer is aborted. 0x0: Channel n has no abort status 0x1: Channel n has abort status."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/INTERRSTS:
description: Error Interrupt Status Register.
fields:
- name: STS
description: "The error status, one bit per channel. The error status is set when a channel transfer encounters the following error events: - Bus error - Unaligned address - Unaligned transfer width - Reserved configuration 0x0: Channel n has no error status 0x1: Channel n has error status."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/INTHALFSTS:
description: Harlf Complete Interrupt Status.
fields:
- name: STS
description: half transfer done irq status.
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/INTTCSTS:
description: Trans Complete Interrupt Status Register.
fields:
- name: STS
description: "The terminal count status, one bit per channel. The terminal count status is set when a channel transfer finishes without the abort or error event. 0x0: Channel n has no terminal count status 0x1: Channel n has terminal count status."
bit_offset: 0
bit_size: 32
bit_size: 1
array:
len: 32
stride: 1
fieldset/LLPointer:
description: Channel &index0 Linked List Pointer Low Part Register.
fields:
Expand Down

0 comments on commit 07442ae

Please sign in to comment.