[ARTIQ] Urukul timing & phase

2018-10-03 Thread Hanhijärvi Kalle via ARTIQ
Hi all,

I have more basic questions regarding timing DDS output from Urukul. So we have 
version 1.1 with AD9912 (14-bit phase resolution).

First of all, how does one select the MMCX input for internal clock (for 
locking with Kasli's clock output)? I'm assuming that's done with the DIP 
switches on the board, but I couldn't find any documentation on that.

Generating pulses with known frequency works fine by doing e.g (2 channels with 
fixed phase relation).

...

self.urukul0_ch0.set(10*MHz, phase = 0.0)
self.urukul0_ch1.set(10*MHz, phase = 0.0)

...

self-urukul0_ch0.sw0.on()
self-urukul0_ch1.sw0.on()
delay(10*us)
self-urukul0_ch0.sw0.off()
self-urukul0_ch1.sw0.off()
delay(10*us)

...

Initial phase of pulse varies from run to run, but I assume that's because I'm 
using the internal XO of Urukul (100 MHz), which is not locked to Kasli's 
timeline.

Relative phase can be adjusted with the phase parameters in the set methods 
above, but results are counterintuitive. For example value of 0.1 equals to 
about 180 degrees at 10MHz, but not for e.g. 11MHz. I understood from the 
documentation, that phase units are turns (i.e. 1 turn = 2*pi) in the DDS 
frequency, but apparently it's not so? Quick browse of the source for the 
AD9912 module seems to indicate, that the phase value above is scaled to a 
16-bit integer, although the phase resolution is only 14 bits (even AD9912 
indicates, that the chip takes a 14-bit word for phase adjustment)? So how does 
one get relative phases of the DDS-channels set correctly?

Thanks in advance!

BR
Kalle Hanhijärvi
___
ARTIQ mailing list
https://ssl.serverraum.org/lists/listinfo/artiq


Re: [ARTIQ] Elementary problems with Kasli

2018-10-02 Thread Hanhijärvi Kalle via ARTIQ
Hi David,

Ok, thank you, checking the boot logs did the trick. Apparently the MAC address 
I had generated wasn't an appropriate unicast address. Newly generated MAC 
seems to work just fine.

- Kalle

-Original Message-
From: David Nadlinger  On Behalf Of David Nadlinger
Sent: 1. lokakuuta 2018 20:04
To: Hanhijärvi Kalle 
Cc: artiq@lists.m-labs.hk
Subject: Re: [ARTIQ] Elementary problems with Kasli

Hi Kalle,

On 1 Oct 2018, at 15:30, Hanhijärvi Kalle via ARTIQ wrote:
> Following this I set IP and MAC addresses:
>
> $ artiq_mkfs flash_storage.img -s mac 75:53:7b:9c:63:14 -s ip
> 192.168.1.10
> $ artiq_flash -t kasli -f flash_storage.img storage start
>
> Now I tried to write the core kernel to the board by (after successful 
> compilation of idle_kernel)
>
> $ artiq_coremgmt config -f idle_kernel idle_kernel.elf
>
> This gives an error about having no route to host. So I can't 
> establish a network connection to the board.

Can you ping the board on the command line using that address? You might also 
want to have a look at the serial console while the Kasli is booting up for 
relevant debug information (e.g. using `flterm /dev/ttyUSB1`).

Best regards,
David
___
ARTIQ mailing list
https://ssl.serverraum.org/lists/listinfo/artiq


[ARTIQ] Elementary problems with Kasli

2018-10-01 Thread Hanhijärvi Kalle via ARTIQ
Hello,

I'm not sure if this is the right forum for a technical question such as this, 
so my apologies if this is inappropriate.

We recently acquired Kasli (v. 1.1.) board with Urukul DDS addon, and now we've 
had some elementary problems when in the installation.

So I've been following the 4.0.dev-branch documentation for installation.

While installing artiq packages using conda, I assumed we had opticlock-variant 
of kasli (so I figured out from the documentation).

I was able to flash FPGA gateware bitstream by doing:

$ artiq_flash -t kasli

Following this I set IP and MAC addresses:

$ artiq_mkfs flash_storage.img -s mac 75:53:7b:9c:63:14 -s ip 192.168.1.10
$ artiq_flash -t kasli -f flash_storage.img storage start

Now I tried to write the core kernel to the board by (after successful 
compilation of idle_kernel)

$ artiq_coremgmt config -f idle_kernel idle_kernel.elf

This gives an error about having no route to host. So I can't establish a 
network connection to the board.

Here I prepared device_db.py, with core_addr = "192.168.1.10". Is this correct 
way to set the target IP address? Configurations are done on a computer with IP 
set to 192.168.1.1, netmask set to 255.255.255.0 and connected to the Kasli 
board through a gigabit switch with SFP ports. On Kasli, I'm using SFP0 port 
for the fiber.

Any ideas? am I doing something wrong?

BR
Kalle Hanhijärvi
___
ARTIQ mailing list
https://ssl.serverraum.org/lists/listinfo/artiq