Skip to content

Commit 851522b

Browse files
committed
Extensive changes to ASLi
Changes include: * Change ASLi to support most of ASL version 1.0 requiring significant changes to the AST, lexer, parser and typechecker. * Cleanup the "CPU" API that ASLi expects an ISA to implement. * Add support for compiling ASL specifications to C by adding many transformations and multiple runtimes. * Add a demo ISA to illustrate how to generate simulators from an ASL specification. Co-authored-by: Alastair Reid <[email protected]> Co-authored-by: Nikolay Kosarev <[email protected]> Co-authored-by: Niclas Adlertz <[email protected]> Co-authored-by: Rafael Barbalho <[email protected]> Signed-off-by: Alastair Reid <[email protected]>
1 parent 3104f03 commit 851522b

File tree

350 files changed

+41821
-7398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

350 files changed

+41821
-7398
lines changed

.clang-format

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# clang-format configuration file. Intended for clang-format >= 10.
2+
---
3+
AccessModifierOffset: -2
4+
AlignAfterOpenBracket: Align
5+
AlignConsecutiveAssignments: false
6+
AlignConsecutiveDeclarations: false
7+
AlignConsecutiveMacros: false
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: false
11+
AllowAllArgumentsOnNextLine: true
12+
AllowAllConstructorInitializersOnNextLine: true
13+
AllowAllParametersOfDeclarationOnNextLine: true
14+
AllowShortBlocksOnASingleLine: Never
15+
AllowShortCaseLabelsOnASingleLine: false
16+
AllowShortFunctionsOnASingleLine: None
17+
AllowShortIfStatementsOnASingleLine: Never
18+
AllowShortLambdasOnASingleLine: All
19+
AllowShortLoopsOnASingleLine: false
20+
AlwaysBreakAfterDefinitionReturnType: None
21+
AlwaysBreakAfterReturnType: AllDefinitions
22+
AlwaysBreakBeforeMultilineStrings: false
23+
AlwaysBreakTemplateDeclarations: MultiLine
24+
BinPackArguments: true
25+
BinPackParameters: true
26+
BreakAfterJavaFieldAnnotations: false
27+
BreakBeforeBinaryOperators: NonAssignment
28+
BreakBeforeBraces: Custom
29+
BreakBeforeInheritanceComma: false
30+
BreakBeforeTernaryOperators: true
31+
BreakConstructorInitializers: BeforeColon
32+
BreakConstructorInitializersBeforeComma: false
33+
BreakInheritanceList: BeforeColon
34+
BreakStringLiterals: false
35+
BraceWrapping:
36+
AfterCaseLabel: false
37+
AfterClass: false
38+
AfterControlStatement: false
39+
AfterEnum: false
40+
AfterFunction: true
41+
AfterNamespace: false
42+
AfterObjCDeclaration: false
43+
AfterStruct: false
44+
AfterUnion: false
45+
AfterExternBlock: false
46+
BeforeCatch: false
47+
BeforeElse: false
48+
IndentBraces: false
49+
SplitEmptyFunction: true
50+
SplitEmptyRecord: true
51+
SplitEmptyNamespace: true
52+
ColumnLimit: 80
53+
CommentPragmas: '^ IWYU pragma:'
54+
CompactNamespaces: false
55+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
56+
ConstructorInitializerIndentWidth: 8
57+
ContinuationIndentWidth: 8
58+
Cpp11BracedListStyle: false
59+
DeriveLineEnding: false
60+
DerivePointerAlignment: false
61+
DisableFormat: false
62+
ExperimentalAutoDetectBinPacking: false
63+
FixNamespaceComments: true
64+
IncludeBlocks: Preserve
65+
IncludeCategories:
66+
- Regex: '.*'
67+
Priority: 1
68+
SortPriority: 0
69+
IncludeIsMainRegex: '(_test)?$'
70+
IncludeIsMainSourceRegex: ''
71+
IndentCaseLabels: false
72+
IndentGotoLabels: true
73+
IndentPPDirectives: None
74+
IndentWidth: 8
75+
IndentWrappedFunctionNames: false
76+
JavaScriptQuotes: Leave
77+
JavaScriptWrapImports: true
78+
KeepEmptyLinesAtTheStartOfBlocks: false
79+
Language: Cpp
80+
MacroBlockBegin: ''
81+
MacroBlockEnd: ''
82+
MaxEmptyLinesToKeep: 1
83+
NamespaceIndentation: None
84+
ObjCBinPackProtocolList: Auto
85+
ObjCBlockIndentWidth: 2
86+
ObjCSpaceAfterProperty: false
87+
ObjCSpaceBeforeProtocolList: true
88+
PenaltyBreakAssignment: 2
89+
PenaltyBreakBeforeFirstCallParameter: 19
90+
PenaltyBreakComment: 300
91+
PenaltyBreakFirstLessLess: 120
92+
PenaltyBreakString: 1000
93+
PenaltyBreakTemplateDeclaration: 10
94+
PenaltyExcessCharacter: 1000000
95+
PenaltyReturnTypeOnItsOwnLine: 60
96+
PointerAlignment: Right
97+
ReflowComments: true
98+
SortIncludes: false
99+
SortUsingDeclarations: false
100+
SpaceAfterCStyleCast: false
101+
SpaceAfterLogicalNot: false
102+
SpaceAfterTemplateKeyword: false
103+
SpaceBeforeAssignmentOperators: true
104+
SpaceBeforeCpp11BracedList: false
105+
SpaceBeforeCtorInitializerColon: true
106+
SpaceBeforeInheritanceColon: true
107+
SpaceBeforeParens: ControlStatements
108+
SpaceBeforeRangeBasedForLoopColon: true
109+
SpaceBeforeSquareBrackets: false
110+
SpaceInEmptyBlock: false
111+
SpaceInEmptyParentheses: false
112+
SpacesBeforeTrailingComments: 2
113+
SpacesInAngles: false
114+
SpacesInCStyleCastParentheses: false
115+
SpacesInConditionalStatement: false
116+
SpacesInContainerLiterals: false
117+
SpacesInParentheses: false
118+
SpacesInSquareBrackets: false
119+
Standard: Cpp11
120+
TabWidth: 8
121+
UseCRLF: false
122+
UseTab: Never
123+
...

.github/dependabot.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip" # See documentation for possible values
4+
directory: "/" # Location of package manifests
5+
schedule:
6+
interval: "weekly"
7+
ignore:
8+
- dependency-name: "*"
9+
update-types: ["version-update:semver-major"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: McAfee Virus Scan
2+
on:
3+
workflow_dispatch:
4+
5+
permissions: read-all
6+
7+
jobs:
8+
virus:
9+
name: McAfee Virus Scan
10+
runs-on: [self-hosted, Linux, ubuntu-latest]
11+
steps:
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
- name: Execute Scan
14+
uses: intel-innersource/frameworks.devops.github.actions.mcafee@main
15+

.github/workflows/pull-request.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: pull-request
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
permissions: read-all
8+
9+
env:
10+
OPAMROOT: ${{ github.workspace }}/.opam
11+
12+
jobs:
13+
test:
14+
runs-on: [intellabs-generic-runners, linux]
15+
container:
16+
image: amr-registry.caas.intel.com/owr/idf2/abi/lnx/tools/ubuntu22.04.03:latest
17+
18+
steps:
19+
- name: Check out
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
with:
22+
submodules: recursive
23+
24+
- name: Install dependencies
25+
run: |
26+
apt update
27+
apt install -y libgmp-dev opam verilator pkg-config
28+
29+
# install clang-16
30+
apt install -y lsb-release wget software-properties-common gnupg
31+
wget https://apt.llvm.org/llvm.sh
32+
chmod +x llvm.sh
33+
./llvm.sh 16
34+
35+
python3 -m pip install --no-deps --require-hashes --requirement requirements.txt
36+
opam init --no-setup --disable-sandboxing --compiler=4.14.2
37+
opam install . --deps-only --with-test --with-doc --yes
38+
39+
- name: Build
40+
run: |
41+
eval $(opam env)
42+
make build
43+
44+
- name: Test
45+
run: |
46+
eval $(opam env)
47+
make test
48+
49+
- name: Build documentation
50+
run: |
51+
eval $(opam env)
52+
make doc

.gitignore

-7
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,5 @@
22
.*.swo
33
.*.un~
44

5-
asl_ast.ml
6-
asl_lexer.mll
7-
asl_parser.mly
8-
asl_parser_pp.ml
9-
10-
.merlin
11-
125
_build
136
_opam

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "ac_types"]
2+
path = runtime/external/ac_types
3+
url = https://github.com/hlslibs/ac_types.git
4+
[submodule "runtime/external/googletest"]
5+
path = runtime/external/googletest
6+
url = https://github.com/google/googletest.git

.ocamlformat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
profile = default
2+
version = 0.21.0
3+
wrap-comments = true

CHANGES.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
1.0.0 (2024-12-19)
2+
------------------
3+
4+
* Change ASLi to support most of ASL version 1.0 requiring significant
5+
changes to the AST, lexer, parser and typechecker.
6+
* Cleanup the "CPU" API that ASLi expects an ISA to implement.
7+
* Add support for compiling ASL specifications to C by adding
8+
many transformations and multiple runtimes.
9+
* Add a demo ISA to illustrate how to generate simulators from
10+
an ASL specification.
11+
12+
113
0.2.0 (2020-05-15)
214
------------------
315

CONTRIBUTING.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Contributing
2+
3+
### License
4+
5+
The Intel ASL Tools project is licensed under the terms in [LICENSE](LICENSE.md). By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
6+
7+
### Sign your work
8+
9+
Please use the sign-off line at the end of the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify
10+
the below (from [developercertificate.org](http://developercertificate.org/)):
11+
12+
```
13+
Developer Certificate of Origin
14+
Version 1.1
15+
16+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
17+
660 York Street, Suite 102,
18+
San Francisco, CA 94110 USA
19+
20+
Everyone is permitted to copy and distribute verbatim copies of this
21+
license document, but changing it is not allowed.
22+
23+
Developer's Certificate of Origin 1.1
24+
25+
By making a contribution to this project, I certify that:
26+
27+
(a) The contribution was created in whole or in part by me and I
28+
have the right to submit it under the open source license
29+
indicated in the file; or
30+
31+
(b) The contribution is based upon previous work that, to the best
32+
of my knowledge, is covered under an appropriate open source
33+
license and I have the right under that license to submit that
34+
work with modifications, whether created in whole or in part
35+
by me, under the same open source license (unless I am
36+
permitted to submit under a different license), as indicated
37+
in the file; or
38+
39+
(c) The contribution was provided directly to me by some other
40+
person who certified (a), (b) or (c) and I have not modified
41+
it.
42+
43+
(d) I understand and agree that this project and the contribution
44+
are public and that a record of the contribution (including all
45+
personal information I submit with it, including my sign-off) is
46+
maintained indefinitely and may be redistributed consistent with
47+
this project or the open source license(s) involved.
48+
```
49+
50+
Then you just add a line to every git commit message:
51+
52+
Signed-off-by: Joe Smith <[email protected]>
53+
54+
Use your real name (sorry, no pseudonyms or anonymous contributions.)
55+
56+
If you set your `user.name` and `user.email` git configs, you can sign your
57+
commit automatically with `git commit -s`.

LICENSE

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
BSD 3-Clause License
2-
3-
Copyright (c) 2024, Intel Corporation
1+
Copyright (c) 2017-2019 Arm Limited
2+
Copyright (C) 2022-2024 Intel Corporation
3+
SPDX-Licence-Identifier: BSD-3-Clause
44

55
Redistribution and use in source and binary forms, with or without
66
modification, are permitted provided that the following conditions are met:
@@ -12,13 +12,13 @@ modification, are permitted provided that the following conditions are met:
1212
this list of conditions and the following disclaimer in the documentation
1313
and/or other materials provided with the distribution.
1414

15-
3. Neither the name of the copyright holder nor the names of its
16-
contributors may be used to endorse or promote products derived from
17-
this software without specific prior written permission.
15+
3. Neither the name of the copyright holder nor the names of its contributors
16+
may be used to endorse or promote products derived from this software
17+
without specific prior written permission.
1818

19-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2222
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
2323
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2424
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

0 commit comments

Comments
 (0)