Skip to content

Commit

Permalink
feat(timer): Remove group from timer csrs.
Browse files Browse the repository at this point in the history
Used as an example for ungrouped regs, as mentioned in IObundle#83
  • Loading branch information
arturum1 committed Nov 24, 2024
1 parent a37d92f commit 554b140
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 50 deletions.
2 changes: 1 addition & 1 deletion py2hwsw/lib/hardware/iob_csrs/scripts/reg_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def build_regs_table(core):
general_regs_table = find_obj_in_list(core["csrs"], "general")
if not general_regs_table:
general_regs_table = iob_csr_group(
name="general",
name="general_operation",
descr="General Registers.",
regs=[],
)
Expand Down
92 changes: 43 additions & 49 deletions py2hwsw/lib/hardware/iob_timer/iob_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,55 +114,49 @@ def setup(py_params_dict):
"instance_description": "Control/Status Registers",
"csrs": [
{
"name": "timer",
"descr": "TIMER software accessible registers.",
"regs": [
{
"name": "reset",
"type": "W",
"n_bits": 1,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "Timer soft reset",
},
{
"name": "enable",
"type": "W",
"n_bits": 1,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "Timer enable",
},
{
"name": "sample",
"type": "W",
"n_bits": 1,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "Sample time counter value into a readable register",
},
{
"name": "data_low",
"type": "R",
"n_bits": 32,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "High part of the timer value, which has twice the width of the data word width",
},
{
"name": "data_high",
"type": "R",
"n_bits": 32,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "Low part of the timer value, which has twice the width of the data word width",
},
],
"name": "reset",
"type": "W",
"n_bits": 1,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "Timer soft reset",
},
{
"name": "enable",
"type": "W",
"n_bits": 1,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "Timer enable",
},
{
"name": "sample",
"type": "W",
"n_bits": 1,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "Sample time counter value into a readable register",
},
{
"name": "data_low",
"type": "R",
"n_bits": 32,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "High part of the timer value, which has twice the width of the data word width",
},
{
"name": "data_high",
"type": "R",
"n_bits": 32,
"rst_val": 0,
"log2n_items": 0,
"autoreg": True,
"descr": "Low part of the timer value, which has twice the width of the data word width",
},
],
"csr_if": "iob",
Expand Down

0 comments on commit 554b140

Please sign in to comment.