1
0
Fork 0

acpki: add legacy i_status/o_status registers

This commit is contained in:
Sebastien Bourdeauducq 2020-08-04 17:31:35 +08:00
parent 62988a580e
commit 537f4968eb
1 changed files with 7 additions and 1 deletions

View File

@ -166,6 +166,8 @@ class KernelInitiator(Module, AutoCSR):
self.counter = CSRStatus(64) self.counter = CSRStatus(64)
self.counter_update = CSR() self.counter_update = CSR()
self.o_status = CSRStatus(3)
self.i_status = CSRStatus(4)
self.submodules.engine = Engine(bus, user) self.submodules.engine = Engine(bus, user)
self.cri = rtio.cri.Interface() self.cri = rtio.cri.Interface()
@ -250,5 +252,9 @@ class KernelInitiator(Module, AutoCSR):
If(cmd_write, Case(self.engine.din_index, din_cases_cmdwrite)), If(cmd_write, Case(self.engine.din_index, din_cases_cmdwrite)),
] ]
# RTIO counter access # CRI CSRs
self.sync += If(self.counter_update.re, self.counter.status.eq(tsc.full_ts_cri)) self.sync += If(self.counter_update.re, self.counter.status.eq(tsc.full_ts_cri))
self.comb += [
self.o_status.status.eq(self.cri.o_status),
self.i_status.status.eq(self.cri.i_status),
]