Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### VisualStudioCode ###
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

## Logs ##
logs/

## Assets ##
assets/

# Objects #
*.so
*.o
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/bmorcos/pre-commit-hooks-cpp
rev: 9a5aa38207bf557961110d6a4f7e3a9d352911f9
hooks:
- id: clang-format
args: [--style=google]
- id: cpplint
args: [--filter=-build/include_order]
- id: cppcheck
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-merge-conflict
- repo: https://github.com/jorisroovers/gitlint
rev: v0.17.0
hooks:
- id: gitlint
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# cynq
PYNQ bindings for C and C++ to avoid requiring Python or Vitis to execute hardware acceleration.

# Dependencies
1. meson 1.2.3
2. Python 3.8.10
3. C++17
13 changes: 13 additions & 0 deletions examples/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* See LICENSE for more information about licensing
*
* Copyright 2023
* Author: Luis G. Leon-Vega <luis.leon@ieee.org>
* Diego Arturo Avila Torres <diego.avila@uned.cr>
*
*/
#include "cynq/cynq.hpp"

int main(){
return 0;
}
10 changes: 10 additions & 0 deletions examples/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# See LICENSE for more information about licensing
# Copyright 2023
#
# Author: Diego Arturo Avila Torres <diego.avila@uned.cr>
# Luis G. Leon Vega <luis.leon@ieee.org>
#
#

executable('example','main.cpp',include_directories: [projectinc])
13 changes: 13 additions & 0 deletions include/cynq/cynq.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* See LICENSE for more information about licensing
*
* Copyright 2023
* Author: Luis G. Leon-Vega <luis.leon@ieee.org>
* Diego Arturo Avila Torres <diego.avila@uned.cr>
*
*/
#pragma once

namespace cynq {

}
40 changes: 40 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# See LICENSE for more information about licensing
# Copyright 2023
#
# Author: Diego Arturo Avila Torres <dandida95@gmail.com>
# Luis G. Leon Vega <luis.leon@ieee.org>
#


project('cynq','cpp',version : '0.1.0',
default_options : ['warning_level=3',
'cpp_std=c++17',
'cpp_args=-Werror'])

add_global_arguments(
'-Wno-ignored-qualifiers',
language : 'cpp'
)

#############################
## Dependencies definition ##
#############################

# options

build_tests = get_option('build_tests')

# directories
projectinc = include_directories('.',
'include')

subdir('examples')

# Testing suite
if build_tests
gtest_proj = subproject('gtest')
gtest_dep = gtest_proj.get_variable('gtest_dep')
gmock_dep = gtest_proj.get_variable('gmock_dep')
subdir('tests')
endif
10 changes: 10 additions & 0 deletions meson.options
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# See LICENSE for more information about licensing
# Copyright 2023
#
# Author: Diego Arturo Avila Torres <dandida95@gmail.com>
# Luis G. Leon Vega <luis.leon@ieee.org>
#
#

option('build_tests', type: 'boolean', value: false)
10 changes: 10 additions & 0 deletions src/cynq.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* See LICENSE for more information about licensing
*
* Copyright 2023
* Author: Luis G. Leon-Vega <luis.leon@ieee.org>
* Diego Arturo Avila Torres <diego.avila@uned.cr>
*
*/

#include "cynq.hpp"
7 changes: 7 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# See LICENSE for more information about licensing
# Copyright 2023
#
# Author: Diego Arturo Avila Torres <dandida95@gmail.com>
# Luis G. Leon Vega <luis.leon@ieee.org>
#
2 changes: 2 additions & 0 deletions subprojects/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packagecache
googletest-release-*
16 changes: 16 additions & 0 deletions subprojects/gtest.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[wrap-file]
directory = googletest-1.14.0
source_url = https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
source_filename = gtest-1.14.0.tar.gz
source_hash = 8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7
patch_filename = gtest_1.14.0-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.14.0-1/get_patch
patch_hash = 2e693c7d3f9370a7aa6dac802bada0874d3198ad4cfdf75647b818f691182b50
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/gtest_1.14.0-1/gtest-1.14.0.tar.gz
wrapdb_version = 1.14.0-1

[provide]
gtest = gtest_dep
gtest_main = gtest_main_dep
gmock = gmock_dep
gmock_main = gmock_main_dep
9 changes: 9 additions & 0 deletions tests/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# See LICENSE for more information about licensing
#
# Copyright 2023
#
# Author: Diego Arturo Avila Torres <dandida95@gmail.com>
# Luis G. Leon Vega <luis.leon@ieee.org>
#
#