Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[adc_ctrl] Updates to LP -> NP transition #21829

Merged
merged 4 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 170 additions & 11 deletions hw/ip/adc_ctrl/data/adc_ctrl.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
dv_doc: "../doc/dv",
hw_checklist: "../doc/checklist",
sw_checklist: "/sw/device/lib/dif/dif_adc_ctrl",
version: "1.0.0",
version: "2.0.0",
life_stage: "L1",
design_stage: "D3",
verification_stage: "V2S",
design_stage: "D1",
verification_stage: "V1",
dif_stage: "S2",
notes: "",
clocking: [
Expand Down Expand Up @@ -306,8 +306,29 @@
resval: "0",
fields: [
{ bits: "NumAdcFilter-1:0",
name: "EN",
desc: "0: filter match wil not generate wakeupe; 1: filter match will generate wakeup",
name: "MATCH_EN",
desc: '''
Filter wakeup source.

0: filter match will not generate wakeup;
1: filter match will generate wakeup
'''
}
{
bits: "NumAdcFilter:NumAdcFilter",
name: "TRANS_EN",
desc: '''
Wakeup due to FSM transition from low power sampling
mode to normal sampling mode.

Note that this wakeup source is primarily intended for debug purposes.
If enabled all the time, this can lead to many wakeups due to false
positives that are ruled out automatically by adc_ctrl after
transitioning from LP -> NP.

0: transition match will not generate wakeup;
1: transition match will generate wakeup
'''
}
]
}
Expand All @@ -324,9 +345,13 @@
resval: "0",
fields: [
{ bits: "7:0",
name: "COND",
name: "MATCH",
desc: "0: filter condition is not met; 1: filter condition is met",
}
{ bits: "NumAdcFilter:NumAdcFilter",
name: "TRANS",
desc: "0: transition did not occur; 1: transition occurred",
}
]
}

Expand All @@ -343,10 +368,36 @@
hwaccess: "hro",
resval: "0",
fields: [
{ bits: "8:0",
name: "EN",
desc: "0: interrupt source is not enabled; 1: interrupt source is enabled",
{ bits: "NumAdcFilter-1:0",
name: "MATCH_EN",
desc: '''
Filter interrupt source.

0: interrupt source is not enabled; 1: interrupt source is enabled
'''
}
{
bits: "NumAdcFilter:NumAdcFilter",
name: "TRANS_EN",
desc: '''
Interrupt due to FSM transition from low power sampling
mode to normal sampling mode. This is mainly intended for debug.

Note that this interrupt is primarily intended for debug purposes.

0: interrupt source is not enabled; 1: interrupt source is enabled
'''
}
{
bits: "NumAdcFilter+1:NumAdcFilter+1",
name: "ONESHOT_EN",
desc: '''
Interrupt due to oneshot sampling.

0: interrupt source is not enabled; 1: interrupt source is enabled
'''
}

]
}

Expand All @@ -360,14 +411,122 @@
"excl:CsrNonInitTests:CsrExclCheck"],
fields: [
{ bits: "NumAdcFilter-1:0",
name: "filter_match",
name: "MATCH",
desc: "0: filter condition is not met; 1: filter condition is met",
}
{ bits: "NumAdcFilter:NumAdcFilter",
name: "oneshot",
name: "TRANS",
desc: "0: transition did not occur; 1: transition occurred",
}
{ bits: "NumAdcFilter+1:NumAdcFilter+1",
name: "ONESHOT",
desc: "0: oneshot sample is not done ; 1: oneshot sample is done",
}
]
}

{ name: "adc_fsm_state",
desc: "State of the internal state machine",
swaccess: "ro",
hwaccess: "hwo",
hwext: "true",
resval: "0",
async: "clk_aon_i",
tags: [ // internal HW state output, cannot be auto predicted.
"excl:CsrNonInitTests:CsrExclCheck"],
fields: [
{ bits: "4:0",
name: "state",
desc: "Current FSM state (for debug purposes)",
enum: [
{
value: "0",
name: "PWRDN",
desc: "in the power down state"
}
{
value: "1",
name: "PWRUP",
desc: "being powered up"
}
{
value: "2",
name: "ONEST_0",
desc: "in oneshot mode; sample channel0 value"
}
{
value: "3",
name: "ONEST_021",
desc: "in oneshot mode; transition from chn0 to chn1"
}
{
value: "4",
name: "ONEST_1",
desc: "in oneshot mode; sample channel1 value"
}
{
value: "5",
name: "ONEST_DONE",
desc: "one shot done"
}
{
value: "6",
name: "LP_0",
desc: "in low-power mode, sample channel0 value"
}
{
value: "7",
name: "LP_021",
desc: "in low-power mode, transition from chn0 to chn1"
}
{
value: "8",
name: "LP_1",
desc: "in low-power mode, sample channel1 value"
}
{
value: "9",
name: "LP_EVAL",
desc: "in low-power mode, evaluate if there is a match"
}
{
value: "10",
name: "LP_SLP",
desc: "in low-power mode, go to sleep"
}
{
value: "11",
name: "LP_PWRUP",
desc: "in low-power mode, being powered up"
}
{
value: "12",
name: "NP_0",
desc: "in normal-power mode, sample channel0 value"
}
{
value: "13",
name: "NP_021",
desc: "in normal-power mode, transition from chn0 to chn1"
}
{
value: "14",
name: "NP_1",
desc: "in normal-power mode, sample channel1 value"
}
{
value: "15",
name: "NP_EVAL",
desc: "in normal-power mode, detection is done"
}
{
value: "16",
name: "NP_DONE",
desc: "normal-power detection done"
}
]
}
]
}
],
}
Loading
Loading