luna_soc.gateware.core.usb2.ep_in module
Implementation of a Triple-FIFO endpoint manager.
Equivalent (but not binary-compatbile) implementation of ValentyUSB’s eptri.
For an example, see examples/usb/eptri or TinyUSB’s luna/dcd_eptri.c.
- class luna_soc.gateware.core.usb2.ep_in.Peripheral(*args, src_loc_at=0, **kwargs)[source]
Bases:
ComponentIN component of our eptri-equivalent interface.
Implements the FIFO that handles eptri IN requests. This FIFO collects USB data, and transmits it in response to an IN token. Like all eptri interfaces; it can handle only one pending packet at a time.
Attributes
- interface: EndpointInterface
Our primary interface to the core USB device hardware.
- class Data(*args, src_loc_at=0, **kwargs)[source]
Bases:
RegisterA CSR register.
Parameters
- fields
dictorlistorField Collection of register fields. If
None(default), a dict is populated from Python variable annotations.fieldsis used to create aFieldActionMap,FieldActionArray, orFieldAction, depending on its type (dict, list, or Field).
Interface attributes
- element
Element Interface between this register and a CSR bus primitive.
Attributes
- field
FieldActionMaporFieldActionArrayorFieldAction Collection of field instances.
- f
FieldActionMaporFieldActionArrayorFieldAction Shorthand for
Register.field.
Raises
TypeErrorIf
fieldsis neitherNone, adict, alist, or aField.ValueErrorIf
fieldsis notNoneand at least one variable annotation is aField.ValueErrorIf
element.accessis not readable and at least one field is readable.ValueErrorIf
element.accessis not writable and at least one field is writable.
- byte: <amaranth_soc.csr.reg.Field object at 0x7f6320b0f6e0>
- fields
- class Endpoint(*args, src_loc_at=0, **kwargs)[source]
Bases:
RegisterA CSR register.
Parameters
- fields
dictorlistorField Collection of register fields. If
None(default), a dict is populated from Python variable annotations.fieldsis used to create aFieldActionMap,FieldActionArray, orFieldAction, depending on its type (dict, list, or Field).
Interface attributes
- element
Element Interface between this register and a CSR bus primitive.
Attributes
- field
FieldActionMaporFieldActionArrayorFieldAction Collection of field instances.
- f
FieldActionMaporFieldActionArrayorFieldAction Shorthand for
Register.field.
Raises
TypeErrorIf
fieldsis neitherNone, adict, alist, or aField.ValueErrorIf
fieldsis notNoneand at least one variable annotation is aField.ValueErrorIf
element.accessis not readable and at least one field is readable.ValueErrorIf
element.accessis not writable and at least one field is writable.
- number: <amaranth_soc.csr.reg.Field object at 0x7f6320b0eea0>
- fields
- class Pid(*args, src_loc_at=0, **kwargs)[source]
Bases:
RegisterA CSR register.
Parameters
- fields
dictorlistorField Collection of register fields. If
None(default), a dict is populated from Python variable annotations.fieldsis used to create aFieldActionMap,FieldActionArray, orFieldAction, depending on its type (dict, list, or Field).
Interface attributes
- element
Element Interface between this register and a CSR bus primitive.
Attributes
- field
FieldActionMaporFieldActionArrayorFieldAction Collection of field instances.
- f
FieldActionMaporFieldActionArrayorFieldAction Shorthand for
Register.field.
Raises
TypeErrorIf
fieldsis neitherNone, adict, alist, or aField.ValueErrorIf
fieldsis notNoneand at least one variable annotation is aField.ValueErrorIf
element.accessis not readable and at least one field is readable.ValueErrorIf
element.accessis not writable and at least one field is writable.
- toggle: <amaranth_soc.csr.reg.Field object at 0x7f6320b0f0b0>
- fields
- class Reset(*args, src_loc_at=0, **kwargs)[source]
Bases:
RegisterA CSR register.
Parameters
- fields
dictorlistorField Collection of register fields. If
None(default), a dict is populated from Python variable annotations.fieldsis used to create aFieldActionMap,FieldActionArray, orFieldAction, depending on its type (dict, list, or Field).
Interface attributes
- element
Element Interface between this register and a CSR bus primitive.
Attributes
- field
FieldActionMaporFieldActionArrayorFieldAction Collection of field instances.
- f
FieldActionMaporFieldActionArrayorFieldAction Shorthand for
Register.field.
Raises
TypeErrorIf
fieldsis neitherNone, adict, alist, or aField.ValueErrorIf
fieldsis notNoneand at least one variable annotation is aField.ValueErrorIf
element.accessis not readable and at least one field is readable.ValueErrorIf
element.accessis not writable and at least one field is writable.
- fifo: <amaranth_soc.csr.reg.Field object at 0x7f6320b0f5c0>
- fields
- class Stall(*args, src_loc_at=0, **kwargs)[source]
Bases:
RegisterA CSR register.
Parameters
- fields
dictorlistorField Collection of register fields. If
None(default), a dict is populated from Python variable annotations.fieldsis used to create aFieldActionMap,FieldActionArray, orFieldAction, depending on its type (dict, list, or Field).
Interface attributes
- element
Element Interface between this register and a CSR bus primitive.
Attributes
- field
FieldActionMaporFieldActionArrayorFieldAction Collection of field instances.
- f
FieldActionMaporFieldActionArrayorFieldAction Shorthand for
Register.field.
Raises
TypeErrorIf
fieldsis neitherNone, adict, alist, or aField.ValueErrorIf
fieldsis notNoneand at least one variable annotation is aField.ValueErrorIf
element.accessis not readable and at least one field is readable.ValueErrorIf
element.accessis not writable and at least one field is writable.
- stalled: <amaranth_soc.csr.reg.Field object at 0x7f6320b0ef90>
- fields
- class Status(*args, src_loc_at=0, **kwargs)[source]
Bases:
RegisterA CSR register.
Parameters
- fields
dictorlistorField Collection of register fields. If
None(default), a dict is populated from Python variable annotations.fieldsis used to create aFieldActionMap,FieldActionArray, orFieldAction, depending on its type (dict, list, or Field).
Interface attributes
- element
Element Interface between this register and a CSR bus primitive.
Attributes
- field
FieldActionMaporFieldActionArrayorFieldAction Collection of field instances.
- f
FieldActionMaporFieldActionArrayorFieldAction Shorthand for
Register.field.
Raises
TypeErrorIf
fieldsis neitherNone, adict, alist, or aField.ValueErrorIf
fieldsis notNoneand at least one variable annotation is aField.ValueErrorIf
element.accessis not readable and at least one field is readable.ValueErrorIf
element.accessis not writable and at least one field is writable.
- epno: <amaranth_soc.csr.reg.Field object at 0x7f6320b0f260>
- have: <amaranth_soc.csr.reg.Field object at 0x7f6320b0f410>
- idle: <amaranth_soc.csr.reg.Field object at 0x7f6320b0f380>
- nak: <amaranth_soc.csr.reg.Field object at 0x7f6320b0f1d0>
- pid: <amaranth_soc.csr.reg.Field object at 0x7f6320b0f4a0>
- fields