"...model/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "7c5cdcd4d7b407121b7f93ddcd30e51fb3086ef8"
Commit 86751f6f authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

sims/nic/corundum: increase ethernet stream width

We had this set to 64bit which is too small for 100G. Bumped it up to
512.
parent 46b08b52
......@@ -622,11 +622,12 @@ class EthernetTx {
top.tx_axis_tready = 1;
if (top.tx_axis_tvalid) {
/* iterate over all 8 bytes */
for (size_t i = 0; i < 8; i++) {
if ((top.tx_axis_tkeep & (1 << i)) != 0) {
/* iterate over all bytes on the bus */
uint8_t *txbus = (uint8_t *) &top.tx_axis_tdata;
for (size_t i = 0; i < sizeof(top.tx_axis_tdata); i++) {
if ((top.tx_axis_tkeep & (1ULL << i)) != 0) {
assert(packet_len < 2048);
packet_buf[packet_len++] = (top.tx_axis_tdata >> (i * 8));
packet_buf[packet_len++] = txbus[i];
}
}
......@@ -705,12 +706,12 @@ class EthernetRx {
std::cout << "rx from " << fifo_pos_rd << std::endl;
#endif
top.rx_axis_tkeep = 0;
top.rx_axis_tdata = 0;
uint8_t *rdata = (uint8_t *) &top.rx_axis_tdata;
size_t i;
for (i = 0; i < 8 && packet_off < fifo_lens[fifo_pos_rd]; i++) {
top.rx_axis_tdata |= ((uint64_t)fifo_bufs[fifo_pos_rd][packet_off])
<< (i * 8);
top.rx_axis_tkeep |= (1 << i);
for (i = 0; i < sizeof(top.rx_axis_tdata) &&
packet_off < fifo_lens[fifo_pos_rd]; i++) {
rdata[i] = fifo_bufs[fifo_pos_rd][packet_off];
top.rx_axis_tkeep |= (1ULL << i);
packet_off++;
}
top.rx_axis_tvalid = 1;
......
......@@ -135,7 +135,7 @@ module interface #
// DMA RAM pipeline stages
parameter RAM_PIPELINE = 2,
// Width of AXI stream interfaces in bits
parameter AXIS_DATA_WIDTH = 64,
parameter AXIS_DATA_WIDTH = 512,
// AXI stream tkeep signal width (words per cycle)
parameter AXIS_KEEP_WIDTH = AXIS_DATA_WIDTH/8,
// Max transmit packet size
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment