Skip to content

Commit

Permalink
Update some pages of the user guide (#453)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorbel1 authored Jan 4, 2024
1 parent fd0895f commit 3a56aa2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 33 deletions.
44 changes: 14 additions & 30 deletions doc/user_guide/_docs/A01-sample-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,27 @@ To get a quick feel for what ROHD looks like, below is an example of what a simp
// Import the ROHD package
import 'package:rohd/rohd.dart';
// Define a class Counter that extends ROHD's abstract Module class
// Define a class Counter that extends ROHD's abstract Module class.
class Counter extends Module {
// For convenience, map interesting outputs to
// short variable names for consumers of this module
// For convenience, map interesting outputs to short variable names for
// consumers of this module.
Logic get val => output('val');
// This counter supports any width, determined at run-time
// This counter supports any width, determined at run-time.
final int width;
Counter(Logic en, Logic reset, Logic clk, {this.width=8, String name='counter'})
: super(name: name) {
Counter(Logic en, Logic reset, Logic clk,
{this.width = 8, super.name = 'counter'}) {
// Register inputs and outputs of the module in the constructor.
// Module logic must consume registered inputs and output to registered outputs.
en = addInput('en', en);
// Module logic must consume registered inputs and output to registered
// outputs.
en = addInput('en', en);
reset = addInput('reset', reset);
clk = addInput('clk', clk);
clk = addInput('clk', clk);
addOutput('val', width: width);
var val = addOutput('val', width: width);
// A local signal named 'nextVal'
var nextVal = Logic(name: 'nextVal', width: width);
// Assignment statement of nextVal to be val+1 (<= is the assignment operator)
nextVal <= val + 1;
// `Sequential` is like SystemVerilog's always_ff,
// in this case trigger on the positive edge of clk
Sequential(clk, [
// `If` is a conditional if statement,
// like `if` in SystemVerilog always blocks
If(reset, then:[
// the '<' operator is a conditional assignment
val < 0
], orElse: [If(en, then: [
val < nextVal
])])
]);
// We can use the `flop` function to automate creation of a `Sequential`.
val <= flop(clk, reset: reset, en: en, val + 1);
}
}
Expand Down
4 changes: 2 additions & 2 deletions doc/user_guide/_docs/B02-comparisons-with-alternatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ There are a number of other attempts to make HLS better, including [XLS](https:/

Transaction Level Verilog (TL-Verilog) is like an extension on top of SystemVerilog that makes pipelining simpler and more concise.

- TL-Verilog makes RTL design easier, but doesn't really add much in terms of verification
- Abstraction of pipelining is something that could be achievable with ROHD, but is not (yet) implemented in base ROHD.
- TL-Verilog makes RTL design easier, especially when pipelining, but doesn't really add much in terms of verification
- ROHD also supports a [pipelining abstraction](https://intel.github.io/rohd-website/docs/pipelines/).

Read more about TL-Verilog here: <https://www.redwoodeda.com/tl-verilog>

Expand Down
2 changes: 1 addition & 1 deletion doc/user_guide/_get-started/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ One of ROHD's goals is to help grow an open-source community around reusable har

Dart is a modern, relatively new language developed by Google. It is designed with client-side application development in mind (e.g. apps and websites), but also has great performance for general tasks. It adopts some of the most loved syntax and features from languages like C++, Java, C#, JavaScript/TypeScript, and Kotlin. Dart is extremely user-friendly, fun to use, and **easy to learn**. The excellent, fast static analysis with a modern IDE with autocomplete makes it easy to learn as you work. Dart has a lot of great modern language features, including null safety.

Because it is designed with asynchronous requests in mind (i.e. sending a request to a server and not freezing the application while it waits for a response), Dart has async/await and `Future`s built in, with concurrent programming using *isolates*. These constructs enable code to execute in parallel without multithreading. These chacteristics make modelling hardware very easy.
Because it is designed with asynchronous requests in mind (i.e. sending a request to a server and not freezing the application while it waits for a response), Dart has `async`/`await` and `Future`s built in, with [concurrent programming](https://dart.dev/language/concurrency). These constructs enable code to execute in parallel without multithreading. These chacteristics make modelling hardware very easy.

Dart can compile to native machine code, but also includes its own high-performance VM and a JIT compiler. During development, you can use a feature called "hot reload" to change code while the program is actively executing.

Expand Down

0 comments on commit 3a56aa2

Please sign in to comment.