Compare commits
1 Commits
26a2bfacf5
...
92b702da1b
Author | SHA1 | Date |
---|---|---|
Egor Savkin | 92b702da1b |
|
@ -107,6 +107,7 @@ class GTPBootstrapClock(Module):
|
|||
class GenericStandalone(SoCCore):
|
||||
def __init__(self, description, acpki=False):
|
||||
self.acpki = acpki
|
||||
clk_freq = description["rtio_frequency"]
|
||||
|
||||
platform = kasli_soc.Platform()
|
||||
platform.toolchain.bitstream_commands.extend([
|
||||
|
@ -139,7 +140,7 @@ class GenericStandalone(SoCCore):
|
|||
]
|
||||
fix_serdes_timing_path(platform)
|
||||
self.submodules.bootstrap = GTPBootstrapClock(self.platform, description["rtio_frequency"])
|
||||
self.config["CLOCK_FREQUENCY"] = int(description["rtio_frequency"])
|
||||
self.config["CLOCK_FREQUENCY"] = int(clk_freq)
|
||||
|
||||
self.submodules.sys_crg = zynq_clocking.SYSCRG(self.platform, self.ps7, clk_synth_se_buf)
|
||||
platform.add_false_path_constraints(
|
||||
|
@ -230,7 +231,7 @@ class GenericMaster(SoCCore):
|
|||
pads=data_pads,
|
||||
clk_freq=clk_freq)
|
||||
self.csr_devices.append("gt_drtio")
|
||||
self.config["CLOCK_FREQUENCY"] = int(description["rtio_frequency"])
|
||||
self.config["CLOCK_FREQUENCY"] = int(clk_freq)
|
||||
|
||||
txout_buf = Signal()
|
||||
gtx0 = self.gt_drtio.gtxs[0]
|
||||
|
|
|
@ -11,13 +11,10 @@ extern crate alloc;
|
|||
#[cfg(feature = "target_kasli_soc")]
|
||||
use core::cell::RefCell;
|
||||
|
||||
use embedded_hal::blocking::delay::DelayMs;
|
||||
use ksupport;
|
||||
use libasync::task;
|
||||
#[cfg(has_drtio_eem)]
|
||||
use libboard_artiq::drtio_eem;
|
||||
#[cfg(has_grabber)]
|
||||
use libboard_artiq::grabber;
|
||||
#[cfg(feature = "target_kasli_soc")]
|
||||
use libboard_artiq::io_expander;
|
||||
use libboard_artiq::{identifier_read, logger, pl};
|
||||
|
@ -61,10 +58,16 @@ async fn io_expanders_service(
|
|||
}
|
||||
|
||||
#[cfg(has_grabber)]
|
||||
async fn grabber_thread(mut timer: GlobalTimer) {
|
||||
loop {
|
||||
grabber::tick();
|
||||
timer.delay_ms(200);
|
||||
mod grabber {
|
||||
use libboard_artiq::grabber;
|
||||
use libboard_zynq::time::Milliseconds;
|
||||
use libasync::{delay};
|
||||
pub async fn grabber_thread(mut timer: GlobalTimer) {
|
||||
let mut countdown = timer.countdown();
|
||||
loop {
|
||||
grabber::tick();
|
||||
delay(&mut countdown, Milliseconds(200)).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,7 +129,7 @@ pub fn main_core0() {
|
|||
drtio_eem::init(&mut timer, &cfg);
|
||||
|
||||
#[cfg(has_grabber)]
|
||||
task::spawn(grabber_thread(timer));
|
||||
task::spawn(grabber::grabber_thread(timer));
|
||||
|
||||
task::spawn(ksupport::report_async_rtio_errors());
|
||||
|
||||
|
|
Loading…
Reference in New Issue