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: b3abc9baf90a
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: f431add20ebc
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 18, 2015

  1. Copy the full SHA
    40e10ca View commit details
  2. Copy the full SHA
    f431add View commit details
Showing with 18 additions and 14 deletions.
  1. +14 −3 artiq/runtime/analyzer.c
  2. +4 −11 examples/master/repository/coredevice_examples/simple/blink_forever.py
17 changes: 14 additions & 3 deletions artiq/runtime/analyzer.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include <system.h>
#include <generated/csr.h>

#include "log.h"
#include "analyzer.h"


@@ -30,6 +32,8 @@ static void disarm(void)
{
rtio_analyzer_dma_enable_write(0);
while(rtio_analyzer_dma_busy_read());
flush_cpu_dcache();
flush_l2_cache();
}

void analyzer_init(void)
@@ -77,7 +81,7 @@ void analyzer_end(void)

int analyzer_input(void *data, int length)
{
/* The analyzer never accepts input. */
log("no input should be received by analyzer, dropping connection");
return -1;
}

@@ -99,6 +103,9 @@ void analyzer_poll(void **data, int *length)
case SEND_STATE_TERMINATE:
*length = -1;
break;
default:
*length = 0;
break;
}
}

@@ -117,8 +124,12 @@ void analyzer_ack_sent(int length)
offset_sent = 0;
if(wraparound)
send_state = SEND_STATE_POST_POINTER;
else
send_state = SEND_STATE_PRE_POINTER;
else {
if(pointer)
send_state = SEND_STATE_PRE_POINTER;
else
send_state = SEND_STATE_TERMINATE;
}
}
break;
case SEND_STATE_POST_POINTER:
Original file line number Diff line number Diff line change
@@ -4,17 +4,10 @@
class BlinkForever(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("ttl0")
self.setattr_device("ttl1")

def hello(self, i):
print("Hello world", i)
self.setattr_device("led")

@kernel
def run(self):
for i in range(80000):
self.ttl0.pulse(40*us)
self.ttl1.pulse(40*us)
delay(40*us)
for i in range(7):
self.hello(i)
while True:
self.led.pulse(100*ms)
delay(100*ms)