Skip to content

Commit

Permalink
Baseline project created
Browse files Browse the repository at this point in the history
  • Loading branch information
BhupeshKharwa-AlifSemi committed Jun 14, 2024
0 parents commit 314277a
Show file tree
Hide file tree
Showing 238 changed files with 37,917 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
output
169 changes: 169 additions & 0 deletions AlifSemiconductor.Dave2DDriver.pdsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="1.7.7" xs:noNamespaceSchemaLocation="https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.7/schema/PACK.xsd">
<vendor>AlifSemiconductor</vendor>
<name>Dave2DDriver</name>
<description>Alif Semiconductor D/AVE2D driver CMSIS package</description>
<url>https://github.com/alifsemi/alif_dave2d_driver/raw/main/</url>
<supportContact>[email protected]</supportContact>
<!-- optional license file -->
<!--
<license>
</license>
-->

<releases>
<release version="1.0.0" date="2024-05-21">
Initial release. D2 version 3.18 from TES
</release>
</releases>

<keywords>
<!-- keywords for indexing -->
<keyword>Alif Semiconductor</keyword>
<keyword>D/AVE2D</keyword>
<keyword>Dave2d</keyword>
<keyword>D2</keyword>
<keyword>D1</keyword>
</keywords>

<requirements>
<packages>
<package name="CMSIS" vendor="ARM" version="5.9.0:5.9.0"/>
<package name="Ensemble" vendor="AlifSemiconductor" version="1.1.1:1.1.1"/>
</packages>
</requirements>

<!-- conditions section -->
<conditions>
<condition id="Ensemble">
<description>Alif Semiconductor Ensemble Series devices</description>
<require Dvendor="Alif Semiconductor:165"/>
<accept Dvendor="Alif Semiconductor:165" Dname="AE722F80*"/>
<accept Dvendor="Alif Semiconductor:165" Dname="AE512F80*"/>
<accept Dvendor="Alif Semiconductor:165" Dname="AE302F*"/>
<accept Dvendor="Alif Semiconductor:165" Dname="AE101F*"/>
<deny Cclass="Device" Cgroup="SDK Utilities"/>
</condition>
<condition id="Ensemble CMSIS_Driver">
<description>Requirement for CMSIS Driver</description>
<require condition="Ensemble"/>
<require Cclass="CMSIS" Cgroup="CORE"/>
<require Cclass="Device" Cgroup="Startup"/>
<require Cclass="Device" Cgroup="SOC Peripherals" Csub="PINCONF"/>
</condition>
<condition id="DAVE2D Layer 1 Driver">
<description>DAVE2D Layer 2 driver requires hardware dependent Layer 1</description>
<require Cclass="Graphics" Cgroup="DAVE2D" Csub="Layer1"/>
</condition>
</conditions>

<!-- components section -->
<components>
<component Cclass="Graphics" Cgroup="DAVE2D" Csub="Layer2" Cversion="3.18.0" condition="DAVE2D Layer 1 Driver">
<description>D/AVE2D generic software Layer 2 driver</description>
<files>
<!-- include folder / device header file -->
<file category="include" name="d2/inc/"/>
<!-- include headers -->
<file category="header" name="d2/inc/dave_driver.h"/>
<file category="header" name="d2/inc/dave_math.h"/>
<file category="header" name="d2/inc/dave_registermap.h"/>
<file category="header" name="d2/inc/dave_types.h"/>
<!-- source files and private headers -->
<file category="sourceC" name="d2/src/dave_64bitoperation.c"/>
<file category="sourceC" name="d2/src/dave_blit.c"/>
<file category="sourceC" name="d2/src/dave_box.c"/>
<file category="header" name="d2/src/dave_box.h"/>
<file category="sourceC" name="d2/src/dave_circle.c"/>
<file category="header" name="d2/src/dave_circle.h"/>
<file category="sourceC" name="d2/src/dave_context.c"/>
<file category="header" name="d2/src/dave_context.h"/>
<file category="sourceC" name="d2/src/dave_curve.c"/>
<file category="header" name="d2/src/dave_curve.h"/>
<file category="sourceC" name="d2/src/dave_dlist.c"/>
<file category="header" name="d2/src/dave_dlist.h"/>
<file category="sourceC" name="d2/src/dave_driver.c"/>
<file category="sourceC" name="d2/src/dave_edge.c"/>
<file category="header" name="d2/src/dave_edge.h"/>
<file category="sourceC" name="d2/src/dave_errorcodes.c"/>
<file category="sourceC" name="d2/src/dave_gradient.c"/>
<file category="header" name="d2/src/dave_gradient.h"/>
<file category="sourceC" name="d2/src/dave_hardware.c"/>
<file category="header" name="d2/src/dave_hardware.h"/>
<file category="header" name="d2/src/dave_intern.h"/>
<file category="sourceC" name="d2/src/dave_line.c"/>
<file category="header" name="d2/src/dave_line.h"/>
<file category="sourceC" name="d2/src/dave_math.c"/>
<file category="sourceC" name="d2/src/dave_memory.c"/>
<file category="header" name="d2/src/dave_memory.h"/>
<file category="sourceC" name="d2/src/dave_pattern.c"/>
<file category="header" name="d2/src/dave_pattern.h"/>
<file category="sourceC" name="d2/src/dave_perfcount.c"/>
<file category="sourceC" name="d2/src/dave_polyline.c"/>
<file category="header" name="d2/src/dave_polyline.h"/>
<file category="sourceC" name="d2/src/dave_quad.c"/>
<file category="header" name="d2/src/dave_quad.h"/>
<file category="sourceC" name="d2/src/dave_rbuffer.c"/>
<file category="header" name="d2/src/dave_rbuffer.h"/>
<file category="sourceC" name="d2/src/dave_render.c"/>
<file category="header" name="d2/src/dave_render.h"/>
<file category="sourceC" name="d2/src/dave_texture.c"/>
<file category="header" name="d2/src/dave_texture.h"/>
<file category="sourceC" name="d2/src/dave_triangle.c"/>
<file category="header" name="d2/src/dave_triangle.h"/>
<file category="header" name="d2/src/dave_triarray.h"/>
<file category="sourceC" name="d2/src/dave_utility.c"/>
<file category="header" name="d2/src/dave_utility.h"/>
<file category="sourceC" name="d2/src/dave_viewport.c"/>
<file category="header" name="d2/src/dave_viewport.h"/>
<file category="sourceC" name="d2/src/dave_wedge.c"/>
<file category="header" name="d2/src/dave_wedge.h"/>
<!-- documentation -->
<file category="doc" name="d2/doc/driver_l2/index.html"/>
<file category="doc" name="d2/doc/sw_interface/index.html"/>
<file category="doc" name="d2/doc/DAVE2D_driver_allocations.xls"/>
</files>
</component>

<component Cclass="Graphics" Cgroup="DAVE2D" Csub="Layer1" Cversion="1.0.0" condition="Ensemble CMSIS_Driver">
<description>D/AVE2D hardware dependent Layer 1 driver</description>
<files>
<!-- include folder / device header file -->
<file category="include" name="d1/inc/"/>
<!-- include headers -->
<file category="header" name="d1/inc/dave_base.h"/>
<file category="header" name="d1/inc/dave_irq.h"/>
<file category="header" name="d1/inc/dave_videomodes.h"/>
<!-- source files and private headers -->
<file category="header" name="d1/src/dave_base_intern.h"/>
<file category="sourceC" name="d1/src/dave_base.c"/>
<file category="sourceC" name="d1/src/dave_irq.c"/>
<file category="sourceC" name="d1/src/dave_memory.c"/>
<!-- config header -->
<file category="header" name="dave_cfg.h" attr="config" version="1.0.0"/>
<!-- documentation -->
<file category="doc" name="d1/doc/driver_l1/index.html"/>
</files>
</component>

<component Cclass="Graphics" Cgroup="DAVE2D" Csub="Layer0Lib" Cversion="3.18.0" condition="DAVE2D Layer 1 Driver">
<description></description>
<files>
<!-- include folder / device header file -->
<file category="include" name="d0/inc/"/>
<!-- include headers -->
<file category="header" name="d0/inc/dave_d0lib.h"/>
<file category="header" name="d0/inc/dave_d0_mm_dynamic.h"/>
<file category="header" name="d0/inc/dave_d0_mm_fixed_range_fixed_blkcnt.h"/>
<file category="header" name="d0/inc/dave_d0_mm_fixed_range.h"/>
<!-- source files -->
<file category="sourceC" name="d0/src/dave_d0lib.c"/>
<file category="sourceC" name="d0/src/dave_d0_mm_dynamic.c"/>
<file category="sourceC" name="d0/src/dave_d0_mm_fixed_range_fixed_blkcnt.c"/>
<file category="sourceC" name="d0/src/dave_d0_mm_fixed_range.c"/>
<!-- config header -->
<file category="header" name="dave_cfg.h" attr="config" version="1.0.0"/>
</files>
</component>
</components>
</package>
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# D/AVE2D DRIVER

This repository contains D/AVE2D driver for Alif Semiconductor devices

## Layer 2 Driver (D2)

Layer 2 driver is an abstracion layer which is completey hardware independent and is provided by TES.

Complete D2 documentation is available at `d2/doc/driver_l2/index.html` and `d2/doc/sw_interface/index.html`.

Resources allocated by Layer 2 driver are described in `d2/DAVE2D_driver_allocations.xls`

## Layer 1 Driver (D1)

Layer 1 implements hardware specific functions that Layer 2 relies on.

Complete D1 documentation is available at `d1/doc/driver_l1/index.html`.

## Layer 0 (D0)

Layer 0 provides a set of memory managers.

## Requirements

This CMSIS pack requires some packs to be installed and added to the project:
* [ARM::[email protected]](https://github.com/ARM-software/CMSIS_5/releases/tag/5.9.0)
* [AlifSemiconductor::[email protected]](https://github.com/alifsemi/alif_ensemble-cmsis-dfp/releases/tag/v1.1.1)

## How to create and install CMSIS-Pack

1. Make sure CMSIS Toolbox installed. Check `packchk` is available (add CMSIS Toolbox utils path to `PATH` if necessary).
2. Set `CMSIS_PACK_ROOT` environment variables to cmsis-packs installation directory.
3. Run `./gen_pack.sh` script
4. Install generated CMSIS pack by following command:
`cpackget add ./output/AlifSemiconductor.Dave2DDriver.1.0.0.pack`
21 changes: 21 additions & 0 deletions d0/inc/dave_d0_mm_dynamic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//--------------------------------------------------------------------------
// Project: D/AVE
// File: dave_d0_mm_dynamic.h (%version: 1 %)
//
// Description:
// dynamic memory managment functions for dave.
// %date_modified: Wed Jan 31 13:56:27 2007 % (%derived_by: hh74036 %)
//
// Changes:
// 2007-01-30 MGe start used old structure of d0_libs as base
//

#ifndef __DAVE_D0_MM_DYNAMIC_H_
#define __DAVE_D0_MM_DYNAMIC_H_

extern void * d0_dyn_allocmem( unsigned int size );
extern void d0_dyn_freemem( void *ptr );
extern unsigned int d0_dyn_memsize( void *ptr );

#endif

36 changes: 36 additions & 0 deletions d0/inc/dave_d0_mm_fixed_range.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//--------------------------------------------------------------------------
// Project: D/AVE
// File: dave_d0_mm_fixed_range.h (%version: 1 %)
//
// Description:
// Memory management in a fixed range of memory
// %date_modified: Wed Jan 31 13:56:41 2007 % (%derived_by: hh74036 %)
//
// Changes:
// 2006-11-21 MGe start
//

#ifndef __DAVE_D0_MM_FIXED_RANGE_H
#define __DAVE_D0_MM_FIXED_RANGE_H
#ifdef __cplusplus
extern "C" {
#endif

#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif

//---------------------------------------------------------------------------
extern void * d0_fixed_range_heapalloc(void *ctrlblk, unsigned int size);
extern unsigned int d0_fixed_range_heapfree(void *ctrlblk, void *ptr);
extern unsigned int d0_fixed_range_heapmsize(void *ctrlblk, void *ptr);
extern void d0_fixed_range_setheapmem( void *base, unsigned int size );
//---------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
#endif
50 changes: 50 additions & 0 deletions d0/inc/dave_d0_mm_fixed_range_fixed_blkcnt.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//--------------------------------------------------------------------------
// Project: D/AVE
// File: dave_d0_mm_fixed_range_fixed_blkcnt.h (%version: 1 %)
//
// Description:
// memory management with controlstructure in a separate addressspace
// %date_modified: Wed Jan 31 13:56:57 2007 % (%derived_by: hh74036 %)
//
// Changes:
// 2006-11-21 CSe start
// 2006-01-31 MGe redesign

#ifndef __DAVE_D0_MM_FIXED_RANGE_FIXED_BLK_H_
#define __DAVE_D0_MM_FIXED_RANGE_FIXED_BLK_H_
#ifdef __cplusplus
extern "C" {
#endif

#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif

typedef struct _d0_fixed_range_fixed_blk_memblock {
void* addr;
unsigned int size;
} d0_fixed_range_fixed_blk_memblock;

typedef struct _d0_fixed_range_fixed_blk_heap {
d0_fixed_range_fixed_blk_memblock *freeblocks;
d0_fixed_range_fixed_blk_memblock *usedblocks;
unsigned int maxidx; // size of both arrays -1
} d0_fixed_range_fixed_blkcnt_heap;


//---------------------------------------------------------------------------

extern void d0_fixed_range_fixed_blkcnt_heapinit( void* ctrlblk, void* heapaddr, unsigned int heapsize, unsigned int maxblocks);
extern void * d0_fixed_range_fixed_blkcnt_heapalloc(void* ctrlblk, unsigned int size);
extern unsigned int d0_fixed_range_fixed_blkcnt_heapfree(void* ctrlblk, void *ptr);
extern unsigned int d0_fixed_range_fixed_blkcnt_heapmsize(void* ctrlblk, void *ptr);

//---------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
#endif
Loading

0 comments on commit 314277a

Please sign in to comment.