-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parallel prefix operations #51
Closed
Closed
Changes from 51 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
10ba13d
schematic generation
desmonddak 3eb2576
no lint on LICENSE file
desmonddak 300b118
more markdown linting ignore
desmonddak c7c617f
try HTML generation in run checks flow
desmonddak 1f79ee9
path fix
desmonddak e29402f
direct path for yosys
desmonddak 9984f8a
forgot synthesis
desmonddak e947354
permission error or apt
desmonddak be6fb15
yosys is installed at top of source, not /
desmonddak f9b65b8
Use a binary yosys rather than building.
desmonddak 0941a1a
github submodules
desmonddak 50d9898
github submodules (untabify)
desmonddak 51905db
more ignore lint entries
desmonddak f3dfe50
remove redundant elkjs
desmonddak bf3eb49
forgot directory add
desmonddak 8bc8ee0
formatting
desmonddak 1e2e42b
dart cleanup
desmonddak b4d0297
Merge pull request #1 from desmonddak/synthesis
desmonddak 155ae9b
remove empty file
desmonddak 6d91fae
updated workflow
desmonddak b78aba6
migrated schem generation to deploy stage
desmonddak 492d6e8
Push documentation of api one directory lower
desmonddak 6c51f4d
need a home dir
desmonddak d6e0700
attempt to link schematic
desmonddak bd93c4c
htmls need doc area setup
desmonddak 8c18efc
partition schem support
desmonddak 06e1a6f
sudo issue
desmonddak ab25690
hw schematic not schematic
desmonddak 2fce1ec
npm typo
desmonddak 675e028
remove quotes
desmonddak fbe11ae
each component gets a schematic
desmonddak 6696b3c
format complaint
desmonddak 7c7d888
fix write flushing
desmonddak 90eaede
add one-hot codec documentation
desmonddak 38f01a8
quieter generator, fixed onehot doc
desmonddak aabbbac
feedback fixes
desmonddak 2a2993d
redirect links
desmonddak 60a8878
filename not correct inside file
desmonddak 55c6d61
line length issue
desmonddak 6d7082d
no more puts
desmonddak de2f6e6
formatting
desmonddak 2e7e435
merge from intel
desmonddak 1423819
parallel prefix operations
desmonddak 0c26868
doc lint fixes
desmonddak 6eb11ff
doc lint fixes
desmonddak 5a0b1b0
remove links to deployment area for now
desmonddak 78e2c8f
fix bug in verilog generation for PPAdder flavors
desmonddak 529a9d5
Merge branch 'main' of https://github.com/intel/rohd-hcl into prefix-…
desmonddak 7e6fd8a
updated documentation, clearer naming, using Random()
desmonddak 6601e6b
Merge branch 'prefix-tree' of https://github.com/desmonddak/rohd-hcl …
desmonddak 4bbe8a8
doc fixes
desmonddak 171bdbc
Merge branch 'main' of https://github.com/desmonddak/rohd-hcl
desmonddak 659037e
merge conflict fixes
desmonddak b198e3c
touch file
desmonddak 837712a
merge fixes from prefix-tree
desmonddak 8065052
merge fixes
desmonddak 9d335e0
Merge branch 'desmonddak-prefix-tree2' into desmonddak-prefix-tree
desmonddak ddce8ed
fix conflicts
desmonddak c71c351
removed old one_hot.dart
desmonddak 7f73322
reverted to main CONTRIBUTING.md
desmonddak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ doc/api/ | |
tmp* | ||
*.vcd | ||
.vscode/ | ||
*~ | ||
|
||
# Exceptions | ||
!.vscode/extensions.json | ||
!.vscode/extensions.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
desmonddak marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From https://github.com/intel/rohd-hcl | ||
* branch main -> FETCH_HEAD | ||
Auto-merging .github/workflows/general.yml | ||
Auto-merging doc/components/arbiter.md | ||
CONFLICT (content): Merge conflict in doc/components/arbiter.md | ||
Auto-merging doc/components/memory.md | ||
CONFLICT (content): Merge conflict in doc/components/memory.md | ||
CONFLICT (modify/delete): doc/fifo.md deleted in 861c4ad955af5ac6f2099eb3e1270fe83f40ac26 and modified in HEAD. Version HEAD of doc/fifo.md left in tree. | ||
Auto-merging gen/arbiter_gen.dart | ||
CONFLICT (add/add): Merge conflict in gen/arbiter_gen.dart | ||
Auto-merging gen/fifo_gen.dart | ||
CONFLICT (add/add): Merge conflict in gen/fifo_gen.dart | ||
Auto-merging gen/generate.dart | ||
CONFLICT (add/add): Merge conflict in gen/generate.dart | ||
Auto-merging gen/one_hot_gen.dart | ||
CONFLICT (add/add): Merge conflict in gen/one_hot_gen.dart | ||
Auto-merging gen/rf_gen.dart | ||
CONFLICT (add/add): Merge conflict in gen/rf_gen.dart | ||
Auto-merging gen/rotate_gen.dart | ||
CONFLICT (add/add): Merge conflict in gen/rotate_gen.dart | ||
Auto-merging test/one_hot_test.dart | ||
Auto-merging tool/converters/verilog_html.sh | ||
CONFLICT (add/add): Merge conflict in tool/converters/verilog_html.sh | ||
Auto-merging tool/converters/verilog_json.sh | ||
CONFLICT (add/add): Merge conflict in tool/converters/verilog_json.sh | ||
Auto-merging tool/gh_actions/install_d3_hwschematic.sh | ||
CONFLICT (add/add): Merge conflict in tool/gh_actions/install_d3_hwschematic.sh | ||
Auto-merging tool/gh_actions/install_opencadsuite.sh | ||
CONFLICT (add/add): Merge conflict in tool/gh_actions/install_opencadsuite.sh | ||
Auto-merging tool/gh_codespaces/run_setup.sh | ||
CONFLICT (content): Merge conflict in tool/gh_codespaces/run_setup.sh | ||
Auto-merging tool/synthesize.sh | ||
CONFLICT (add/add): Merge conflict in tool/synthesize.sh | ||
Automatic merge failed; fix conflicts and then commit the result. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Parallel Prefix Operations | ||
|
||
ROHD HCL implements a set of parallel prefix compute operations using different parallel prefix computation trees based on the ['ParallelPrefix'] node class carrying carry/save or generate/propagate bits. | ||
|
||
For example, we have unary operations like a word-level 'or' [`ParallelPrefixOrScan`] class, and a priority encoder [`ParallelPrefixPriorityEncoder`] class which computes the position of the first bit set to '1'. We have simple unary arithmetic operations like an increment [`ParallelPrefixIncr`] class, and a decrement [`ParallelPrefixDecr`] class. Finally, we have a binary adder [`ParallelPrefixAdder`] class. For background on basic parallel prefix adder structures, see <https://en.wikipedia.org/wiki/Kogge%E2%80%93Stone_adder>. | ||
|
||
Each of these operations can be implemented with different ['ParallelPrefix'] tree structures: | ||
|
||
desmonddak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- ['Ripple'] | ||
- ['Sklansky] | ||
- ['KoggeStone'] | ||
- ['BrentKung] | ||
|
||
[ParallelPrefixAdder (BrentKung) Schematic] | ||
|
||
[ParallelPrefixPriorityEncoder (KoggeStone) Schematic] |
desmonddak marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# One Hot Codecs | ||
|
||
ROHD HCL implements a set of one hot encoder and decoders. | ||
|
||
For example, we have an encoder [`BinaryToOneHot`](https://intel.github.io/rohd-hcl/rohd_hcl/BinaryToOneHot-class.html) class, and a couple of implementations of decoder classes like [`OneHotToBinary`](https://intel.github.io/rohd-hcl/rohd_hcl/OneHotToBinary-class.html) and a more performant [`TreeBinaryToOneHot`](https://intel.github.io/rohd-hcl/rohd_hcl/TreeOneHotToBinary-class.html). | ||
|
||
The encoders take a Logic bitvector, with the constraint that only a single bit is set to '1' and outputs the bit position in binary. | ||
|
||
The decoders take a Logic input representing the bit position to be set to '1', and returns a Logic bitvector with that bit position set to '1', and all others set to '0' | ||
|
||
[BinaryToOneHot Schematic](https://intel.github.io/rohd-hcl/BinaryToOneHot.html) | ||
|
||
[OneHotToBinary Schematic](https://intel.github.io/rohd-hcl/OneHotToBinary.html) | ||
|
||
[TreeOneHotToBinary Schematic](https://intel.github.io/rohd-hcl/TreeOneHotToBinary.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (C) 2023 Intel Corporation | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// | ||
// one_hot_gen.dart | ||
// Generate one_hot codecs. | ||
// | ||
// 2023 Oct 02 | ||
// Author: Desmond Kirkpatrick <[email protected]> | ||
|
||
import 'dart:io'; | ||
import 'package:rohd/rohd.dart'; | ||
import 'package:rohd_hcl/src/parallel_prefix_operations.dart'; | ||
|
||
Future<void> parallelPrefixGen() async { | ||
const n = 8; | ||
final a = Logic(name: 'a', width: n); | ||
final b = Logic(name: 'b', width: n); | ||
|
||
final generators = [Ripple.new, Sklansky.new, KoggeStone.new, BrentKung.new]; | ||
final names = ['Ripple', 'Sklansky', 'KoggeStone', 'BrentKung']; | ||
var i = 0; | ||
for (final ppGen in generators) { | ||
final m1 = ParallelPrefixAdder(a, b, ppGen); | ||
await m1.build(); | ||
File('build/${m1.definitionName}_${names[i]}.v').writeAsStringSync(m1 | ||
.generateSynth() | ||
.replaceAll(m1.definitionName, '${m1.definitionName}_${names[i]}')); | ||
final m2 = ParallelPrefixPriorityEncoder(a, ppGen); | ||
await m2.build(); | ||
File('build/${m2.definitionName}_${names[i]}.v').writeAsStringSync(m2 | ||
.generateSynth() | ||
.replaceAll(m2.definitionName, '${m2.definitionName}_${names[i]}')); | ||
i = i + 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
// Implementation of one hot codec for Logic | ||
// | ||
// 2023 February 24 | ||
// Author: Desmond Kirkpatrick | ||
// Author: Desmond Kirkpatrick <[email protected]> | ||
|
||
import 'dart:math'; | ||
import 'package:rohd/rohd.dart'; | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird that this (and some other) files are showing up as a diff from
main
. If you just do a merge or rebase withmain
does this go away?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The merge failed so it required manual changes. The PR is quite stale, so there are more and more conflicts.
Some files were moved in main (e.g. one_hot.dart), so I removed them from this branch.
We should go through a list of changed files before final merge and make sure this branch is not changing files we do not expect.