From 19a14b68b15c73b20e97fc5ce7a53d16862422ae Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 10 Sep 2018 22:48:56 +0800 Subject: [PATCH] runtime: program DRTIO routing table into gateware --- artiq/firmware/runtime/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/artiq/firmware/runtime/main.rs b/artiq/firmware/runtime/main.rs index e5bed91df..b4a9454bb 100644 --- a/artiq/firmware/runtime/main.rs +++ b/artiq/firmware/runtime/main.rs @@ -33,6 +33,8 @@ use board_misoc::{csr, irq, ident, clock, boot, config}; use board_misoc::ethmac; #[cfg(has_drtio)] use board_artiq::drtioaux; +#[cfg(has_drtio_routing)] +use board_artiq::drtio_routing; use board_artiq::{mailbox, rpc_queue}; use proto_artiq::{mgmt_proto, moninj_proto, rpc_proto, session_proto, kernel_proto}; #[cfg(has_rtio_analyzer)] @@ -280,16 +282,24 @@ fn startup_ethernet() { .ip_addrs([IpCidr::new(protocol_addr, 0)]) .finalize(); + #[cfg(has_drtio_routing)] + let drtio_routing_table = drtio_routing::config_routing_table(csr::DRTIO.len()); + #[cfg(has_drtio_routing)] + drtio_routing::program_interconnect(&drtio_routing_table, 0); + let mut scheduler = sched::Scheduler::new(); let io = scheduler.io(); + #[cfg(has_rtio_core)] rtio_mgt::startup(&io); + io.spawn(4096, mgmt::thread); io.spawn(16384, session::thread); #[cfg(any(has_rtio_moninj, has_drtio))] io.spawn(4096, moninj::thread); #[cfg(has_rtio_analyzer)] io.spawn(4096, analyzer::thread); + #[cfg(has_grabber)] io.spawn(4096, grabber_thread);