Commit 88c968b8 authored by Federico Vaga's avatar Federico Vaga

Merge branch 'release/v4.0.3'

parents 601fc705 ae88a195
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
GPATH
GRTAGS
GTAGS
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
---
variables:
KOJI_TARGET: 'ohwr7'
KOJI_DISTTAG: '.el7.cern'
DIST_PATH: distribution
BUILD_PATH: ${DIST_PATH}/build
stages:
- static-analysis
- build
- srpm
- tools
- kscratch
- kbuild
reuse:
stage: static-analysis
image: fsfe/reuse:latest
script:
- reuse lint
allow_failure: true
build:
stage: build
script:
- yum install -y kernel-devel lua
- git clone https://ohwr.org/project/wishbone-gen.git ~/git/wbgen2
- WBGEN2=~/git/wbgen2/wbgen2 LINUX=/usr/src/kernels/*/ make
artifacts:
paths:
- include/
- software/lib/
build_srpm:
stage: srpm
script:
- yum-builddep -y ${DIST_PATH}/*.spec
- LINUX=/usr/src/kernels/*/ make -C distribution srpm
artifacts:
paths:
- distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
expire_in: 1 day
.koji_deps_template: &koji_deps
before_script:
- yum install -y koji krb5-workstation rpm-build
- echo ${OHWR_PASSWORD} | kinit ${OHWR_USER}
kscratch:
<<: *koji_deps
stage: kscratch
script:
- koji --config=.koji build --wait --scratch ${KOJI_TARGET} distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
kbuild-ohwr:
<<: *koji_deps
stage: kbuild
only:
- /^v[0-9]+\.[0-9]+\.[0-9]+$/
except:
- branches
script:
- koji --config=.koji build --wait ${KOJI_TARGET} distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
trtl-project-creator:
stage: tools
script:
- yum install -y bison flex python python-jinja2
- $PWD/software/tools/trtl-project-creator/trtl-project-creator -d /tmp/ -s trtl_tst -l trtl_project_test
- TRTL=$PWD make -C /tmp/trtl_project_test/software lib
- TRTL=$PWD make -C /tmp/trtl_project_test/software tools
# TODO add firmware (need riscv32-gcc)
dependencies:
- build
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
[submodule "hdl/ip_cores/general-cores"]
path = hdl/ip_cores/general-cores
url = https://ohwr.org/project/general-cores.git
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
[koji]
server = https://kojihub.cern.ch/kojihub
weburl = https://koji.cern.ch/
topurl = https://koji.cern.ch/kojifiles
krb_canon_host = no
krb_rdns = False
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Mock Turtle
Upstream-Contact: Federico Vaga <federico.vaga@cern.ch>
Source: https://www.ohwr.org/project/mock-turtle
Files: doc/conf.py doc/*.rst doc/*.svg doc/*.cdr doc/*.txt doc/*.tex doc/*.eps
Copyright:2019 CERN (home.cern)
License: CC-BY-SA-4.0
Files: software/firmware/Makefile.kconfig software/firmware/scripts/* software/firmware/scripts/*.c software/firmware/scripts/*.h software/firmware/scripts/*.sh
Copyright: Linux
License: GPL-2.0
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
==========
Change Log
==========
[4.0.3] - 2019-10-18
====================
Changed
-------
- [sw] make file 'install' rules and environment variables to support RPMs
Added
-----
- [dist] proper .spec file to produce RPMs
- [ci] gitlab ci jobs
[4.0.2] - 2019-10-14
====================
Changed
......
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
GPL-2.0-or-later.txt
\ No newline at end of file
# Solderpad Hardware Licence Version 2.0
This licence (the “Licence”) operates as a wraparound licence to the
Apache License Version 2.0 (the “Apache License”) and grants to You
the rights, and imposes the obligations, set out in the Apache License
(which can be found here: http://apache.org/licenses/LICENSE-2.0),
with the following extensions. It must be read in conjunction with the
Apache License. Section 1 below modifies definitions in the Apache
License, and section 2 below replaces sections 2 of the Apache
License. You may, at your option, choose to treat any Work released
under this License as released under the Apache License (thus ignoring
all sections written below entirely). Words in italics indicate
changes rom the Apache License, but are indicative and not to be taken
into account in interpretation.
1. The definitions set out in the Apache License are modified as
follows:
Copyright
any reference to ‘copyright’ (whether capitalised or not)
includes ‘Rights’ (as defined below).
Contribution
also includes any design, as well as any work of
authorship.
Derivative Works
shall not include works that remain reversibly separable
from, or merely link (or bind by name) or physically
connect to or interoperate with the interfaces of the Work
and Derivative Works thereof.
Object form
shall mean any form resulting from mechanical transformation or
translation of a Source form or the application of a Source form to
physical material, including but not limited to compiled object code,
generated documentation, the instantiation of a hardware design or
physical object and conversions to other media types, including
intermediate forms such as bytecodes, FPGA bitstreams, moulds, artwork
and semiconductor topographies (mask works).
Rights
means copyright and any similar right including design right
(whether registered or unregistered), semiconductor topography (mask)
rights and database rights (but excluding Patents and Trademarks).
Source form
shall mean the preferred form for making modifications,
including but not limited to source code, net lists, board layouts,
CAD files, documentation source, and configuration files.
Work
also includes a design or work of authorship, whether in Source
form or other Object form.
2. Grant of Licence
2.1 Subject to the terms and conditions of this License, each
Contributor hereby grants to You a perpetual, worldwide,
non-exclusive, no-charge, royalty-free, irrevocable license under the
Rights to reproduce, prepare Derivative Works of, make, adapt, repair,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form and do
anything in relation to the Work as if the Rights did not exist.
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
PREFIX ?= /
all:
$(MAKE) -C software
%:
$(MAKE) -C software $@
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
===========
Mock Turtle
===========
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.o
*.bin
*.elf
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := hello_world
DIRS += hello_world_framework
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS += firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := fw-01
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "alarm_clock demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = fw-ac.o
OBJS += # add other object files that you need
OUTPUT = fw-ac
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# alarm_clock demo configuration
......
/*
* Copyright (c) 2016-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
* License: GPLv3
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <mockturtle-framework.h>
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS += firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := fw-01
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "data_generator demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = fw-dg.o
OBJS += # add other object files that you need
OUTPUT = fw-dg
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# data_generator demo configuration
......
/*
* Copyright (c) 2016-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
* License: GPLv3
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <mockturtle-framework.h>
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
# Change Log
## [0.0.0] - 2018-06-06
This start the project fmc-spec-carrier from the Mock Turtle template.
It includes basic files for hdl and software development
This is the README file for the fmc-spec-carrier project.
GIT_VERSION = $(shell cd $(src); git describe --dirty --long --tags)
all: doxygen
doxygen:
GIT_VERSION=$(GIT_VERSION) EXCLUDE_FILES=$(EXCLUDE_FILES) BRIEF=$(BRIEF) \
doxygen ./doxygen-spec-config
.PHONY: all doxygen
PROJECT_NAME = "${name}"
PROJECT_NUMBER = $(GIT_VERSION)
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = doxygen-${short_name}
CREATE_SUBDIRS = YES
TAB_SIZE = 8
OPTIMIZE_OUTPUT_FOR_C = YES
EXTRACT_STATIC = YES
CASE_SENSE_NAMES = YES
WARN_NO_PARAMDOC = YES
INPUT = ../lib
RECURSIVE = YES
EXCLUDE =
GENERATE_HTML = YES
GENERATE_LATEX = YES
\ No newline at end of file
-include Makefile.specific
# If needed add here images conversion
\ No newline at end of file
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
APPLICATION_ID = 0xd330d331
RT_APPLICATION_ID_CPU1 = 0x3456789A
RT_APPLICATION_ID_CPU2 = 0xA9876543
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.so
*.a
*.mod.c
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := lib
DIRS += tools
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := fw-01 fw-02
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "fmc-svec-carrier fw-01 demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
include $(src)/../../../project.mk
OBJS = fw-spec.o
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# fmc-svec-carrier fw-01 demo configuration
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "fmc-svec-carrier fw-02 demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
include $(src)../../../project.mk
OBJS = fw-spec.o
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# fmc-svec-carrier fw-02 demo configuration
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
/*
* Copyright (c) 2015-2019 CERN (home.cern)
* SPDX-License-Identifier: LGPL-3.0-or-later
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mockturtle-spec
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
......
# Change Log
## [0.0.0] - 2018-03-16
This start the project fmc-svec-carrier from the Mock Turtle template.
It includes basic files for hdl and software development
\ No newline at end of file
This is the README file for the fmc-svec-carrier project.
\ No newline at end of file
GIT_VERSION = $(shell cd $(src); git describe --dirty --long --tags)
all: doxygen
doxygen:
GIT_VERSION=$(GIT_VERSION) EXCLUDE_FILES=$(EXCLUDE_FILES) BRIEF=$(BRIEF) \
doxygen ./doxygen-${short_name}-config
.PHONY: all doxygen
\ No newline at end of file
PROJECT_NAME = "${name}"
PROJECT_NUMBER = $(GIT_VERSION)
PROJECT_BRIEF =
PROJECT_LOGO =
OUTPUT_DIRECTORY = doxygen-${short_name}
CREATE_SUBDIRS = YES
TAB_SIZE = 8
OPTIMIZE_OUTPUT_FOR_C = YES
EXTRACT_STATIC = YES
CASE_SENSE_NAMES = YES
WARN_NO_PARAMDOC = YES
INPUT = ../lib
RECURSIVE = YES
EXCLUDE =
GENERATE_HTML = YES
GENERATE_LATEX = YES
\ No newline at end of file
-include Makefile.specific
# If needed add here images conversion
\ No newline at end of file
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
APPLICATION_ID = 0xd330d330
RT_APPLICATION_ID_CPU1 = 0x23456789
RT_APPLICATION_ID_CPU2 = 0x98765432
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.so
*.a
*.mod.c
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := lib
DIRS += tools
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := fw-01 fw-02
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "fmc-svec-carrier fw-01 demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
include $(src)/../../../project.mk
OBJS = fw-svec.o
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# fmc-svec-carrier fw-01 demo configuration
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "fmc-svec-carrier fw-02 demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
include $(src)/../../../project.mk
OBJS = fw-svec.o
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# fmc-svec-carrier fw-02 demo configuration
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mockturtle-svec
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS += firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := fw-01
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "hello_world demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = fw-hello.o
OBJS += # add other object files that you need
OUTPUT = fw-hello
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# hello_world demo configuration
......
/*
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
int main()
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS += firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := fw-01
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "hello_world_framework demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = fw-hellofrm.o
OBJS += # add other object files that you need
OUTPUT = fw-hellofrm
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# hello_world_framework demo configuration
......
/*
* Copyright (C)
* Author:
* License:
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-framework.h>
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
build
sources
TOP_DIR ?= ..
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TOP_DIR ?= $(shell pwd)/../
NAME := mockturtle
VERSION := $(shell git describe --abbrev=0 | tr -d 'v')
DIR_NAME := $(NAME)-$(VERSION)
KEEP_TEMP ?= n
BUILD ?= $(abspath build)
SOURCES ?= $(abspath sources)
PKG_SOURCES := $(SOURCES)/$(DIR_NAME)
TRTL ?= $(TOP_DIR)
TRTL_SW := $(TRTL)/software
DRIVER_NAME := mockturtle
VERSION := $(shell git describe --abbrev=0)
DIR_NAME := $(DRIVER_NAME)-$(VERSION)
KEEP_TEMP ?= n
BUILD ?= $(abspath build)
BUILD_DKMS := $(BUILD)/dkms
BUILD_DKMSSOURCE := $(BUILD_DKMS)/source
BUILD_DKMSTREE := $(BUILD_DKMS)/tree
RPM_SPEC := $(shell mktemp /tmp/$(NAME)-$(VERSION)-XXXXXX.spec)
SRC := $(TOP_DIR)/Makefile
SRC += $(TOP_DIR)/Makefile
DKMS_OPT := --dkmstree $(BUILD_DKMSTREE) -m $(DRIVER_NAME)/$(VERSION)
all: kernel userspace
kernel: dkms-tar dkms-rpm
GIT ?= git
userspace: userspace-rpm
clean:
@rm -rf $(BUILD)
A ?= $(shell which $(GIT))
ifeq (,$(shell which $(GIT)))
$(error "Missing git")
endif
all: srpm
wbgen2-headers:
$(MAKE) -C ../software/include/mockturtle/hw/
......@@ -93,3 +102,37 @@ devel-rpm: userspace-tar
rpmbuild -vv $(RPMBUILD_DEFINE) --define "debug_package %{nil}" -bb $(BUILD)/SPECS/mockturtle-devel.spec
.PHONY: dkmstree dkms-add kernel-dkms-tar userspace-dir userspace-spec userspace-tar userspace-rpm tools-rpm lib-static-rpm lib-rpm
sources-tar:
mkdir -p $(SOURCES)
cd $(TRTL) && $(GIT) archive --format=tar.gz -o $(SOURCES)/$(DIR_NAME).tar.gz --prefix=$(DIR_NAME)/ HEAD
sources: sources-tar
@tar -C $(SOURCES) -xvf $(SOURCES)/$(DIR_NAME).tar.gz $(DIR_NAME)/CHANGELOG.rst
@mv $(SOURCES)/$(DIR_NAME)/CHANGELOG.rst $(SOURCES)/CHANGELOG
srpm-changelog: sources
$(eval $@_pattern := ^\[([0-9]+\.[0-9]+\.[0-9]+)\]\s-\s([0-9]{4}-[0-9]{2}-[0-9]{2})$)
$(eval $@_replace := echo -e "\n"\\* `date --date="\2" "+%a %b %d %Y"` "\1")
@sed -r -i -e "/^[.]{2}/d" -e "/^\s{2}.*$$/d" $(SOURCES)/CHANGELOG
@sed -r -i -e "/Change Log/d" -e "/^(=|-|\s)*$$/d" $(SOURCES)/CHANGELOG
@sed -r -i -e 's,$($@_pattern),$($@_replace),e' $(SOURCES)/CHANGELOG
rpm-spec: mockturtle.spec
# The fmc.spec file is good when we can define variables. With tools like
# koji it is not possible, so we need to create a .spec file without using
# package-specific variables.
@cp $< $(RPM_SPEC)
@sed -i -e "s/%{?_build_version}/$(VERSION)/" $(RPM_SPEC)
srpm: sources rpm-spec srpm-changelog
@rpmbuild -bs --define "_topdir $(BUILD)" \
--define '_sourcedir $(SOURCES)' \
--define "_build_version $(VERSION)" \
$(RPM_SPEC)
ifeq ($(KEEP_TEMP), n)
@rm -f $(RPM_SPEC)
endif
clean:
@rm -rf $(BUILD) $(SOURCES) *.tar.gz $(RPM_SPEC)
%{?!gittag: %{error: You did not specify a version}}
%{?!arch: %{error: You did not specify an architecture}}
%global project_name mock-turtle
Summary: Mock Turtle development header files and tools
Name: mockturtle-devel
Version: %{gittag}
License: GPL-3.0-or-later
Release: 1%{?dist}
URL: https://ohwr.org/project/%{name}
BuildArch: %{arch}
BuildRequires: make, gcc
# Binary libraries are necessary to develop, just headers is not enough
Requires: mockturtle-lib, mockturtle-lib-static
Source0: https://ohwr.org/project/%{project_name}/-/archive/%{gittag}/%{project_name}-%{gittag}.tar.bz2
%description
This package contains the Mock Turtle development header files and tools
%prep
%autosetup -n %{project_name}-%{gittag}
%build
make -C software/include
make -C software/lib
%install
make -C software/include INCLUDEDESTDIR=%{buildroot}/%{_includedir} install
make -C software/lib DESTLIBDIR=%{buildroot}/%{_libdir} install
# Static library is installed by another package
rm -f %{buildroot}/%{_libdir}/*.a
# Specific so version is installed by another package
rm -f %{buildroot}/%{_libdir}/*.so.*
%files
%license LICENSES/GPL-3.0-or-later.txt
%{_libdir}/libmockturtle.so
%{_includedir}/mockturtle/mockturtle.h
%{_includedir}/mockturtle/libmockturtle.h
%{_includedir}/mockturtle/hw/mockturtle_addresses.h
%{_includedir}/mockturtle/hw/mockturtle_cpu_csr.h
%{_includedir}/mockturtle/hw/mockturtle_cpu_lr.h
%{_includedir}/mockturtle/hw/mockturtle_endpoint.h
%{_includedir}/mockturtle/hw/mockturtle_queue.h
%changelog
* Mon May 06 2019 Federico Vaga <federico.vaga at cern.ch> - 4.0.0
- First public release
%{?!module_name: %{error: You did not specify a module name (%%module_name)}}
%{?!version: %{error: You did not specify a module version (%%version)}}
%{?!kernel_versions: %{error: You did not specify kernel versions (%%kernel_version)}}
%{?!packager: %define packager DKMS <dkms-devel@lists.us.dell.com>}
%{?!license: %define license Unknown}
%{?!_dkmsdir: %define _dkmsdir /var/lib/dkms}
%{?!_srcdir: %define _srcdir %_prefix/src}
%{?!_datarootdir: %define _datarootdir %{_datadir}}
Summary: %{module_name} %{version} dkms package
Name: %{module_name}-driver
Version: %{version}
License: %license
Release: 1dkms
BuildArch: noarch
Group: System/Kernel
Requires: dkms >= 1.95
BuildRequires: dkms
BuildRoot: %{_tmppath}/%{module_name}-%{version}-%{release}-root/
%description
Kernel modules for %{module_name} %{version} in a DKMS wrapper.
%prep
if [ "%mktarball_line" != "none" ]; then
/usr/sbin/dkms mktarball -m %module_name -v %version %mktarball_line --archive `basename %{module_name}-%{version}.dkms.tar.gz`
cp -af %{_dkmsdir}/%{module_name}/%{version}/tarball/`basename %{module_name}-%{version}.dkms.tar.gz` %{module_name}-%{version}.dkms.tar.gz
fi
%install
if [ "$RPM_BUILD_ROOT" != "/" ]; then
rm -rf $RPM_BUILD_ROOT
fi
mkdir -p $RPM_BUILD_ROOT/%{_srcdir}
mkdir -p $RPM_BUILD_ROOT/%{_datarootdir}/%{module_name}
if [ -d %{_sourcedir}/%{module_name}-%{version} ]; then
cp -Lpr %{_sourcedir}/%{module_name}-%{version} $RPM_BUILD_ROOT/%{_srcdir}
fi
if [ -f %{module_name}-%{version}.dkms.tar.gz ]; then
install -m 644 %{module_name}-%{version}.dkms.tar.gz $RPM_BUILD_ROOT/%{_datarootdir}/%{module_name}
fi
if [ -f %{_sourcedir}/common.postinst ]; then
install -m 755 %{_sourcedir}/common.postinst $RPM_BUILD_ROOT/%{_datarootdir}/%{module_name}/postinst
fi
%clean
if [ "$RPM_BUILD_ROOT" != "/" ]; then
rm -rf $RPM_BUILD_ROOT
fi
%post
for POSTINST in %{_prefix}/lib/dkms/common.postinst %{_datarootdir}/%{module_name}/postinst; do
if [ -f $POSTINST ]; then
$POSTINST %{module_name} %{version} %{_datarootdir}/%{module_name}
exit $?
fi
echo "WARNING: $POSTINST does not exist."
done
echo -e "ERROR: DKMS version is too old and %{module_name} was not"
echo -e "built with legacy DKMS support."
echo -e "You must either rebuild %{module_name} with legacy postinst"
echo -e "support or upgrade DKMS to a more current version."
exit 1
%preun
echo -e
echo -e "Uninstall of %{module_name} module (version %{version}) beginning:"
dkms remove -m %{module_name} -v %{version} --all --rpm_safe_upgrade
exit 0
%files
%defattr(-,root,root)
%{_srcdir}
%{_datarootdir}/%{module_name}/
%changelog
* %(date "+%a %b %d %Y") %packager %{version}-%{release}
- Automatic build by DKMS
%{?!gittag: %{error: You did not specify a version}}
%{?!arch: %{error: You did not specify an architecture}}
%global project_name mock-turtle
Summary: Static library to access Mock Turtle
Name: mockturtle-lib-static
Version: %{gittag}
License: GPL-3.0-or-later
Release: 1%{?dist}
URL: https://ohwr.org/project/%{name}
BuildArch: %{arch}
BuildRequires: make, gcc
Source0: https://ohwr.org/project/%{project_name}/-/archive/%{gittag}/%{project_name}-%{gittag}.tar.bz2
%description
This package the Mock Turtle static library to access Mock Turtle instances
on FPGA
%prep
%autosetup -n %{project_name}-%{gittag}
%build
make -C software/lib EXTRACFLAGS="$RPM_OPT_FLAGS"
%install
make -C software/lib DESTLIBDIR=%{buildroot}/%{_libdir}/ install
rm -f %{buildroot}/%{_libdir}/*.so*
%files
%license LICENSES/GPL-3.0-or-later.txt
%{_libdir}/libmockturtle.a
%changelog
* Mon May 06 2019 Federico Vaga <federico.vaga at cern.ch> - 4.0.0
- First public release
%{?!gittag: %{error: You did not specify a version}}
%{?!arch: %{error: You did not specify an architecture}}
%global project_name mock-turtle
Summary: Library to access Mock Turtle
Name: mockturtle-lib
Version: %{gittag}
License: GPL-3.0-or-later
Release: 1%{?dist}
URL: https://ohwr.org/project/%{name}
BuildArch: %{arch}
BuildRequires: make, gcc
Source0: https://ohwr.org/project/%{project_name}/-/archive/%{gittag}/%{project_name}-%{gittag}.tar.bz2
%description
This package the Mock Turtle library to access Mock Turtle instances on FPGA
%prep
%autosetup -n %{project_name}-%{gittag}
%build
make -C software/lib EXTRACFLAGS="$RPM_OPT_FLAGS"
%install
make -C software/lib DESTLIBDIR=%{buildroot}/%{_libdir}/ install
# Static library is installed by another package
rm -f %{buildroot}/%{_libdir}/*.a
# The basic link is used only for development
rm -f %{buildroot}/%{_libdir}/*.so
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%license LICENSES/GPL-3.0-or-later.txt
%{_libdir}/libmockturtle.so.4.0.0
%changelog
* Mon May 06 2019 Federico Vaga <federico.vaga at cern.ch> - 4.0.0
- First public release
%{?!gittag: %{error: You did not specify a version}}
%{?!arch: %{error: You did not specify an architecture}}
%global project_name mock-turtle
Summary: Tools for %{project_name}
Name: mockturtle-tools
Version: %{gittag}
License: GPL-3.0-or-later
Release: 1%{?dist}
URL: https://ohwr.org/project/%{name}
BuildArch: %{arch}
BuildRequires: make, gcc
Source0: https://ohwr.org/project/%{project_name}/-/archive/%{gittag}/%{project_name}-%{gittag}.tar.bz2
%description
This package contains a set of tools useful to manage a Mock Turtle
instance
%prep
%autosetup -n %{project_name}-%{gittag}
%build
make -C software/include/
make -C software/lib EXTRACFLAGS="$RPM_OPT_FLAGS"
make -C software/tools EXTRACFLAGS="$RPM_OPT_FLAGS"
%install
make -C software/tools BINDESTDIR=%{buildroot}/%{_bindir} install
%files
%license LICENSES/GPL-3.0-or-later.txt
%{_bindir}/lsmockturtle
%{_bindir}/mockturtle-buffer
%{_bindir}/mockturtle-count
%{_bindir}/mockturtle-cpu-restart
%{_bindir}/mockturtle-gdbserver
%{_bindir}/mockturtle-loader
%{_bindir}/mockturtle-messages
%{_bindir}/mockturtle-ping
%{_bindir}/mockturtle-smem
%{_bindir}/mockturtle-variable
%changelog
* Mon May 06 2019 Federico Vaga <federico.vaga at cern.ch> - 4.0.0
- First public release
# SPDX-License-Identifier: GPL-3.0-or-later
#
# SPDX-FileCopyrightText: 2019 CERN
Summary: Mock Turtle
Name: mockturtle
Version: %{?_build_version}
License: GPL-3.0-or-later
Release: 1%{?dist}
URL: https://www.ohwr.org/projects/mock-turtle/
BuildRequires: make, gcc, git
#BuildRequires: wbgen2
Requires: %{name}-lib
Requires: %{name}-tools
Requires: dkms-%{name}
Source0: %{name}-%{version}.tar.gz
Source1: CHANGELOG
%description
This package is a meta package that install the Mock Turtle distribution
%prep
%autosetup -n %{name}-%{version}
%build
make -C software/include
make -C software/lib
make -C software/tools
%install
make -C software/include PREFIX=%{buildroot}/ install
make -C software/lib PREFIX=%{buildroot}/ install
make -C software/tools PREFIX=%{buildroot}/ install
make -C software/kernel PREFIX=%{buildroot}/ dkms_install
%changelog
%include %{SOURCE1}
#
# tools
#
%package tools
Summary: Mock Turtle tools
#Requires:
%description tools
This package contains the Mock Turtle tools
%files tools
%license LICENSES/GPL-3.0-or-later.txt
/usr/local/bin/mockturtle-count
/usr/local/bin/lsmockturtle
/usr/local/bin/mockturtle-loader
/usr/local/bin/mockturtle-messages
/usr/local/bin/mockturtle-cpu-restart
/usr/local/bin/mockturtle-smem
/usr/local/bin/mockturtle-ping
/usr/local/bin/mockturtle-variable
/usr/local/bin/mockturtle-buffer
/usr/local/bin/mockturtle-gdbserver
#
# dkms
#
%package -n dkms-%{name}
Summary: Mock Turtle DKMS module
BuildRequires: dkms
Requires: dkms
%description -n dkms-%{name}
The dkms-mockturtle kernel module.
%post -n dkms-%{name}
dkms add -m %{name} -v %{version} --rpm_safe_upgrade
dkms build -m %{name} -v %{version} --rpm_safe_upgrade
dkms install -m %{name} -v %{version} --rpm_safe_upgrade
%preun -n dkms-%{name}
dkms remove -m %{name} -v %{version} --rpm_safe_upgrade --all ||:
%files -n dkms-%{name}
%license LICENSES/GPL-2.0.txt
/usr/src/%{name}-%{version}/
#
# lib
#
%package lib
Summary: Mock Turtle runtime library
%description lib
The mockturtle-libs package contains
%files lib
%license LICENSES/LGPL-3.0-or-later.txt
/usr/local/lib/libmockturtle.so.*
#
# libstatic
#
%package libstatic
Summary: Mock Turtle static library
%description libstatic
The mockturtle-libs package contains
%files libstatic
%license LICENSES/LGPL-3.0-or-later.txt
/usr/local/lib/libmockturtle.a
#
# devel
#
%package devel
Summary: Libraries and header files for Mock Turtle development
Group: Development/Libraries
Requires: %{name}-lib = %{version}-%{release}
%description devel
The mockturtle-devel package contains the header files and mockturtle library
necessary for developing programs using mockturtle.
%files devel
%license LICENSES/GPL-3.0-or-later.txt
%license LICENSES/LGPL-3.0-or-later.txt
%license LICENSES/BSD-3-Clause.txt
/usr/local/lib/libmockturtle.so
/usr/local/include/mockturtle/libmockturtle.h
/usr/local/include/mockturtle/mockturtle.h
/usr/local/include/mockturtle/hw/mockturtle_addresses.h
/usr/local/include/mockturtle/hw/mockturtle_cpu_csr.h
/usr/local/include/mockturtle/hw/mockturtle_cpu_lr.h
/usr/local/include/mockturtle/hw/mockturtle_endpoint.h
/usr/local/include/mockturtle/hw/mockturtle_queue.h
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
_*
doxygen-trtl-output/
registers/wbgen/
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# Minimal makefile for Sphinx documentation
#
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _arch:
===============================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
==========================
The *Alarm Clock* Demo
==========================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
==============================
The *Data Generator* Demo
==============================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`demo:spec`:
===================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`demo:svec`:
====================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
==========================
The *Hello World* Demo
==========================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`demo`:
============
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
PROJECT_NAME = "Mock Turtle"
PROJECT_NUMBER = $(GIT_VERSION)
PROJECT_BRIEF = "Mock Turtle"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
trtl-rt-library
trtl-rt-framework
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
GIT_VERSION = $(shell cd $(src); git describe --dirty --long --tags)
DOC ?= ..
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
PROJECT_NAME = "Mock Turtle Firmware Framework"
PROJECT_NUMBER = $(GIT_VERSION)
PROJECT_BRIEF = $(BRIEF)
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
PROJECT_NAME = "Mock Turtle Software"
PROJECT_NUMBER = $(GIT_VERSION)
PROJECT_BRIEF =
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
========
Glossary
========
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
===============
The HDL Core
===============
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. Mock Turtle documentation master file, created by
sphinx-quickstart on Wed Mar 7 15:12:58 2018.
You can adapt this file completely to your liking, but it should at least
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _introduction:description:
============
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. highlight:: none
===============
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
:orphan:
.. _wbgen_csr:
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
:orphan:
.. _wbgen_lr:
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. highlight:: c
.. _`sw:fw:frm`:
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. highlight:: c
.. _`sw:fw:lib`:
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`sw:fw`:
======================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`sw:lnx`:
====================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. highlight:: none
==============
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. highlight:: none
.. _`sw:lnx:drv`:
......@@ -95,6 +99,19 @@ device.
- notification IRQ: The Linux IRQ number to use for Mock Turtle cores
notifications.
Permissions
-----------
Mock Turtle does not uses any special group or user on the host system;
all driver's files are owned by ``root:root``. Mock Turtle applications may
want to change this and assign special users, groups and permission. We suggest
to do this using ``udev(7)`` rules. To filter out a special application in
udev rules you should use the sysfs attribute ``application_id``. For example
the following rule matches the Mock Turtle device with application ID
``0xbadc0ffe``::
SUBSYSTEM=="mockturtle", KERNEL=="trtl-[0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z][0-9a-zA-Z]", ATTR{application_id}="0xbadc0ffe"
Interfaces
==========
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. highlight:: none
.. _`sw:lnx:library`:
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`sw:lnx:python`:
===============================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`sw:common`:
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _tools:
=======================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _tools:lsmockturtle:
=================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`tools:mockturtle-buffer`:
Mock Turtle Buffer
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`tools:mockturtle-cpu-restart`:
=========================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. highlight:: none
.. _`tools:mockturtle-debug`:
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`tools:mockturtle-firmware-loader`:
===========================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _tools:mockturtle-gdbserver:
======================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`tools:mockturtle-messages`:
====================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _tools:mockturtle-ping:
================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`tools:mockturtle-project-creator`:
============================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _tools:mockturtle-smem:
=========================
......
..
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2019 CERN
.. _`tools:mockturtle-variable`:
====================
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.*#
.#*
\ No newline at end of file
.#*
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.h
*.tex
*.html
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*
!.gitignore
!Manifest.py
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*
!.gitignore
!Manifest.py
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*
!.gitignore
!Manifest.py
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
test_results.xml
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# This Makefile can be called by the Continuous Integration (CI) tool to execute all
# testbenches added for CI
#
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
work/
Makefile
modelsim.ini
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
work/
Makefile
modelsim.ini
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
work/
Makefile
modelsim.ini
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
work/
Makefile
modelsim.ini
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.o
parent_common.mk
common.mk
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
# include parent_common.mk for buildsystem's defines
# use absolute path for REPO_PARENT
......@@ -5,6 +9,8 @@ CURDIR:=$(shell /bin/pwd)
REPO_PARENT ?= $(CURDIR)/..
-include $(REPO_PARENT)/parent_common.mk
PREFIX ?= /
DIRS = kernel lib tools include
all clean modules install modules_install: $(DIRS)
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
.*.cmd
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
comment "Mock Turtle configuration"
config FPGA_APPLICATION_ID
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
src := $(M)/
-include $(src)/Makefile.specific
......
/**
* Copyright (c) 2015-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2015-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: LGPL-3.0-or-later
......
/**
* @defgroup framework Mock Turtle Firmware Framework
* @{
* @copyright: Copyright (c) 2015-2019 CERN (home.cern)
* @copyright: SPDX-FileCopyrightText: 2015-2019 CERN (home.cern)
* @author Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: LGPL-3.0-or-later
......
/*
* Copyright (c) 2013-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2013-2019 CERN (home.cern)
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* Author: Federico Vaga <federico.vaga@cern.ch>
*
......
/**
* SPDX-FileCopyrightText: 2013-2019 CERN (home.cern)
* @defgroup library Mock Turtle Firmware Library
* @{
* @copyright: Copyright (c) 2013-2019 CERN (home.cern)
* @author Federico Vaga <federico.vaga@cern.ch>
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
......
/*
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
* Author: Alessandro Rubini
*
* Basic printf based on vprintf based on vsprintf
*
* Alessandro Rubini for CERN, 2011 -- public domain
* (please note that the vsprintf is not public domain but GPL)
*/
......
/*
* vsprintf-xint: a possible free-software replacement for mprintf
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
* Author: Alessandro Rubini
*
* vsprintf-xint: a possible free-software replacement for mprintf
*
* public domain
*/
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
hash
fixdep
docproc
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Generated files
#
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Generated files
#
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*/
.section .boot, "ax", @progbits
.global _start
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*/
.section .text
.global trap_entry
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
OUTPUT_FORMAT("elf32-littleriscv")
ENTRY(_start)
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*/
#ifndef __RISCV_H
#define __RISCV_H
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
SECTIONS
{
......
PREFIX ?= /usr/local/
INCLUDEDESTDIR ?= $(PREFIX)/include
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
PREFIX ?= /
INCLUDEDESTDIR ?= $(PREFIX)/usr/local/include
all:
$(MAKE) -C mockturtle/hw
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mockturtle_cpu_csr.h
mockturtle_cpu_lr.h
\ No newline at end of file
mockturtle_cpu_lr.h
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
HEADERS := mockturtle_cpu_csr.h
HEADERS += mockturtle_cpu_lr.h
......
/*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#ifndef __TRTL_ADDRESSES_H
#define __TRTL_ADDRESSES_H
......
/*
* Copyright (c) 2018-2019 CERN (home.cern)
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* SPDX-License-Identifier: LGPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*/
......
/*
* This work is part of the Mock Turtle project.
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Copyright (c) 2013-2019 CERN (home.cern)
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* Released according to the GNU GPL, version 2 or any later version.
*/
/*.
* Mock Turtle
*
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
* inspired by a draft of Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* SPDX-License-Identifier: LGPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#ifndef __LIB_TRTL_H__
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.cmd
*.ko
*.mod.c
modules.order
Module.symvers
.tmp_versions
\ No newline at end of file
.tmp_versions
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TOP_DIR ?= $(shell pwd)/../../
TRTL ?= $(TOP_DIR)
TRTL_SW := $(TRTL)/software
PREFIX ?= /
KVERSION ?= $(shell uname -r)
LINUX ?= /lib/modules/$(KVERSION)/build
DKMS ?= 0
VERSION = $(shell cd $(src); git describe --always --dirty --long --tags)
GIT_VERSION = $(shell cd $(src); git describe --always --dirty --long --tags)
VERSION:= $(shell git describe --tags --abbrev=0 | tr -d 'v')
# For this CSM_VERSION, please see ohwr.org/csm documentation
ifdef CONFIG_CSM_VERSION
......@@ -10,7 +21,7 @@ else
ccflags-y += -DCERN_SUPER_MODULE=""
endif
ccflags-y += -DGIT_VERSION=\"$(VERSION)\"
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
ccflags-y += -I$(src)
ifeq ($(DKMS), 0)
ccflags-y += -I$(src)/../include
......@@ -36,11 +47,22 @@ all modules: hw_header
hw_header:
ifeq ($(DKMS), 0)
$(MAKE) -C ../include/mockturtle/hw/
$(MAKE) -C $(TRTL_SW)/include/mockturtle/hw/
endif
install modules_install:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) modules_install
install: modules_install
modules_install:
$(MAKE) -C $(LINUX) M=$(shell /bin/pwd) INSTALL_MOD_PATH=$(PREFIX) $@
dkms_install: hw_header
$(eval $@_dir := $(PREFIX)/usr/src/mockturtle-$(VERSION)/)
@mkdir -p $($@_dir)
@cp mockturtle-*.[ch] Makefile dkms.conf $(TRTL)/LICENSES/GPL-2.0.txt $($@_dir)
@cp -a $(TRTL_SW)/include/mockturtle $($@_dir)
@sed -r -i -e "s/^VERSION\s=\s.*/VERSION = $(VERSION)/" $($@_dir)/Makefile
@sed -r -i -e "s/^DKMS\s[?]=\s0/DKMS ?= 1/" $($@_dir)/Makefile
@sed -r -i -e "s/@PKGVER@/$(VERSION)/" $($@_dir)/dkms.conf
# be able to run the "clean" rule even if $(LINUX) is not valid
clean:
......
PACKAGE_NAME="@PKGNAME@"
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
PACKAGE_NAME="mockturtle"
PACKAGE_VERSION="@PKGVER@"
CLEAN="make clean"
MAKE[0]="make KVERSION=$kernelver all"
BUILT_MODULE_NAME[0]="@PKGNAME@"
BUILT_MODULE_NAME[0]="mockturtle"
DEST_MODULE_LOCATION[0]="/updates"
AUTOINSTALL="yes"
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <linux/version.h>
......
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-2.0-or-later
......@@ -39,7 +39,7 @@ static DEFINE_IDA(trtl_ida);
static int trtl_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
{
add_uevent_var(env, "DEVMODE=%#o", 0440);
add_uevent_var(env, "DEVMODE=%#o", 0660);
return 0;
}
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-2.0-or-later
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-2.0-or-later
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-2.0-or-later
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-2.0-or-later
......
/*
* Copyright (c) 2017-2019 CERN (home.cern)
* SPDX-FileCopyrightText: 2017-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-2.0-or-later
......
SUBSYSTEM=="tty", KERNEL=="ttyTRTL[0-9]*", KERNELS=="trtl-[a-f0-9]*-cpu-[0-9]*", NAME="mockturtle/%b-tty"
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.a
*.so*
.depend
\ No newline at end of file
.depend
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
......@@ -9,9 +13,10 @@ REPO_PARENT ?= ../..
GIT_VERSION := $(shell git describe --dirty --long --tags)
SO_VERSION_XYZ := $(shell git describe --abbrev=0 | grep -o -E "[0-9]+\.[0-9]+\.[0-9]")
SO_VERSION_X := $(shell echo $(SO_VERSION_XYZ) | cut -d "." -f 1)
PREFIX ?= /usr/local
DESTLIBDIR ?= $(PREFIX)/lib
PREFIX ?= /
DESTLIBDIR ?= $(PREFIX)/usr/local/lib
TRTL ?= ../..
TRTL_SW = $(TRTL)/software
......@@ -27,8 +32,7 @@ CFLAGS += -DVERSION="\"$(GIT_VERSION)\""
CFLAGS += $(EXTRACFLAGS)
ARFLAGS = rcv
modules all: $(LIB) $(LIBS)
all: $(LIB) $(LIBS_XYZ)
%: %.c $(LIB)
$(CC) $(CFLAGS) $*.c $(LDFLAGS) $(LDLIBS) -o $@
......@@ -39,9 +43,6 @@ $(LIB): $(LOBJ)
$(LIBS_XYZ): $(LIB)
$(CC) -shared -o $@ -Wl,--whole-archive,-soname,$@ $^ -Wl,--no-whole-archive
$(LIBS): $(LIBS_XYZ)
ln -sf $< $@
clean:
rm -f $(LIB) $(LIBS) $(LIBS_XYZ) .depend *.o *~
......@@ -52,7 +53,8 @@ install: $(LIB) $(LIBS_XYZ)
install -d $(DESTLIBDIR)
install -m 0644 $(LIB) $(DESTLIBDIR)
install -m 0755 $(LIBS_XYZ) $(DESTLIBDIR)
test -e $(DESTLIBDIR)/$(LIBS) || ln -s $(LIBS_XYZ) $(DESTLIBDIR)/$(LIBS)
ln -sf $(LIBS_XYZ) $(DESTLIBDIR)/$(LIBS).$(SO_VERSION_X)
ln -sf $(LIBS).$(SO_VERSION_X) $(DESTLIBDIR)/$(LIBS)
uninstall:
rm -f $(DESTLIBDIR)/$(LIB) $(DESTLIBDIR)/$(LIBS_XYZ)
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.pyc
MANIFEST
\ No newline at end of file
MANIFEST
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
all:
......
"""
@package docstring
@copyright: Copyright (c) 2016-2019 CERN (home.cern)
@author: Federico Vaga <federico.vaga@cern.ch>
SPDX-License-Identifier: LGPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN (home.cern)
"""
from ctypes import *
......
"""
@package docstring
@author: Federico Vaga <federico.vaga@cern.ch>
@copyright: Copyright (c) 2016-2019 CERN (home.cern)
@license: GNU Library General Public License version 2 or later
SPDX-License-Identifier: LGPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN (home.cern)
"""
from .PyMockTurtle import TrtlHmqHeader, TrtlMessage, TrtlConfig, \
......
#!/usr/bin/env python
"""
SPDX-License-Identifier: CC0-1.0
SPDX-FileCopyrightText: 2019 CERN
"""
from distutils.core import setup
setup(name='PyMockTurtle',
......@@ -11,5 +16,5 @@ setup(name='PyMockTurtle',
maintainer_email="federico.vaga@cern.ch",
url='http://www.ohwr.org/projects/mock-turtle',
packages=['PyMockTurtle'],
license='LGPLv2',
license='LGPL-3.0-or-later',
)
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: LGPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#ifndef __LIBTRTL_INTERNAL_H__
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: LGPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <errno.h>
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
* inspired by a draft of Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
* SPDX-License-Identifier: LGPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <sys/types.h>
......
Library Overview {#mainpage}
================
This is the **Mock Turtle** (*TRTL*) library documentation. Here you can find all
the information about the *Mock Turtle* API and the main
library behavior that you need to be aware of.
If you are reading this from the doxygen documentation, then you can find
the API documentation in the usual Doxygen places. Otherwise, you can get
the API documentation directly from the source code that you can find in
the *lib* directory.
In this document we are going to provides you some clues to understand how
to use the library API.
Initialization
==============
To be able to use this library the first thing to do is to initialize a library
instance using trtl_init(); form this point on you are able to use the
library API. Of course, when you finished to use the library you have to
remove this instance using trtl_exit().
At the beginning, all communication channels are close, so before start to
communicate with the Real Time application you have to open your communication
channel. Then, close it when you have done.
Core Management
===============
The main actions that you can take on a *core* are the following:
- **Program**. When you load the FPGA bitstream the core's memory is empty.
By programming the core memory you overwrite any previous application.
- **enable** and **disable**. When the core is disabled its reset line is
asserted so it is not operative.
- **start** and **stop**. It starts or stops the Real-Time application
execution, so when you stop the core it will stop to run the application.
As soon as you start the execution again, the core start to execute the
application from the previous point.
Host Message Queue
==================
The main communication channel between the Host and the Real Time applications
running on the FPGA cores is the **Host Message Queue**. The HMQ allow the
Host and the Real Time application to exchange messages. For the time being
there is not a well defined protocol for the messages sent over the HMQ but as
a convention we are using the first 8 bytes as an header containing a sequence
number and a message type identifier. Then the content is up to the application.
The library allow you to send and receive asynchronous messages or to send
synchronous message, which means that you always get an answer to the sent
messages.
For synchronous messages, the driver assume that the second payload word is the
sequence number. So, if you want to use synchronous messages you have to keep in
mind this constraint.
Shared Memory
=============
The **shared memory** is mainly used to synchronize the Real-Time applications
running on different cores, but it can be accessed as well from the host system.
Basically, you can read/write any shared memory location performing different
action. These actions are defined by trtl_smem_modifier enumeration.
Debug
=====
The **debug** interface is just a very simple serial channel from the cores to
the host system (From the host point of view the debug interface is read only).
It appears under the debugfs file-system, so you must mount the debugfs before
using the debug interface; otherwise you will only get error messages.
The only purpose of the debug interface is to send messages from a Real Time
application to the host system. It's not meant to be a perfect and high
performance communication channel, so it may happen that you loose messages in
some cases (e.g. high rate messages).
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
lsmockturtle
mockturtle-count
mockturtle-loader
......@@ -7,4 +11,4 @@ mockturtle-smem
mockturtle-ping
mockturtle-variable
mockturtle-buffer
mockturtle-gdbserver
\ No newline at end of file
mockturtle-gdbserver
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
......@@ -7,8 +11,8 @@
REPO_PARENT ?= ../..
-include $(REPO_PARENT)/parent_common.mk
PREFIX ?= /usr/local
BINDESTDIR ?= $(PREFIX)/bin
PREFIX ?= /
BINDESTDIR ?= $(PREFIX)/usr/local/bin
TRTL ?= ../..
TRTL_SW = $(TRTL)/software
......
#!/bin/bash
# Author: Adam Wujek, CERN 2018
# SPDX-License-Identifier: GPL-3.0-or-later
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Author: Adam Wujek
#
# This script compares the size of produced binaries of a current commit
# (read from a file $size_db_file), with sizes of binaries produced for previous
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <inttypes.h>
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* You should have received a copy of the GNU Library General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <stdint.h>
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <stdint.h>
......
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN (home.cern)
"""
#!/usr/bin/env python
import argparse
import PyUAL
......
// SPDX-License-Identifier: GPL-3.0-or-later
/*
* Copyright (c) 2019 CERN (home.cern)
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
......
/*
* Copyright (c) 2015-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <stdint.h>
......
/*
* Copyright (c) 2015-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <stdint.h>
......
/*
* Copyright (c) 2014-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <inttypes.h>
#include <unistd.h>
#include <stdlib.h>
......
/*
* Copyright (c) 2015-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <stdint.h>
......
/*
* Copyright (c) 2016-2019 CERN (home.cern)
* Author: Federico Vaga <federico.vaga@cern.ch>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
* SPDX-License-Identifier: GPL-3.0-or-later
* SPDX-FileCopyrightText: 2019 CERN (home.cern)
*
* You should have received a copy of the GNU Library General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* Author: Federico Vaga <federico.vaga@cern.ch>
*/
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
......
# Change Log
..
SPDX-License-Identifier: CC0-1.0
SPDX-FileCopyrightText: <year> <owner>
FIXME choose your license and set the copyright
## [0.0.0] - {{date}}
==========
Change Log
==========
[0.0.0] - {{date}}
==================
This start the project {{name}} from the Mock Turtle template.
It includes basic files for hdl and software development
This is the README file for the {{name}} project.
\ No newline at end of file
..
SPDX-License-Identifier: CC0-1.0
SPDX-FileCopyrightText: <year> <owner>
FIXME choose your license and set the copyright
This is the README file for the {{name}} project.
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
GIT_VERSION = $(shell cd $(src); git describe --dirty --long --tags)
all: doxygen
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
PROJECT_NAME = "${name}"
PROJECT_NUMBER = $(GIT_VERSION)
PROJECT_BRIEF =
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
# If needed add here images conversion
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.so
*.a
*.mod.c
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := lib
DIRS += tools
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := fw-01
......
/*
* Copyright (C)
* Author:
* SPDX-License-Identifier:
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: <year> <owner>
*
* FIXME choose your license and set the copyright
*/
#ifndef __FW_{{short_name_capital}}_COMMON_H__
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "{{name}} configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?=
TRTL_SW = $(TRTL)/software
TRTL_FW = $(TRTL_SW)/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = fw-{{short_name}}.o
OBJS += # add other object files that you need
OUTPUT = fw-{{short_name}}
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# {{name}} configuration
......
/*
* Copyright (C)
* Author:
* SPDX-License-Identifier:
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: <year> <owner>
*
* FIXME choose your license and set the copyright
*/
#include <string.h>
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
MEMORY
{
ram : ORIGIN = 0x00000000, LENGTH = 2048
......
/*
* Copyright (C)
* Author:
* SPDX-License-Identifier:
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: <year> <owner>
*
* FIXME choose your license and set the copyright
*
* Define the symbols which are shared between the user-space and
* the firmware application
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
......
/*
* Copyright (C)
* Author:
* SPDX-License-Identifier:
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: <year> <owner>
*
* FIXME choose your license and set the copyright
*
* Define here the internal API
*/
......
/*
* Copyright (C)
* Author:
* SPDX-License-Identifier:
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: <year> <owner>
*
* FIXME choose your license and set the copyright
*/
#include <stdlib.h>
......
/*
* Copyright (C)
* Author:
* SPDX-License-Identifier:
* SPDX-License-Identifier: CC0-1.0
* SPDX-FileCopyrightText: <year> <owner>
*
* FIXME choose your license and set the copyright
*
* Define in this file the public API
*/
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# If it exists includes Makefile.specific. In this Makefile, you should put
# specific Makefile code that you want to run before this. For example,
# build a particular environment.
......
#!/usr/bin/python
"""
Federico Vaga <federico.vaga@cern.ch>
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN (home.cern)
Author: Federico Vaga <federico.vaga@cern.ch>
The trtl-project-creater can be used to create an empty project based
on the Mock Turtle architecture.
......@@ -76,8 +79,8 @@ def tpc_apply_value_to_template(directory, table):
env = jinja2.Environment(loader=jinja2.FileSystemLoader(directory),keep_trailing_newline=True)
# Adjust content and create new file
for tmpl in ["CHANGELOG",
"README.md",
for tmpl in ["CHANGELOG.rst",
"README.rst",
"LICENSE",
"software/Makefile",
"software/tools/Makefile",
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
# All MockTurtle TTY interfaces to the CPU console are readable for all users
SUBSYSTEM=="tty", SUBSYSTEMS=="mockturtle", KERNEL=="ttytrtl-*", MODE="0444"
\ No newline at end of file
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN
"""
import os
import PyMockTurtle
import pytest
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
*.elf
*.bin
*.o
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
-include Makefile.specific
DIRS := serial
DIRS += cpu-loop
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "config_rom test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = config_rom.o
OBJS += # add other object files that you need
OUTPUT = fw-config-rom
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
int main()
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# config_rom test configuration
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "config_rom test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = byte-addressing.o
OBJS += # add other object files that you need
OUTPUT = fw-byte-addressing
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# config_rom test configuration
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "cpu-loop test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = cpu-loop.o
OBJS += # add other object files that you need
OUTPUT = fw-loop
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# cpu-loop test configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
int main()
{
int sum = 0;
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "config_rom test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = notify.o
OBJS += # add other object files that you need
OUTPUT = fw-notify
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# config_rom test configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
int main()
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "hmq_async_recv test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = hmq-async-recv.o
OBJS += # add other object files that you need
OUTPUT = fw-hmq-async-recv
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# hmq_async_recv test configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
int main()
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "hmq_async_send test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = hmq-async-send.o
OBJS += # add other object files that you need
OUTPUT = fw-hmq-async-send
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# hmq_async_send test configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "hmq_purge test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = hmq-purge.o
OBJS += # add other object files that you need
OUTPUT = fw-hmq-purge
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# hmq_purge test configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
int main()
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "hmq_async_send test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = hmq-sync.o
OBJS += # add other object files that you need
OUTPUT = fw-hmq-sync
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# hmq_async_send test configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
int main()
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "rmq_udp_send test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = rmq-udp-send.o
OBJS += # add other object files that you need
OUTPUT = fw-rmq-udp-send
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# cpu-loop test configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
#define TEST_MESSAGE_ID 0xdeadbeef
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "hello_world_framework demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = rt-frm.o
OBJS += # add other object files that you need
OUTPUT = fw-rt-frm
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# hello_world_framework demo configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/*
* Copyright (C)
* Author:
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "serial test configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = serial.o
OBJS += # add other object files that you need
OUTPUT = fw-serial
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# serial test configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <mockturtle-rt.h>
int main()
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
mainmenu "alarm_clock demo configuration"
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
TRTL ?= ../../../
TRTL_FW = $(TRTL)/software/firmware
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
OBJS = sim-verif.o
OBJS += # add other object files that you need
OUTPUT = sim-verif
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
#
# Automatically generated file; DO NOT EDIT.
# alarm_clock demo configuration
......
/*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* SPDX-FileCopyrightText: 2019 CERN
*/
#include <string.h>
#include <stdint.h>
......
/*
* SPDX-License-Identifier: CC0-1.0
*
* SPDX-FileCopyrightText: 2019 CERN
*/
/* This is a generic configuration that should work on
the SPEC/SVEC demos FPGA */
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
[pytest]
\ No newline at end of file
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN
"""
import os
import pytest
import PyMockTurtle
......
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN
"""
import hashlib
import os
import pytest
......
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN
"""
import os
class TestDevice(object):
......
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN
"""
import os
import PyMockTurtle
import pytest
......
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN
"""
import os
import pytest
import PyMockTurtle
......
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN
"""
import os
import pytest
import serial
......
"""
SPDX-License-Identifier: GPL-3.0-or-later
SPDX-FileCopyrightText: 2019 CERN
"""
class TestShm(object):
def test_direct_sequence(self, trtl_shm):
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment