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: fbd83cf9ee58
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: 0443f83d5ee3
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Nov 23, 2016

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    cd40d5b View commit details
  2. Copy the full SHA
    0443f83 View commit details
2 changes: 2 additions & 0 deletions artiq/gateware/targets/kc705.py
Original file line number Diff line number Diff line change
@@ -225,6 +225,7 @@ def __init__(self, cpu_type="or1k", **kwargs):
ofifo_depth=512,
ififo_depth=4))

self.config["HAS_RTIO_LOG"] = None
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
rtio_channels.append(rtio.LogChannel())

@@ -303,6 +304,7 @@ def __init__(self, cpu_type="or1k", **kwargs):
ofifo_depth=512,
ififo_depth=4))

self.config["HAS_RTIO_LOG"] = None
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
rtio_channels.append(rtio.LogChannel())

1 change: 1 addition & 0 deletions artiq/gateware/targets/pipistrello.py
Original file line number Diff line number Diff line change
@@ -212,6 +212,7 @@ def __init__(self, cpu_type="or1k", **kwargs):
rtio_channels.append(rtio.Channel.from_phy(
phy, ofifo_depth=64, ififo_depth=64))

self.config["HAS_RTIO_LOG"] = None
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
rtio_channels.append(rtio.LogChannel())

5 changes: 5 additions & 0 deletions artiq/runtime.rs/libksupport/api.rs
Original file line number Diff line number Diff line change
@@ -105,9 +105,14 @@ static mut API: &'static [(&'static str, *const ())] = &[
api!(rtio_input_timestamp = ::rtio::input_timestamp),
api!(rtio_input_data = ::rtio::input_data),

#[cfg(has_i2c)]
api!(i2c_init = ::i2c::init),
#[cfg(has_i2c)]
api!(i2c_start = ::i2c::start),
#[cfg(has_i2c)]
api!(i2c_stop = ::i2c::stop),
#[cfg(has_i2c)]
api!(i2c_write = ::i2c::write),
#[cfg(has_i2c)]
api!(i2c_read = ::i2c::read),
];
1 change: 1 addition & 0 deletions artiq/runtime.rs/libksupport/lib.rs
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ macro_rules! artiq_raise {
}

mod rtio;
#[cfg(has_i2c)]
mod i2c;

use core::{mem, ptr, slice, str};
4 changes: 4 additions & 0 deletions artiq/runtime.rs/libksupport/rtio.rs
Original file line number Diff line number Diff line change
@@ -125,6 +125,7 @@ pub extern fn input_data(channel: u32) -> u32 {
}
}

#[cfg(has_rtio_log)]
pub fn log(timestamp: i64, data: &[u8]) {
unsafe {
csr::rtio::chan_sel_write(csr::CONFIG_RTIO_LOG_CHANNEL);
@@ -146,3 +147,6 @@ pub fn log(timestamp: i64, data: &[u8]) {
csr::rtio::o_we_write(1);
}
}

#[cfg(not(has_rtio_log))]
pub fn log(timestamp: i64, data: &[u8]) {}