You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/02/10 21:18:06 UTC

[GitHub] [tvm] tmoreau89 commented on a change in pull request #10217: Adding support for Hexagon User DMA Engine

tmoreau89 commented on a change in pull request #10217:
URL: https://github.com/apache/tvm/pull/10217#discussion_r804114621



##########
File path: src/runtime/hexagon/hexagon/hexagon_user_dma_descriptors.h
##########
@@ -0,0 +1,310 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef TVM_RUNTIME_HEXAGON_HEXAGON_HEXAGON_USER_DMA_DESCRIPTORS_H_
+#define TVM_RUNTIME_HEXAGON_HEXAGON_HEXAGON_USER_DMA_DESCRIPTORS_H_
+
+namespace tvm {
+namespace runtime {
+namespace hexagon {
+
+// NOTE: Using 2D descriptor size even for 1D descriptors
+#define DMA_DESC_2D_SIZE 32
+
+// TODO(Straw): DMA Status [0][3:0]?
+
+// desc[0][31:4]
+// Descriptors addresses must be (minimum) 16 byte aligned
+// -> Lower 4 bits masked to clear DMA Status
+// -> But, descriptor address is not shifted
+#define DESC_NEXT_MASK 0xFFFFFFF0
+#define DESC_NEXT_SHIFT 0
+
+// desc[1][23:0]
+#define DESC_LENGTH_MASK 0x00FFFFFF
+#define DESC_LENGTH_SHIFT 0
+
+// desc[1][25:24]
+#define DESC_DESCTYPE_MASK 0x03000000
+#define DESC_DESCTYPE_SHIFT 24
+#define DESC_DESCTYPE_1D 0
+#define DESC_DESCTYPE_2D 1
+
+// TODO(Straw): Definition?  Not in the spec.

Review comment:
       Trying to understand what this TODO means, could you elaborate?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org