From 3a656c61d9b1fd01cc1f7ddaa355f6daa54faa61 Mon Sep 17 00:00:00 2001 From: Tim Ansell Date: Fri, 1 Sep 2017 23:57:34 +1000 Subject: [PATCH] More docs for etherbone packet fields. Info comes from http://www.ohwr.org/attachments/1669/spec.pdf dated 24 July 2012 --- litex/soc/tools/remote/etherbone.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/litex/soc/tools/remote/etherbone.py b/litex/soc/tools/remote/etherbone.py index 7be257763..068f65a06 100644 --- a/litex/soc/tools/remote/etherbone.py +++ b/litex/soc/tools/remote/etherbone.py @@ -3,6 +3,7 @@ import struct from litex.soc.interconnect.stream_packet import HeaderField, Header + etherbone_magic = 0x4e6f etherbone_version = 1 etherbone_packet_header_length = 8 @@ -21,20 +22,22 @@ etherbone_packet_header = Header(etherbone_packet_header_fields, etherbone_packet_header_length, 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_fields = { - "bca": HeaderField(0, 0, 1), - "rca": HeaderField(0, 1, 1), - "rff": HeaderField(0, 2, 1), - "cyc": HeaderField(0, 4, 1), - "wca": HeaderField(0, 5, 1), - "wff": HeaderField(0, 6, 1), + "bca": HeaderField(0, 0, 1), # ReplyToCfgSpace - ??? (C)onfig (A)dress + "rca": HeaderField(0, 1, 1), # ReadFromCfgSpace - (R)ead from (C)onfig (A)dress + "rff": HeaderField(0, 2, 1), # ReadFIFO - (R)ead (F)I(F)O + "cyc": HeaderField(0, 4, 1), # DropCycle - Drop(Cyc)le + "wca": HeaderField(0, 5, 1), # WriteToCfgSpace - (W)rite to (C)onfig (A)dress + "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_length,