Merge pull request #28 from enjoy-digital/eb-docs-2

More docs for etherbone packet fields.
This commit is contained in:
enjoy-digital 2017-09-26 12:33:57 +02:00 committed by GitHub
commit 878380abba
1 changed files with 12 additions and 9 deletions

View File

@ -3,6 +3,7 @@ import struct
from litex.soc.interconnect.stream_packet import HeaderField, Header from litex.soc.interconnect.stream_packet import HeaderField, Header
etherbone_magic = 0x4e6f etherbone_magic = 0x4e6f
etherbone_version = 1 etherbone_version = 1
etherbone_packet_header_length = 8 etherbone_packet_header_length = 8
@ -21,20 +22,22 @@ etherbone_packet_header = Header(etherbone_packet_header_fields,
etherbone_packet_header_length, etherbone_packet_header_length,
swap_field_bytes=True) swap_field_bytes=True)
# When reading/writing to a FIFO, you don't increase
# the address after each write.
etherbone_record_header_length = 4 etherbone_record_header_length = 4
etherbone_record_header_fields = { etherbone_record_header_fields = {
"bca": HeaderField(0, 0, 1), "bca": HeaderField(0, 0, 1), # ReplyToCfgSpace - ??? (C)onfig (A)dress
"rca": HeaderField(0, 1, 1), "rca": HeaderField(0, 1, 1), # ReadFromCfgSpace - (R)ead from (C)onfig (A)dress
"rff": HeaderField(0, 2, 1), "rff": HeaderField(0, 2, 1), # ReadFIFO - (R)ead (F)I(F)O
"cyc": HeaderField(0, 4, 1), "cyc": HeaderField(0, 4, 1), # DropCycle - Drop(Cyc)le
"wca": HeaderField(0, 5, 1), "wca": HeaderField(0, 5, 1), # WriteToCfgSpace - (W)rite to (C)onfig (A)dress
"wff": HeaderField(0, 6, 1), "wff": HeaderField(0, 6, 1), # WriteFIFO - (W)rite (F)I(F)O
"byte_enable": HeaderField(1, 0, 8), "byte_enable": HeaderField(1, 0, 8), # Select
"wcount": HeaderField(2, 0, 8), "wcount": HeaderField(2, 0, 8), # Writes
"rcount": HeaderField(3, 0, 8) "rcount": HeaderField(3, 0, 8), # Reads
} }
etherbone_record_header = Header(etherbone_record_header_fields, etherbone_record_header = Header(etherbone_record_header_fields,
etherbone_record_header_length, etherbone_record_header_length,