Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6a80944c3f18
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 72900136710b
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Apr 22, 2015

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bf935ba View commit details

Commits on Apr 23, 2015

  1. Copy the full SHA
    7290013 View commit details
Showing with 13 additions and 17 deletions.
  1. +1 −1 .travis.yml
  2. +12 −16 soc/runtime/liblwip/netif/liteethif.c
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ before_install:
- source $HOME/miniconda/bin/activate py34
- sudo apt-get install --force-yes -y iverilog
- pip install coveralls
- conda install migen
- conda install migen cython
install:
- conda build conda/artiq
- conda install $HOME/miniconda/conda-bld/linux-64/artiq-*.tar.bz2
28 changes: 12 additions & 16 deletions soc/runtime/liblwip/netif/liteethif.c
Original file line number Diff line number Diff line change
@@ -15,20 +15,16 @@
#include <hw/flags.h>
#include <hw/ethmac_mem.h>

typedef union {
unsigned char raw[1514];
} ethernet_buffer;

static unsigned int rxslot;
static unsigned int rxlen;
static ethernet_buffer *rxbuffer;
static ethernet_buffer *rxbuffer0;
static ethernet_buffer *rxbuffer1;
static char *rxbuffer;
static char *rxbuffer0;
static char *rxbuffer1;
static unsigned int txslot;
static unsigned int txlen;
static ethernet_buffer *txbuffer;
static ethernet_buffer *txbuffer0;
static ethernet_buffer *txbuffer1;
static char *txbuffer;
static char *txbuffer0;
static char *txbuffer1;

#define IFNAME0 'e'
#define IFNAME1 't'
@@ -46,10 +42,10 @@ static void liteeth_low_level_init(struct netif *netif)
ethmac_sram_reader_ev_pending_write(ETHMAC_EV_SRAM_READER);
ethmac_sram_writer_ev_pending_write(ETHMAC_EV_SRAM_WRITER);

rxbuffer0 = (ethernet_buffer *)ETHMAC_RX0_BASE;
rxbuffer1 = (ethernet_buffer *)ETHMAC_RX1_BASE;
txbuffer0 = (ethernet_buffer *)ETHMAC_TX0_BASE;
txbuffer1 = (ethernet_buffer *)ETHMAC_TX1_BASE;
rxbuffer0 = (char *)ETHMAC_RX0_BASE;
rxbuffer1 = (char *)ETHMAC_RX1_BASE;
txbuffer0 = (char *)ETHMAC_TX0_BASE;
txbuffer1 = (char *)ETHMAC_TX1_BASE;

rxslot = 0;
txslot = 0;
@@ -64,7 +60,7 @@ static err_t liteeth_low_level_output(struct netif *netif, struct pbuf *p)

txlen = 0;
for(q = p; q != NULL; q = q->next) {
memcpy(txbuffer->raw, q->payload, q->len);
memcpy(txbuffer, q->payload, q->len);
txbuffer += q->len;
txlen += q->len;
}
@@ -97,7 +93,7 @@ static struct pbuf *liteeth_low_level_input(struct netif *netif)
p = pbuf_alloc(PBUF_RAW, rxlen, PBUF_POOL);
if(p != NULL) {
for(q = p; q != NULL; q = q->next) {
memcpy(q->payload, rxbuffer->raw, q->len);
memcpy(q->payload, rxbuffer, q->len);
rxbuffer += q->len;
}
}