cores/xadc: add CSR descriptions.
This commit is contained in:
parent
846a2720b7
commit
cbc1f5949d
|
@ -1,6 +1,6 @@
|
||||||
# This file is Copyright (c) 2014-2015 Robert Jordens <jordens@gmail.com>
|
# This file is Copyright (c) 2014-2015 Robert Jordens <jordens@gmail.com>
|
||||||
# This file is Copyright (c) 2019 bunnie <bunnie@kosagi.com>
|
# This file is Copyright (c) 2019 bunnie <bunnie@kosagi.com>
|
||||||
# This file is Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr>
|
# This file is Copyright (c) 2019-2020 Florent Kermarrec <florent@enjoy-digital.fr>
|
||||||
# License: BSD
|
# License: BSD
|
||||||
|
|
||||||
from migen import *
|
from migen import *
|
||||||
|
@ -13,17 +13,21 @@ analog_layout = [("vauxp", 16), ("vauxn", 16), ("vp", 1), ("vn", 1)]
|
||||||
|
|
||||||
class XADC(Module, AutoCSR):
|
class XADC(Module, AutoCSR):
|
||||||
def __init__(self, analog_pads=None):
|
def __init__(self, analog_pads=None):
|
||||||
# Temperature(°C) = adc_value*503.975/4096 - 273.15
|
# Temperature
|
||||||
self.temperature = CSRStatus(12)
|
self.temperature = CSRStatus(12, description="""Raw Temperature value from XADC.\n
|
||||||
|
Temperature (°C) = ``Value`` x 503.975 / 4096 - 273.15.""")
|
||||||
|
|
||||||
# Voltage(V) = adc_value*)/4096*3
|
# Voltages
|
||||||
self.vccint = CSRStatus(12)
|
self.vccint = CSRStatus(12, description="""Raw VCCINT value from XADC.\n
|
||||||
self.vccaux = CSRStatus(12)
|
VCCINT (V) = ``Value`` x 3 / 4096.""")
|
||||||
self.vccbram = CSRStatus(12)
|
self.vccaux = CSRStatus(12, description="""Raw VCCAUX value from XADC.\n
|
||||||
|
VCCAUX (V) = ``Value`` x 3 / 4096.""")
|
||||||
|
self.vccbram = CSRStatus(12, description="""Raw VCCBRAM value from XADC.\n
|
||||||
|
VCCBRAM (V) = ``Value`` x 3 / 4096.""")
|
||||||
|
|
||||||
# End of Convertion/Sequence
|
# End of Convertion/Sequence
|
||||||
self.eoc = CSRStatus()
|
self.eoc = CSRStatus(description="End of Convertion Status, ``1``: Convertion Done.")
|
||||||
self.eos = CSRStatus()
|
self.eos = CSRStatus(description="End of Sequence Status, ``1``: Sequence Done.")
|
||||||
|
|
||||||
# Alarms
|
# Alarms
|
||||||
self.alarm = Signal(8)
|
self.alarm = Signal(8)
|
||||||
|
|
Loading…
Reference in New Issue