hwtLib.samples.builders.ethAddrUpdater.
EthAddrUpdater
[source]¶Bases: hwt.synthesizer.unit.Unit
This is example unit which reads dst and src addresses(MAC and IPv4) from ethernet frame stored in memory and writes this addresses in reverse direction into second frame.
_config
()[source]¶Configure object parameters
hwtLib.samples.builders.handshakedBuilderSimple.
HandshakedBuilderSimple
[source]¶Bases: hwt.synthesizer.unit.Unit
Simple example of HsBuilder which can build components for Handshaked interfaces
hwtLib.samples.builders.hsBuilderSplit.
HsBuilderSplit
[source]¶Bases: hwt.synthesizer.unit.Unit
Example of HsBuilder.split_* functions
hwtLib.samples.builders.pingResponder.
PingResponder
[source]¶Bases: hwt.synthesizer.unit.Unit
Listen for echo request on rx axi stream interface and respond with echo response on tx interface
Note: | incoming checksum is not checked |
---|---|
Attention: | you have to ping “ping -s 0 <ip>” because unit ignores additional data in packet and linux by defaults adds it |
_config
()[source]¶Configure object parameters
_declr
()[source]¶declarations
connect_resp
(resp, forgeIn, sendingReply)[source]¶Connect response data on inputs of frame forge
Parameters: |
|
---|
icmp_checksum
(header)[source]¶Note: | we do not need to care about endianity because parser/forge will swap it for us and we can work with little endians only |
---|---|
Returns: | checksum for icmp header |
req_load
(parsed, regs, freeze)[source]¶Load request from parser input into registers
Parameters: |
|
---|---|
Attention: | dst and src are swapped |