forked from M-Labs/artiq
refactor Analyzer constants to unlink dependencies
This commit is contained in:
parent
f4c7f02127
commit
cbb60337ae
|
@ -1,33 +1,15 @@
|
|||
from operator import itemgetter
|
||||
from collections import namedtuple
|
||||
from itertools import count
|
||||
from enum import Enum
|
||||
import struct
|
||||
import logging
|
||||
|
||||
from artiq.gateware.rtio.analyzer_common import MessageType, ExceptionType
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MessageType(Enum):
|
||||
output = 0b00
|
||||
input = 0b01
|
||||
exception = 0b10
|
||||
|
||||
|
||||
class ExceptionType(Enum):
|
||||
reset_rising = 0b000000
|
||||
reset_falling = 0b000001
|
||||
reset_phy_rising = 0b000010
|
||||
reset_phy_falling = 0b000011
|
||||
|
||||
o_underflow_reset = 0b010000
|
||||
o_sequence_error_reset = 0b010001
|
||||
o_collision_error_reset = 0b010010
|
||||
|
||||
i_overflow_reset = 0b100000
|
||||
|
||||
|
||||
OutputMessage = namedtuple(
|
||||
"OutputMessage", "channel timestamp rtio_counter address data")
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ from migen.genlib.record import Record, layout_len
|
|||
from misoc.interconnect.csr import *
|
||||
from misoc.interconnect import stream
|
||||
|
||||
from artiq.coredevice.analyzer import MessageType, ExceptionType
|
||||
from artiq.gateware.rtio.analyzer_common import MessageType, ExceptionType
|
||||
|
||||
|
||||
__all__ = ["Analyzer"]
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
from enum import Enum
|
||||
|
||||
|
||||
class MessageType(Enum):
|
||||
output = 0b00
|
||||
input = 0b01
|
||||
exception = 0b10
|
||||
|
||||
|
||||
class ExceptionType(Enum):
|
||||
reset_rising = 0b000000
|
||||
reset_falling = 0b000001
|
||||
reset_phy_rising = 0b000010
|
||||
reset_phy_falling = 0b000011
|
||||
|
||||
o_underflow_reset = 0b010000
|
||||
o_sequence_error_reset = 0b010001
|
||||
o_collision_error_reset = 0b010010
|
||||
|
||||
i_overflow_reset = 0b100000
|
Loading…
Reference in New Issue