// -----------------------------------------------------------------------------
// This file is automatically generated by hdl-registers version 8.1.1-dev.
// Code generator CppInterfaceGenerator version 1.0.0.
// Generated 2026-07-22 21:43 from file regs_dma_axi_write_simple.toml at Git commit 0271e3b128e7.
// Register hash a600c44f72777903809768e11279acf79aae51d4.
// -----------------------------------------------------------------------------

#pragma once

#include <sstream>
#include <cstdint>
#include <cstdlib>

namespace fpga_regs
{

  namespace dma_axi_write_simple
  {

    // Attributes for the 'interrupt_status' register.
    namespace interrupt_status {
      // Attributes for the 'write_done' field.
      namespace write_done
      {
        // The number of bits that the field occupies.
        static const size_t width = 1;
        // The bit index of the lowest bit in the field.
        static const size_t shift = 0;
        // The bit mask of the field, at index zero.
        static const uint32_t mask_at_base = (1uLL << width) - 1;
        // The bit mask of the field, at the field's bit index.
        static const uint32_t mask_shifted = mask_at_base << shift;

        // Initial value of the field at device startup/reset.
        static const bool default_value = false;
        // Raw representation of the initial value, at the the field's bit index.
        static const uint32_t default_value_raw = 0 << shift;
      }

      // Attributes for the 'write_error' field.
      namespace write_error
      {
        // The number of bits that the field occupies.
        static const size_t width = 1;
        // The bit index of the lowest bit in the field.
        static const size_t shift = 1;
        // The bit mask of the field, at index zero.
        static const uint32_t mask_at_base = (1uLL << width) - 1;
        // The bit mask of the field, at the field's bit index.
        static const uint32_t mask_shifted = mask_at_base << shift;

        // Initial value of the field at device startup/reset.
        static const bool default_value = false;
        // Raw representation of the initial value, at the the field's bit index.
        static const uint32_t default_value_raw = 0 << shift;
      }

      // Attributes for the 'start_address_unaligned_error' field.
      namespace start_address_unaligned_error
      {
        // The number of bits that the field occupies.
        static const size_t width = 1;
        // The bit index of the lowest bit in the field.
        static const size_t shift = 2;
        // The bit mask of the field, at index zero.
        static const uint32_t mask_at_base = (1uLL << width) - 1;
        // The bit mask of the field, at the field's bit index.
        static const uint32_t mask_shifted = mask_at_base << shift;

        // Initial value of the field at device startup/reset.
        static const bool default_value = false;
        // Raw representation of the initial value, at the the field's bit index.
        static const uint32_t default_value_raw = 0 << shift;
      }

      // Attributes for the 'end_address_unaligned_error' field.
      namespace end_address_unaligned_error
      {
        // The number of bits that the field occupies.
        static const size_t width = 1;
        // The bit index of the lowest bit in the field.
        static const size_t shift = 3;
        // The bit mask of the field, at index zero.
        static const uint32_t mask_at_base = (1uLL << width) - 1;
        // The bit mask of the field, at the field's bit index.
        static const uint32_t mask_shifted = mask_at_base << shift;

        // Initial value of the field at device startup/reset.
        static const bool default_value = false;
        // Raw representation of the initial value, at the the field's bit index.
        static const uint32_t default_value_raw = 0 << shift;
      }

      // Attributes for the 'read_address_unaligned_error' field.
      namespace read_address_unaligned_error
      {
        // The number of bits that the field occupies.
        static const size_t width = 1;
        // The bit index of the lowest bit in the field.
        static const size_t shift = 4;
        // The bit mask of the field, at index zero.
        static const uint32_t mask_at_base = (1uLL << width) - 1;
        // The bit mask of the field, at the field's bit index.
        static const uint32_t mask_shifted = mask_at_base << shift;

        // Initial value of the field at device startup/reset.
        static const bool default_value = false;
        // Raw representation of the initial value, at the the field's bit index.
        static const uint32_t default_value_raw = 0 << shift;
      }

      // Struct that holds the value of each field in the register,
      // in a native C++ representation.
      struct Value {
        bool write_done;
        bool write_error;
        bool start_address_unaligned_error;
        bool end_address_unaligned_error;
        bool read_address_unaligned_error;
      };
      // Initial value of the register at device startup/reset.
      const Value default_value = {
        write_done::default_value,
        write_error::default_value,
        start_address_unaligned_error::default_value,
        end_address_unaligned_error::default_value,
        read_address_unaligned_error::default_value,
      };
    }

    // Attributes for the 'config' register.
    namespace config {
      // Attributes for the 'enable' field.
      namespace enable
      {
        // The number of bits that the field occupies.
        static const size_t width = 1;
        // The bit index of the lowest bit in the field.
        static const size_t shift = 0;
        // The bit mask of the field, at index zero.
        static const uint32_t mask_at_base = (1uLL << width) - 1;
        // The bit mask of the field, at the field's bit index.
        static const uint32_t mask_shifted = mask_at_base << shift;

        // Initial value of the field at device startup/reset.
        static const bool default_value = false;
        // Raw representation of the initial value, at the the field's bit index.
        static const uint32_t default_value_raw = 0 << shift;
      }

      // Struct that holds the value of each field in the register,
      // in a native C++ representation.
      struct Value {
        bool enable;
      };
      // Initial value of the register at device startup/reset.
      const Value default_value = {
        enable::default_value,
      };
    }

  } // namespace dma_axi_write_simple

  class IDmaAxiWriteSimple
  {
  public:
    // Number of registers within this register list.
    static const size_t num_registers = 7uL;

    virtual ~IDmaAxiWriteSimple() {}

    // -------------------------------------------------------------------------
    // Methods for the 'interrupt_status' register.
    // Mode 'Read, Write-pulse'.
    // -------------------------------------------------------------------------
    // Read the whole register value over the register bus.
    virtual dma_axi_write_simple::interrupt_status::Value get_interrupt_status() const = 0;

    // Read the whole register value over the register bus.
    // This method returns the raw register value without any type conversion.
    virtual uint32_t get_interrupt_status_raw() const = 0;

    // Read the register and slice out the 'write_done' field value.
    virtual bool get_interrupt_status_write_done() const = 0;

    // Read the register and slice out the 'write_error' field value.
    virtual bool get_interrupt_status_write_error() const = 0;

    // Read the register and slice out the 'start_address_unaligned_error' field value.
    virtual bool get_interrupt_status_start_address_unaligned_error() const = 0;

    // Read the register and slice out the 'end_address_unaligned_error' field value.
    virtual bool get_interrupt_status_end_address_unaligned_error() const = 0;

    // Read the register and slice out the 'read_address_unaligned_error' field value.
    virtual bool get_interrupt_status_read_address_unaligned_error() const = 0;

    // Write the whole register value over the register bus.
    virtual void set_interrupt_status(
      dma_axi_write_simple::interrupt_status::Value register_value
    ) const = 0;

    // Write the whole register value over the register bus.
    // This method takes a raw register value and does not perform any type conversion.
    virtual void set_interrupt_status_raw(
      uint32_t register_value
    ) const = 0;

    // Write the 'write_done' field value.
    // Will write the register with all other fields set as default.
    virtual void set_interrupt_status_write_done(
      bool field_value
    ) const = 0;

    // Write the 'write_error' field value.
    // Will write the register with all other fields set as default.
    virtual void set_interrupt_status_write_error(
      bool field_value
    ) const = 0;

    // Write the 'start_address_unaligned_error' field value.
    // Will write the register with all other fields set as default.
    virtual void set_interrupt_status_start_address_unaligned_error(
      bool field_value
    ) const = 0;

    // Write the 'end_address_unaligned_error' field value.
    // Will write the register with all other fields set as default.
    virtual void set_interrupt_status_end_address_unaligned_error(
      bool field_value
    ) const = 0;

    // Write the 'read_address_unaligned_error' field value.
    // Will write the register with all other fields set as default.
    virtual void set_interrupt_status_read_address_unaligned_error(
      bool field_value
    ) const = 0;
    // -------------------------------------------------------------------------

    // -------------------------------------------------------------------------
    // Methods for the 'interrupt_mask' register.
    // Mode 'Read, Write'.
    // -------------------------------------------------------------------------
    // Read the whole register value over the register bus.
    virtual uint32_t get_interrupt_mask() const = 0;

    // Write the whole register value over the register bus.
    virtual void set_interrupt_mask(
      uint32_t register_value
    ) const = 0;
    // -------------------------------------------------------------------------

    // -------------------------------------------------------------------------
    // Methods for the 'config' register.
    // Mode 'Read, Write'.
    // -------------------------------------------------------------------------
    // Read the whole register value over the register bus.
    virtual dma_axi_write_simple::config::Value get_config() const = 0;

    // Read the whole register value over the register bus.
    // This method returns the raw register value without any type conversion.
    virtual uint32_t get_config_raw() const = 0;

    // Read the register and slice out the 'enable' field value.
    virtual bool get_config_enable() const = 0;

    // Write the whole register value over the register bus.
    virtual void set_config(
      dma_axi_write_simple::config::Value register_value
    ) const = 0;

    // Write the whole register value over the register bus.
    // This method takes a raw register value and does not perform any type conversion.
    virtual void set_config_raw(
      uint32_t register_value
    ) const = 0;

    // Write the 'enable' field value.
    // Will write the register with all other fields set as default.
    virtual void set_config_enable(
      bool field_value
    ) const = 0;
    // -------------------------------------------------------------------------

    // -------------------------------------------------------------------------
    // Methods for the 'buffer_start_address' register.
    // Mode 'Write'.
    // -------------------------------------------------------------------------
    // Write the whole register value over the register bus.
    virtual void set_buffer_start_address(
      uint32_t register_value
    ) const = 0;
    // -------------------------------------------------------------------------

    // -------------------------------------------------------------------------
    // Methods for the 'buffer_end_address' register.
    // Mode 'Write'.
    // -------------------------------------------------------------------------
    // Write the whole register value over the register bus.
    virtual void set_buffer_end_address(
      uint32_t register_value
    ) const = 0;
    // -------------------------------------------------------------------------

    // -------------------------------------------------------------------------
    // Methods for the 'buffer_written_address' register.
    // Mode 'Read'.
    // -------------------------------------------------------------------------
    // Read the whole register value over the register bus.
    virtual uint32_t get_buffer_written_address() const = 0;
    // -------------------------------------------------------------------------

    // -------------------------------------------------------------------------
    // Methods for the 'buffer_read_address' register.
    // Mode 'Write'.
    // -------------------------------------------------------------------------
    // Write the whole register value over the register bus.
    virtual void set_buffer_read_address(
      uint32_t register_value
    ) const = 0;
    // -------------------------------------------------------------------------
  };

} // namespace fpga_regs
