From 2124530dc0a9fa480e1355f5cb0cc3ec05e87a27 Mon Sep 17 00:00:00 2001 From: Jorge Marques Date: Wed, 16 Oct 2024 15:36:07 -0300 Subject: [PATCH] dmac_api/trans: Support autorun,framelock AUTORUN mode is meant to be executed without a processing system, so the whole execution should occur without writing any register, only by parametrizing, at dmac_api, skip any writes during the probe. Add framelock methods to support the framelock feature. Signed-off-by: Jorge Marques --- library/drivers/dmac/dma_trans.sv | 77 +++++++++++- library/drivers/dmac/dmac_api.sv | 100 ++++++++++------ library/regmaps/adi_regmap_dmac_pkg.sv | 157 ++++++++++++++++++------- 3 files changed, 256 insertions(+), 78 deletions(-) diff --git a/library/drivers/dmac/dma_trans.sv b/library/drivers/dmac/dma_trans.sv index fcdc0fbb..ba12dcec 100644 --- a/library/drivers/dmac/dma_trans.sv +++ b/library/drivers/dmac/dma_trans.sv @@ -1,6 +1,6 @@ // *************************************************************************** // *************************************************************************** -// Copyright 2014 - 2018 (c) Analog Devices, Inc. All rights reserved. +// Copyright 2014 - 2018, 2024 (c) Analog Devices, Inc. All rights reserved. // // In this HDL repository, there are many different and unique modules, consisting // of various HDL (Verilog or VHDL) components. The individual modules are @@ -44,10 +44,15 @@ package dma_trans_pkg; int DMA_DATA_WIDTH_SRC; int DMA_DATA_WIDTH_DEST; int DMA_2D_TRANSFER; + int DMA_2D_TLAST_MODE; int DMA_TYPE_SRC; int DMA_TYPE_DEST; int DMA_LENGTH_ALIGN; int MAX_BYTES_PER_BURST; + int FRAMELOCK; + int MAX_NUM_FRAMES; + int USE_EXT_SYNC; + int HAS_AUTORUN; } axi_dmac_params_t; //========================================================================== @@ -284,7 +289,7 @@ package dma_trans_pkg; s.dst_addr = dst_addr + i*dst_stride; s.length = length; if (i != ylength-1) - s.last = 0; + s.last = (p.DMA_2D_TLAST_MODE == 1) & this.last; if (i > 0) s.first = 0; sa[i] = s; @@ -393,6 +398,74 @@ package dma_trans_pkg; endclass : dma_partial_2d_segment + //========================================================================== + /* + dma_flocked_2d_segment + */ + //========================================================================== + class dma_flocked_2d_segment extends dma_2d_segment; + + rand int unsigned flock_distance; + int flock_wait_writer = 1; + int flock_mode = 0; // 0 - dynamic. 1 - simple + rand int unsigned flock_framenum; + int unsigned flock_stride; + + // ----------------- + // + // ----------------- + function new(axi_dmac_params_t p); + super.new(p); + endfunction + + // ----------------- + // + // ----------------- + function copy(dma_flocked_2d_segment ds); + super.copy(ds); + ds.flock_framenum = flock_framenum; + ds.flock_distance = flock_distance; + ds.flock_stride = flock_stride; + ds.flock_mode = flock_mode; + ds.flock_wait_writer = flock_wait_writer; + endfunction + + constraint c_buf_num {flock_framenum < p.MAX_NUM_FRAMES;}; + constraint c_frm_dist {flock_distance < flock_framenum;}; + + virtual function void print(); + super.print(); + `INFO(("flock_framenum is %0d", flock_framenum)); + `INFO(("flock_distance is %0d", flock_distance)); + `INFO(("flock_stride is 0x%0h", flock_stride)); + endfunction + + + // ----------------- + // + // ----------------- + function void post_randomize(); + super.post_randomize(); + flock_stride = length * ylength; + cyclic = 1; + endfunction + + + // ----------------- + // + // ----------------- + function dma_flocked_2d_segment toSlaveSeg; + dma_flocked_2d_segment seg; + seg = new(this.p); + this.copy(seg); + seg.src_addr = seg.dst_addr; + seg.src_stride = seg.dst_stride; + + return seg; + endfunction + + endclass : dma_flocked_2d_segment + //========================================================================== /* dma_transfer diff --git a/library/drivers/dmac/dmac_api.sv b/library/drivers/dmac/dmac_api.sv index 613dd1b8..d4d172f4 100644 --- a/library/drivers/dmac/dmac_api.sv +++ b/library/drivers/dmac/dmac_api.sv @@ -1,6 +1,6 @@ // *************************************************************************** // *************************************************************************** -// Copyright 2014 - 2018 (c) Analog Devices, Inc. All rights reserved. +// Copyright 2014 - 2018, 2024 (c) Analog Devices, Inc. All rights reserved. // // In this HDL repository, there are many different and unique modules, consisting // of various HDL (Verilog or VHDL) components. The individual modules are @@ -59,34 +59,46 @@ package dmac_api_pkg; // ----------------- // // ----------------- - // Discover HW parameters - task discover_params(); + // Discover HW parameters + task discover_params(); bit [31:0] val; bit [3:0] bpb_dest_log2, bpb_src_log2, bpb_width_log2; - this.axi_read(GetAddrs(DMAC_PERIPHERAL_ID), val); + this.axi_read(GetAddrs(DMAC_PERIPHERAL_ID), val); p.ID = `GET_DMAC_PERIPHERAL_ID_PERIPHERAL_ID(val); - this.axi_read(GetAddrs(DMAC_INTERFACE_DESCRIPTION), val); - bpb_dest_log2 = `GET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_DEST_LOG2(val); + this.axi_read(GetAddrs(DMAC_INTERFACE_DESCRIPTION_1), val); + bpb_dest_log2 = `GET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_DEST_LOG2(val); p.DMA_DATA_WIDTH_DEST = (2**bpb_dest_log2)*8; - p.DMA_TYPE_DEST = `GET_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_DEST(val); - bpb_src_log2 = `GET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_SRC_LOG2(val); + p.DMA_TYPE_DEST = `GET_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_DEST(val); + bpb_src_log2 = `GET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_SRC_LOG2(val); p.DMA_DATA_WIDTH_SRC = (2**bpb_src_log2)*8; - p.DMA_TYPE_SRC = `GET_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_SRC(val); - bpb_width_log2 = `GET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BURST_WIDTH(val); + p.DMA_TYPE_SRC = `GET_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_SRC(val); + bpb_width_log2 = `GET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BURST_WIDTH(val); p.MAX_BYTES_PER_BURST = 2**bpb_width_log2; - this.axi_write(GetAddrs(DMAC_X_LENGTH), - `SET_DMAC_X_LENGTH_X_LENGTH(32'h0)); + p.DMA_2D_TLAST_MODE = `GET_DMAC_INTERFACE_DESCRIPTION_1_DMA_2D_TLAST_MODE(val); + p.MAX_NUM_FRAMES = `GET_DMAC_INTERFACE_DESCRIPTION_1_MAX_NUM_FRAMES(val); + p.USE_EXT_SYNC = `GET_DMAC_INTERFACE_DESCRIPTION_1_USE_EXT_SYNC(val); + p.HAS_AUTORUN = `GET_DMAC_INTERFACE_DESCRIPTION_1_HAS_AUTORUN(val); + if (!p.HAS_AUTORUN) begin + this.axi_write(GetAddrs(DMAC_X_LENGTH), + `SET_DMAC_X_LENGTH_X_LENGTH(32'h0)); + end this.axi_read(GetAddrs(DMAC_X_LENGTH), val); p.DMA_LENGTH_ALIGN = `GET_DMAC_X_LENGTH_X_LENGTH(val)+1; - this.axi_write(GetAddrs(DMAC_Y_LENGTH), - `SET_DMAC_Y_LENGTH_Y_LENGTH(32'hFFFFFFFF)); + if (!p.HAS_AUTORUN) begin + this.axi_write(GetAddrs(DMAC_Y_LENGTH), + `SET_DMAC_Y_LENGTH_Y_LENGTH(32'hFFFFFFFF)); + end this.axi_read(GetAddrs(DMAC_Y_LENGTH), val); if (val==0) begin p.DMA_2D_TRANSFER = 0; - end else begin + end else begin p.DMA_2D_TRANSFER = 1; - this.axi_write(GetAddrs(DMAC_Y_LENGTH), 32'h0); + if (!p.HAS_AUTORUN) begin + this.axi_write(GetAddrs(DMAC_Y_LENGTH), 32'h0); + end end + this.axi_read(GetAddrs(DMAC_FLAGS), val); + p.FRAMELOCK = `GET_DMAC_CONTROL_FRAMELOCK(val); endtask : discover_params // ----------------- @@ -117,7 +129,7 @@ package dmac_api_pkg; // ----------------- task enable_dma(); this.axi_write(GetAddrs(DMAC_CONTROL), - `SET_DMAC_CONTROL_ENABLE(1)); + `SET_DMAC_CONTROL_ENABLE(1)); endtask : enable_dma // ----------------- @@ -125,17 +137,28 @@ package dmac_api_pkg; // ----------------- task disable_dma(); this.axi_write(GetAddrs(DMAC_CONTROL), - `SET_DMAC_CONTROL_PAUSE(0)); + `SET_DMAC_CONTROL_PAUSE(0)); endtask : disable_dma // ----------------- // // ----------------- - task set_flags(input bit[2:0] flags); + task set_control(input bit[3:0] control); + this.axi_write(GetAddrs(DMAC_CONTROL), + `SET_DMAC_CONTROL_ENABLE(control[0]) | + `SET_DMAC_CONTROL_PAUSE(control[1]) | + `SET_DMAC_CONTROL_HWDESC(control[2]) | + `SET_DMAC_CONTROL_FRAMELOCK(control[3])); + endtask : set_control + + // ----------------- + // + // ----------------- + task set_flags(input bit[3:0] flags); this.axi_write(GetAddrs(DMAC_FLAGS), - `SET_DMAC_FLAGS_CYCLIC(flags[0])| - `SET_DMAC_FLAGS_TLAST(flags[1])| - `SET_DMAC_FLAGS_PARTIAL_REPORTING_EN(flags[2])); + `SET_DMAC_FLAGS_CYCLIC(flags[0]) | + `SET_DMAC_FLAGS_TLAST(flags[1]) | + `SET_DMAC_FLAGS_PARTIAL_REPORTING_EN(flags[2])); endtask : set_flags // ----------------- @@ -169,7 +192,7 @@ package dmac_api_pkg; // ----------------- task transfer_start; this.axi_write(GetAddrs(DMAC_TRANSFER_SUBMIT), - `SET_DMAC_TRANSFER_SUBMIT_TRANSFER_SUBMIT(1)); + `SET_DMAC_TRANSFER_SUBMIT_TRANSFER_SUBMIT(1)); `INFO(("Transfer start")); endtask : transfer_start @@ -178,7 +201,7 @@ package dmac_api_pkg; // ----------------- task set_dest_addr(input int xfer_addr); this.axi_write(GetAddrs(DMAC_DEST_ADDRESS), - `SET_DMAC_DEST_ADDRESS_DEST_ADDRESS(xfer_addr)); + `SET_DMAC_DEST_ADDRESS_DEST_ADDRESS(xfer_addr)); endtask : set_dest_addr // ----------------- @@ -186,7 +209,7 @@ package dmac_api_pkg; // ----------------- task set_src_addr(input int xfer_addr); this.axi_write(GetAddrs(DMAC_SRC_ADDRESS), - `SET_DMAC_SRC_ADDRESS_SRC_ADDRESS(xfer_addr)); + `SET_DMAC_SRC_ADDRESS_SRC_ADDRESS(xfer_addr)); endtask : set_src_addr // ----------------- @@ -196,9 +219,9 @@ package dmac_api_pkg; input int xfer_length_x, input int xfer_length_y); this.axi_write(GetAddrs(DMAC_X_LENGTH), - `SET_DMAC_X_LENGTH_X_LENGTH(xfer_length_x)); + `SET_DMAC_X_LENGTH_X_LENGTH(xfer_length_x)); this.axi_write(GetAddrs(DMAC_Y_LENGTH), - `SET_DMAC_Y_LENGTH_Y_LENGTH(xfer_length_y)); + `SET_DMAC_Y_LENGTH_Y_LENGTH(xfer_length_y)); endtask : set_lengths // ----------------- @@ -275,6 +298,7 @@ package dmac_api_pkg; output int next_transfer_id); dma_2d_segment t_2d; + dma_flocked_2d_segment t_fl_2d; wait_transfer_submission(); `INFO((" Submitting up a segment of : ")); @@ -286,14 +310,14 @@ package dmac_api_pkg; end if (p.DMA_TYPE_SRC == 0) begin this.axi_write(GetAddrs(DMAC_SRC_ADDRESS), - `SET_DMAC_SRC_ADDRESS_SRC_ADDRESS(t.src_addr)); + `SET_DMAC_SRC_ADDRESS_SRC_ADDRESS(t.src_addr)); end if (p.DMA_TYPE_DEST == 0) begin this.axi_write(GetAddrs(DMAC_DEST_ADDRESS), - `SET_DMAC_DEST_ADDRESS_DEST_ADDRESS(t.dst_addr)); + `SET_DMAC_DEST_ADDRESS_DEST_ADDRESS(t.dst_addr)); end this.axi_write(GetAddrs(DMAC_X_LENGTH), - `SET_DMAC_X_LENGTH_X_LENGTH(t.length-1)); + `SET_DMAC_X_LENGTH_X_LENGTH(t.length-1)); if (p.DMA_2D_TRANSFER == 1) begin if (!$cast(t_2d,t)) begin @@ -304,17 +328,27 @@ package dmac_api_pkg; t_2d.dst_stride = 0; end this.axi_write(GetAddrs(DMAC_Y_LENGTH), - `SET_DMAC_Y_LENGTH_Y_LENGTH(t_2d.ylength-1)); + `SET_DMAC_Y_LENGTH_Y_LENGTH(t_2d.ylength-1)); if (p.DMA_TYPE_SRC == 0) begin this.axi_write(GetAddrs(DMAC_SRC_STRIDE), - `SET_DMAC_SRC_STRIDE_SRC_STRIDE(t_2d.src_stride)); + `SET_DMAC_SRC_STRIDE_SRC_STRIDE(t_2d.src_stride)); end if (p.DMA_TYPE_DEST == 0) begin this.axi_write(GetAddrs(DMAC_DEST_STRIDE), - `SET_DMAC_DEST_STRIDE_DEST_STRIDE(t_2d.dst_stride)); + `SET_DMAC_DEST_STRIDE_DEST_STRIDE(t_2d.dst_stride)); end end + if ($cast(t_fl_2d,t)) begin + this.axi_write(GetAddrs(DMAC_FRAMELOCK_CONFIG), + `SET_DMAC_FRAMELOCK_CONFIG_FRAMENUM(t_fl_2d.flock_framenum) | + `SET_DMAC_FRAMELOCK_CONFIG_MODE(t_fl_2d.flock_mode) | + `SET_DMAC_FRAMELOCK_CONFIG_WAIT_WRITER(t_fl_2d.flock_wait_writer ) | + `SET_DMAC_FRAMELOCK_CONFIG_DISTANCE(t_fl_2d.flock_distance-1)); + this.axi_write(GetAddrs(DMAC_FRAMELOCK_STRIDE), + `SET_DMAC_FRAMELOCK_STRIDE_STRIDE(t_fl_2d.flock_stride)); + end + transfer_id_get(next_transfer_id); transfer_start(); diff --git a/library/regmaps/adi_regmap_dmac_pkg.sv b/library/regmaps/adi_regmap_dmac_pkg.sv index e173aa5e..137fbca9 100644 --- a/library/regmaps/adi_regmap_dmac_pkg.sv +++ b/library/regmaps/adi_regmap_dmac_pkg.sv @@ -33,7 +33,7 @@ // *************************************************************************** // *************************************************************************** /* Auto generated Register Map */ -/* Thu Mar 28 13:22:23 2024 */ +/* Thu May 9 16:11:55 2024 */ package adi_regmap_dmac_pkg; import adi_regmap_pkg::*; @@ -44,7 +44,7 @@ package adi_regmap_dmac_pkg; const reg_t DMAC_VERSION = '{ 'h0000, "VERSION" , '{ "VERSION_MAJOR": '{ 31, 16, RO, 'h04 }, "VERSION_MINOR": '{ 15, 8, RO, 'h05 }, - "VERSION_PATCH": '{ 7, 0, RO, 'h61 }}}; + "VERSION_PATCH": '{ 7, 0, RO, 'h64 }}}; `define SET_DMAC_VERSION_VERSION_MAJOR(x) SetField(DMAC_VERSION,"VERSION_MAJOR",x) `define GET_DMAC_VERSION_VERSION_MAJOR(x) GetField(DMAC_VERSION,"VERSION_MAJOR",x) `define DEFAULT_DMAC_VERSION_VERSION_MAJOR GetResetValue(DMAC_VERSION,"VERSION_MAJOR") @@ -79,32 +79,69 @@ package adi_regmap_dmac_pkg; `define DEFAULT_DMAC_IDENTIFICATION_IDENTIFICATION GetResetValue(DMAC_IDENTIFICATION,"IDENTIFICATION") `define UPDATE_DMAC_IDENTIFICATION_IDENTIFICATION(x,y) UpdateField(DMAC_IDENTIFICATION,"IDENTIFICATION",x,y) - const reg_t DMAC_INTERFACE_DESCRIPTION = '{ 'h0010, "INTERFACE_DESCRIPTION" , '{ - "BYTES_PER_BEAT_DEST_LOG2": '{ 3, 0, R, 0 }, - "DMA_TYPE_DEST": '{ 5, 4, R, 0 }, - "BYTES_PER_BEAT_SRC_LOG2": '{ 11, 8, R, 0 }, + const reg_t DMAC_INTERFACE_DESCRIPTION_1 = '{ 'h0010, "INTERFACE_DESCRIPTION_1" , '{ + "MAX_NUM_FRAMES": '{ 31, 27, R, 0 }, + "DMA_2D_TLAST_MODE": '{ 26, 26, R, 0 }, + "USE_EXT_SYNC": '{ 25, 25, R, 0 }, + "HAS_AUTORUN": '{ 24, 24, R, 0 }, + "BYTES_PER_BURST_WIDTH": '{ 19, 16, R, 0 }, "DMA_TYPE_SRC": '{ 13, 12, R, 0 }, - "BYTES_PER_BURST_WIDTH": '{ 19, 16, R, 0 }}}; - `define SET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_DEST_LOG2(x) SetField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BEAT_DEST_LOG2",x) - `define GET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_DEST_LOG2(x) GetField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BEAT_DEST_LOG2",x) - `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_DEST_LOG2 GetResetValue(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BEAT_DEST_LOG2") - `define UPDATE_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_DEST_LOG2(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BEAT_DEST_LOG2",x,y) - `define SET_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_DEST(x) SetField(DMAC_INTERFACE_DESCRIPTION,"DMA_TYPE_DEST",x) - `define GET_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_DEST(x) GetField(DMAC_INTERFACE_DESCRIPTION,"DMA_TYPE_DEST",x) - `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_DEST GetResetValue(DMAC_INTERFACE_DESCRIPTION,"DMA_TYPE_DEST") - `define UPDATE_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_DEST(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION,"DMA_TYPE_DEST",x,y) - `define SET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_SRC_LOG2(x) SetField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BEAT_SRC_LOG2",x) - `define GET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_SRC_LOG2(x) GetField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BEAT_SRC_LOG2",x) - `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_SRC_LOG2 GetResetValue(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BEAT_SRC_LOG2") - `define UPDATE_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BEAT_SRC_LOG2(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BEAT_SRC_LOG2",x,y) - `define SET_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_SRC(x) SetField(DMAC_INTERFACE_DESCRIPTION,"DMA_TYPE_SRC",x) - `define GET_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_SRC(x) GetField(DMAC_INTERFACE_DESCRIPTION,"DMA_TYPE_SRC",x) - `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_SRC GetResetValue(DMAC_INTERFACE_DESCRIPTION,"DMA_TYPE_SRC") - `define UPDATE_DMAC_INTERFACE_DESCRIPTION_DMA_TYPE_SRC(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION,"DMA_TYPE_SRC",x,y) - `define SET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BURST_WIDTH(x) SetField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BURST_WIDTH",x) - `define GET_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BURST_WIDTH(x) GetField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BURST_WIDTH",x) - `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BURST_WIDTH GetResetValue(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BURST_WIDTH") - `define UPDATE_DMAC_INTERFACE_DESCRIPTION_BYTES_PER_BURST_WIDTH(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION,"BYTES_PER_BURST_WIDTH",x,y) + "BYTES_PER_BEAT_SRC_LOG2": '{ 11, 8, R, 0 }, + "DMA_TYPE_DEST": '{ 5, 4, R, 0 }, + "BYTES_PER_BEAT_DEST_LOG2": '{ 3, 0, R, 0 }}}; + `define SET_DMAC_INTERFACE_DESCRIPTION_1_MAX_NUM_FRAMES(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"MAX_NUM_FRAMES",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_MAX_NUM_FRAMES(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"MAX_NUM_FRAMES",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_MAX_NUM_FRAMES GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"MAX_NUM_FRAMES") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_MAX_NUM_FRAMES(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"MAX_NUM_FRAMES",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_1_DMA_2D_TLAST_MODE(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_2D_TLAST_MODE",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_DMA_2D_TLAST_MODE(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_2D_TLAST_MODE",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_DMA_2D_TLAST_MODE GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"DMA_2D_TLAST_MODE") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_DMA_2D_TLAST_MODE(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_2D_TLAST_MODE",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_1_USE_EXT_SYNC(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"USE_EXT_SYNC",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_USE_EXT_SYNC(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"USE_EXT_SYNC",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_USE_EXT_SYNC GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"USE_EXT_SYNC") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_USE_EXT_SYNC(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"USE_EXT_SYNC",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_1_HAS_AUTORUN(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"HAS_AUTORUN",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_HAS_AUTORUN(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"HAS_AUTORUN",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_HAS_AUTORUN GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"HAS_AUTORUN") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_HAS_AUTORUN(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"HAS_AUTORUN",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BURST_WIDTH(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BURST_WIDTH",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BURST_WIDTH(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BURST_WIDTH",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BURST_WIDTH GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BURST_WIDTH") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BURST_WIDTH(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BURST_WIDTH",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_SRC(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_TYPE_SRC",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_SRC(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_TYPE_SRC",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_SRC GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"DMA_TYPE_SRC") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_SRC(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_TYPE_SRC",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_SRC_LOG2(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BEAT_SRC_LOG2",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_SRC_LOG2(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BEAT_SRC_LOG2",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_SRC_LOG2 GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BEAT_SRC_LOG2") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_SRC_LOG2(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BEAT_SRC_LOG2",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_DEST(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_TYPE_DEST",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_DEST(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_TYPE_DEST",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_DEST GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"DMA_TYPE_DEST") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_DMA_TYPE_DEST(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"DMA_TYPE_DEST",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_DEST_LOG2(x) SetField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BEAT_DEST_LOG2",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_DEST_LOG2(x) GetField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BEAT_DEST_LOG2",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_DEST_LOG2 GetResetValue(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BEAT_DEST_LOG2") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_1_BYTES_PER_BEAT_DEST_LOG2(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_1,"BYTES_PER_BEAT_DEST_LOG2",x,y) + + const reg_t DMAC_INTERFACE_DESCRIPTION_2 = '{ 'h0014, "INTERFACE_DESCRIPTION_2" , '{ + "CACHE_COHERENT": '{ 0, 0, R, 0 }, + "AXI_AXCACHE": '{ 7, 4, R, 0 }, + "AXI_AXPROT": '{ 10, 8, R, 0 }}}; + `define SET_DMAC_INTERFACE_DESCRIPTION_2_CACHE_COHERENT(x) SetField(DMAC_INTERFACE_DESCRIPTION_2,"CACHE_COHERENT",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_2_CACHE_COHERENT(x) GetField(DMAC_INTERFACE_DESCRIPTION_2,"CACHE_COHERENT",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_2_CACHE_COHERENT GetResetValue(DMAC_INTERFACE_DESCRIPTION_2,"CACHE_COHERENT") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_2_CACHE_COHERENT(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_2,"CACHE_COHERENT",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_2_AXI_AXCACHE(x) SetField(DMAC_INTERFACE_DESCRIPTION_2,"AXI_AXCACHE",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_2_AXI_AXCACHE(x) GetField(DMAC_INTERFACE_DESCRIPTION_2,"AXI_AXCACHE",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_2_AXI_AXCACHE GetResetValue(DMAC_INTERFACE_DESCRIPTION_2,"AXI_AXCACHE") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_2_AXI_AXCACHE(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_2,"AXI_AXCACHE",x,y) + `define SET_DMAC_INTERFACE_DESCRIPTION_2_AXI_AXPROT(x) SetField(DMAC_INTERFACE_DESCRIPTION_2,"AXI_AXPROT",x) + `define GET_DMAC_INTERFACE_DESCRIPTION_2_AXI_AXPROT(x) GetField(DMAC_INTERFACE_DESCRIPTION_2,"AXI_AXPROT",x) + `define DEFAULT_DMAC_INTERFACE_DESCRIPTION_2_AXI_AXPROT GetResetValue(DMAC_INTERFACE_DESCRIPTION_2,"AXI_AXPROT") + `define UPDATE_DMAC_INTERFACE_DESCRIPTION_2_AXI_AXPROT(x,y) UpdateField(DMAC_INTERFACE_DESCRIPTION_2,"AXI_AXPROT",x,y) const reg_t DMAC_IRQ_MASK = '{ 'h0080, "IRQ_MASK" , '{ "TRANSFER_COMPLETED": '{ 1, 1, RW, 'h1 }, @@ -143,9 +180,14 @@ package adi_regmap_dmac_pkg; `define UPDATE_DMAC_IRQ_SOURCE_TRANSFER_QUEUED(x,y) UpdateField(DMAC_IRQ_SOURCE,"TRANSFER_QUEUED",x,y) const reg_t DMAC_CONTROL = '{ 'h0400, "CONTROL" , '{ + "FRAMELOCK": '{ 3, 3, RW, 'h0 }, "HWDESC": '{ 2, 2, RW, 'h0 }, "PAUSE": '{ 1, 1, RW, 'h0 }, "ENABLE": '{ 0, 0, RW, 'h0 }}}; + `define SET_DMAC_CONTROL_FRAMELOCK(x) SetField(DMAC_CONTROL,"FRAMELOCK",x) + `define GET_DMAC_CONTROL_FRAMELOCK(x) GetField(DMAC_CONTROL,"FRAMELOCK",x) + `define DEFAULT_DMAC_CONTROL_FRAMELOCK GetResetValue(DMAC_CONTROL,"FRAMELOCK") + `define UPDATE_DMAC_CONTROL_FRAMELOCK(x,y) UpdateField(DMAC_CONTROL,"FRAMELOCK",x,y) `define SET_DMAC_CONTROL_HWDESC(x) SetField(DMAC_CONTROL,"HWDESC",x) `define GET_DMAC_CONTROL_HWDESC(x) GetField(DMAC_CONTROL,"HWDESC",x) `define DEFAULT_DMAC_CONTROL_HWDESC GetResetValue(DMAC_CONTROL,"HWDESC") @@ -174,31 +216,31 @@ package adi_regmap_dmac_pkg; `define UPDATE_DMAC_TRANSFER_SUBMIT_TRANSFER_SUBMIT(x,y) UpdateField(DMAC_TRANSFER_SUBMIT,"TRANSFER_SUBMIT",x,y) const reg_t DMAC_FLAGS = '{ 'h040c, "FLAGS" , '{ - "CYCLIC": '{ 0, 0, RW, 0 }, - "TLAST": '{ 1, 1, RW, 'h1 }, - "PARTIAL_REPORTING_EN": '{ 2, 2, RW, 'h0 }}}; - `define SET_DMAC_FLAGS_CYCLIC(x) SetField(DMAC_FLAGS,"CYCLIC",x) - `define GET_DMAC_FLAGS_CYCLIC(x) GetField(DMAC_FLAGS,"CYCLIC",x) - `define DEFAULT_DMAC_FLAGS_CYCLIC GetResetValue(DMAC_FLAGS,"CYCLIC") - `define UPDATE_DMAC_FLAGS_CYCLIC(x,y) UpdateField(DMAC_FLAGS,"CYCLIC",x,y) - `define SET_DMAC_FLAGS_TLAST(x) SetField(DMAC_FLAGS,"TLAST",x) - `define GET_DMAC_FLAGS_TLAST(x) GetField(DMAC_FLAGS,"TLAST",x) - `define DEFAULT_DMAC_FLAGS_TLAST GetResetValue(DMAC_FLAGS,"TLAST") - `define UPDATE_DMAC_FLAGS_TLAST(x,y) UpdateField(DMAC_FLAGS,"TLAST",x,y) + "PARTIAL_REPORTING_EN": '{ 2, 2, RW, 0 }, + "TLAST": '{ 1, 1, RW, 0 }, + "CYCLIC": '{ 0, 0, RW, 0 }}}; `define SET_DMAC_FLAGS_PARTIAL_REPORTING_EN(x) SetField(DMAC_FLAGS,"PARTIAL_REPORTING_EN",x) `define GET_DMAC_FLAGS_PARTIAL_REPORTING_EN(x) GetField(DMAC_FLAGS,"PARTIAL_REPORTING_EN",x) `define DEFAULT_DMAC_FLAGS_PARTIAL_REPORTING_EN GetResetValue(DMAC_FLAGS,"PARTIAL_REPORTING_EN") `define UPDATE_DMAC_FLAGS_PARTIAL_REPORTING_EN(x,y) UpdateField(DMAC_FLAGS,"PARTIAL_REPORTING_EN",x,y) + `define SET_DMAC_FLAGS_TLAST(x) SetField(DMAC_FLAGS,"TLAST",x) + `define GET_DMAC_FLAGS_TLAST(x) GetField(DMAC_FLAGS,"TLAST",x) + `define DEFAULT_DMAC_FLAGS_TLAST GetResetValue(DMAC_FLAGS,"TLAST") + `define UPDATE_DMAC_FLAGS_TLAST(x,y) UpdateField(DMAC_FLAGS,"TLAST",x,y) + `define SET_DMAC_FLAGS_CYCLIC(x) SetField(DMAC_FLAGS,"CYCLIC",x) + `define GET_DMAC_FLAGS_CYCLIC(x) GetField(DMAC_FLAGS,"CYCLIC",x) + `define DEFAULT_DMAC_FLAGS_CYCLIC GetResetValue(DMAC_FLAGS,"CYCLIC") + `define UPDATE_DMAC_FLAGS_CYCLIC(x,y) UpdateField(DMAC_FLAGS,"CYCLIC",x,y) const reg_t DMAC_DEST_ADDRESS = '{ 'h0410, "DEST_ADDRESS" , '{ - "DEST_ADDRESS": '{ 31, 0, RW, 'h00000000 }}}; + "DEST_ADDRESS": '{ 31, 0, RW, 0 }}}; `define SET_DMAC_DEST_ADDRESS_DEST_ADDRESS(x) SetField(DMAC_DEST_ADDRESS,"DEST_ADDRESS",x) `define GET_DMAC_DEST_ADDRESS_DEST_ADDRESS(x) GetField(DMAC_DEST_ADDRESS,"DEST_ADDRESS",x) `define DEFAULT_DMAC_DEST_ADDRESS_DEST_ADDRESS GetResetValue(DMAC_DEST_ADDRESS,"DEST_ADDRESS") `define UPDATE_DMAC_DEST_ADDRESS_DEST_ADDRESS(x,y) UpdateField(DMAC_DEST_ADDRESS,"DEST_ADDRESS",x,y) const reg_t DMAC_SRC_ADDRESS = '{ 'h0414, "SRC_ADDRESS" , '{ - "SRC_ADDRESS": '{ 31, 0, RW, 'h00000000 }}}; + "SRC_ADDRESS": '{ 31, 0, RW, 0 }}}; `define SET_DMAC_SRC_ADDRESS_SRC_ADDRESS(x) SetField(DMAC_SRC_ADDRESS,"SRC_ADDRESS",x) `define GET_DMAC_SRC_ADDRESS_SRC_ADDRESS(x) GetField(DMAC_SRC_ADDRESS,"SRC_ADDRESS",x) `define DEFAULT_DMAC_SRC_ADDRESS_SRC_ADDRESS GetResetValue(DMAC_SRC_ADDRESS,"SRC_ADDRESS") @@ -212,21 +254,21 @@ package adi_regmap_dmac_pkg; `define UPDATE_DMAC_X_LENGTH_X_LENGTH(x,y) UpdateField(DMAC_X_LENGTH,"X_LENGTH",x,y) const reg_t DMAC_Y_LENGTH = '{ 'h041c, "Y_LENGTH" , '{ - "Y_LENGTH": '{ 23, 0, RW, 'h000000 }}}; + "Y_LENGTH": '{ 23, 0, RW, 0 }}}; `define SET_DMAC_Y_LENGTH_Y_LENGTH(x) SetField(DMAC_Y_LENGTH,"Y_LENGTH",x) `define GET_DMAC_Y_LENGTH_Y_LENGTH(x) GetField(DMAC_Y_LENGTH,"Y_LENGTH",x) `define DEFAULT_DMAC_Y_LENGTH_Y_LENGTH GetResetValue(DMAC_Y_LENGTH,"Y_LENGTH") `define UPDATE_DMAC_Y_LENGTH_Y_LENGTH(x,y) UpdateField(DMAC_Y_LENGTH,"Y_LENGTH",x,y) const reg_t DMAC_DEST_STRIDE = '{ 'h0420, "DEST_STRIDE" , '{ - "DEST_STRIDE": '{ 23, 0, RW, 'h000000 }}}; + "DEST_STRIDE": '{ 23, 0, RW, 0 }}}; `define SET_DMAC_DEST_STRIDE_DEST_STRIDE(x) SetField(DMAC_DEST_STRIDE,"DEST_STRIDE",x) `define GET_DMAC_DEST_STRIDE_DEST_STRIDE(x) GetField(DMAC_DEST_STRIDE,"DEST_STRIDE",x) `define DEFAULT_DMAC_DEST_STRIDE_DEST_STRIDE GetResetValue(DMAC_DEST_STRIDE,"DEST_STRIDE") `define UPDATE_DMAC_DEST_STRIDE_DEST_STRIDE(x,y) UpdateField(DMAC_DEST_STRIDE,"DEST_STRIDE",x,y) const reg_t DMAC_SRC_STRIDE = '{ 'h0424, "SRC_STRIDE" , '{ - "SRC_STRIDE": '{ 23, 0, RW, 'h000000 }}}; + "SRC_STRIDE": '{ 23, 0, RW, 0 }}}; `define SET_DMAC_SRC_STRIDE_SRC_STRIDE(x) SetField(DMAC_SRC_STRIDE,"SRC_STRIDE",x) `define GET_DMAC_SRC_STRIDE_SRC_STRIDE(x) GetField(DMAC_SRC_STRIDE,"SRC_STRIDE",x) `define DEFAULT_DMAC_SRC_STRIDE_SRC_STRIDE GetResetValue(DMAC_SRC_STRIDE,"SRC_STRIDE") @@ -315,6 +357,35 @@ package adi_regmap_dmac_pkg; `define DEFAULT_DMAC_DESCRIPTOR_ID_DESCRIPTOR_ID GetResetValue(DMAC_DESCRIPTOR_ID,"DESCRIPTOR_ID") `define UPDATE_DMAC_DESCRIPTOR_ID_DESCRIPTOR_ID(x,y) UpdateField(DMAC_DESCRIPTOR_ID,"DESCRIPTOR_ID",x,y) + const reg_t DMAC_FRAMELOCK_CONFIG = '{ 'h0458, "FRAMELOCK_CONFIG" , '{ + "DISTANCE": '{ 23, 16, RW, 0 }, + "WAIT_WRITER": '{ 9, 9, RW, 0 }, + "MODE": '{ 8, 8, RW, 0 }, + "FRAMENUM": '{ 7, 0, RW, 0 }}}; + `define SET_DMAC_FRAMELOCK_CONFIG_DISTANCE(x) SetField(DMAC_FRAMELOCK_CONFIG,"DISTANCE",x) + `define GET_DMAC_FRAMELOCK_CONFIG_DISTANCE(x) GetField(DMAC_FRAMELOCK_CONFIG,"DISTANCE",x) + `define DEFAULT_DMAC_FRAMELOCK_CONFIG_DISTANCE GetResetValue(DMAC_FRAMELOCK_CONFIG,"DISTANCE") + `define UPDATE_DMAC_FRAMELOCK_CONFIG_DISTANCE(x,y) UpdateField(DMAC_FRAMELOCK_CONFIG,"DISTANCE",x,y) + `define SET_DMAC_FRAMELOCK_CONFIG_WAIT_WRITER(x) SetField(DMAC_FRAMELOCK_CONFIG,"WAIT_WRITER",x) + `define GET_DMAC_FRAMELOCK_CONFIG_WAIT_WRITER(x) GetField(DMAC_FRAMELOCK_CONFIG,"WAIT_WRITER",x) + `define DEFAULT_DMAC_FRAMELOCK_CONFIG_WAIT_WRITER GetResetValue(DMAC_FRAMELOCK_CONFIG,"WAIT_WRITER") + `define UPDATE_DMAC_FRAMELOCK_CONFIG_WAIT_WRITER(x,y) UpdateField(DMAC_FRAMELOCK_CONFIG,"WAIT_WRITER",x,y) + `define SET_DMAC_FRAMELOCK_CONFIG_MODE(x) SetField(DMAC_FRAMELOCK_CONFIG,"MODE",x) + `define GET_DMAC_FRAMELOCK_CONFIG_MODE(x) GetField(DMAC_FRAMELOCK_CONFIG,"MODE",x) + `define DEFAULT_DMAC_FRAMELOCK_CONFIG_MODE GetResetValue(DMAC_FRAMELOCK_CONFIG,"MODE") + `define UPDATE_DMAC_FRAMELOCK_CONFIG_MODE(x,y) UpdateField(DMAC_FRAMELOCK_CONFIG,"MODE",x,y) + `define SET_DMAC_FRAMELOCK_CONFIG_FRAMENUM(x) SetField(DMAC_FRAMELOCK_CONFIG,"FRAMENUM",x) + `define GET_DMAC_FRAMELOCK_CONFIG_FRAMENUM(x) GetField(DMAC_FRAMELOCK_CONFIG,"FRAMENUM",x) + `define DEFAULT_DMAC_FRAMELOCK_CONFIG_FRAMENUM GetResetValue(DMAC_FRAMELOCK_CONFIG,"FRAMENUM") + `define UPDATE_DMAC_FRAMELOCK_CONFIG_FRAMENUM(x,y) UpdateField(DMAC_FRAMELOCK_CONFIG,"FRAMENUM",x,y) + + const reg_t DMAC_FRAMELOCK_STRIDE = '{ 'h045c, "FRAMELOCK_STRIDE" , '{ + "STRIDE": '{ 31, 0, RW, 0 }}}; + `define SET_DMAC_FRAMELOCK_STRIDE_STRIDE(x) SetField(DMAC_FRAMELOCK_STRIDE,"STRIDE",x) + `define GET_DMAC_FRAMELOCK_STRIDE_STRIDE(x) GetField(DMAC_FRAMELOCK_STRIDE,"STRIDE",x) + `define DEFAULT_DMAC_FRAMELOCK_STRIDE_STRIDE GetResetValue(DMAC_FRAMELOCK_STRIDE,"STRIDE") + `define UPDATE_DMAC_FRAMELOCK_STRIDE_STRIDE(x,y) UpdateField(DMAC_FRAMELOCK_STRIDE,"STRIDE",x,y) + const reg_t DMAC_SG_ADDRESS = '{ 'h047c, "SG_ADDRESS" , '{ "SG_ADDRESS": '{ 31, 0, RW, 'h00000000 }}}; `define SET_DMAC_SG_ADDRESS_SG_ADDRESS(x) SetField(DMAC_SG_ADDRESS,"SG_ADDRESS",x)