From 840e198bbf73cf8d0b880f0e6600eb086e421987 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Fri, 6 Aug 2021 15:56:40 +0200
Subject: [PATCH] Added dp_bsn_sync_scheduler peripheral.

---
 libraries/base/dp/dp.peripheral.yaml | 43 ++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/libraries/base/dp/dp.peripheral.yaml b/libraries/base/dp/dp.peripheral.yaml
index d24c787541..a98b02e078 100644
--- a/libraries/base/dp/dp.peripheral.yaml
+++ b/libraries/base/dp/dp.peripheral.yaml
@@ -206,6 +206,49 @@ peripherals:
               access_mode: RW
 
               
+  - peripheral_name: dp_bsn_sync_scheduler    # pi_dp_bsn_sync_scheduler.py
+    peripheral_description: "Disable the output, or enable the output with a programmable sync interval."
+    mm_ports:
+      # MM port for mmp_dp_bsn_sync_scheduler.vhd
+      - mm_port_name: REG_DP_BSN_SYNC_SCHEDULER
+        mm_port_type: REG
+        mm_port_span: 16 * MM_BUS_SIZE
+        mm_port_description: ""
+        fields:
+          - - field_name: ctrl_enable
+              field_description: "Enable the output when 1, disable the output when 0. To first disable output to re-enable output."
+              address_offset: 0x0
+              mm_width: 1
+              access_mode: RW
+          - - field_name: ctrl_interval_size
+              field_description: "Number of samples in output sync interval"
+              address_offset: 0x4
+              access_mode: RW
+          - - field_name: ctrl_start_bsn
+              field_description: "Schedule start BSN for the output."
+              address_offset: 0x8
+              user_width: 64
+              radix: uint64
+              access_mode: RW
+          - - field_name: mon_current_input_bsn
+              field_description: "Current input BSN. This can be read to determine a start BSN in the future."
+              address_offset: 0x10
+              user_width: 64
+              radix: uint64
+              access_mode: RO
+          - - field_name: mon_output_enable
+              field_description: "1 when output is enabled, 0 when output is disabled."
+              address_offset: 0x18
+              mm_width: 1
+              access_mode: RO
+          - - field_name: mon_output_sync_bsn
+              field_description: "Output BSN at sync. This yields the number of blocks per output sync interval."
+              address_offset: 0x1C
+              user_width: 64
+              radix: uint64
+              access_mode: RO
+
+
   - peripheral_name: dp_bsn_monitor    # pi_dp_bsn_monitor.py
     peripheral_description: "Monitor the Block Sequence Number (BSN) status of streaming data."
     parameters:
-- 
GitLab