Skip to content

Commit

Permalink
Update book
Browse files Browse the repository at this point in the history
  • Loading branch information
minseongg committed Oct 11, 2024
1 parent f5999ae commit 46be6ab
Show file tree
Hide file tree
Showing 28 changed files with 2,054 additions and 2,099 deletions.
3 changes: 3 additions & 0 deletions doc/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ title = "HazardFlow HDL"
language = "en"
multilingual = false
src = "docs"

[output.html]
mathjax-support = true
4 changes: 2 additions & 2 deletions doc/docs/advanced/dependency.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ It is defined as variants of an enum `Dep`:
```rust,noplayground
/// Dependency type of a hazard interface.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, ConstParamTy)]
pub enum Dep {
enum Dep {
/// The payload (`Fwd`) does not depend on the resolver (`Bwd`).
Helpful = 0,
Expand All @@ -33,7 +33,7 @@ We annotate the dependency type to the hazard interface.
```rust,noplayground
/// Hazard interface.
#[derive(Debug)]
pub struct I<H: Hazard, const D: Dep>;
struct I<H: Hazard, const D: Dep>;
```

The benefit of using dependency type is that it is useful to guarantee the transfer happens or not in the interface.
Expand Down
62 changes: 0 additions & 62 deletions doc/docs/examples/cpu/implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,65 +27,3 @@ fn core(
- We chain the 5 sub-modules `fetch`, `decode`, `exe`, `mem`, and `wb` by using the `comb` method.

In the following subsections, we will explain the implementation details for each stage.

<!--
**Fetch stage:**
TODO(@minseong): Figure
```rust,noplayground
pub fn fetch<const START_ADDR: u32>(
imem: impl FnOnce(Vr<MemReq>) -> Vr<MemRespWithAddr>,
) -> I<VrH<FetEP, DecR>, { Dep::Demanding }> {
..
}
```
**Decode stage:**
TODO(@minseong): Figure
```rust,noplayground
pub fn decode(
i: I<VrH<FetEP, DecR>, { Dep::Demanding }>
) -> I<VrH<DecEP, (ExeR, MemR, WbR)>, { Dep::Demanding }> {
..
}
```
**Execute stage:**
TODO(@minseong): Figure
```rust,noplayground
pub fn exe(
i: I<VrH<DecEP, (ExeR, MemR, WbR)>, { Dep::Demanding }>
) -> I<VrH<ExeEP, (MemR, WbR)>, { Dep::Demanding }> {
..
}
```
**Memory stage:**
TODO(@minseong): Figure
```rust,noplayground
/// Memory stage.
pub fn mem(
i: I<VrH<ExeEP, (MemR, WbR)>, { Dep::Demanding }>,
dmem: impl FnOnce(Vr<MemReq>) -> Vr<MemRespWithAddr>,
) -> I<VrH<MemEP, WbR>, { Dep::Demanding }> {
..
}
```
**Writeback stage:**
TODO(@minseong): Figure
```rust,noplayground
pub fn wb(i: I<VrH<MemEP, WbR>, { Dep::Demanding }>) {
..
}
```
-->
386 changes: 241 additions & 145 deletions doc/docs/figure/combinator-fsm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
217 changes: 111 additions & 106 deletions doc/docs/figure/handshake.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
677 changes: 302 additions & 375 deletions doc/docs/figure/hazard-and.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
619 changes: 281 additions & 338 deletions doc/docs/figure/hazard-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
619 changes: 276 additions & 343 deletions doc/docs/figure/hazard-vr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
208 changes: 104 additions & 104 deletions doc/docs/figure/hazard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
221 changes: 221 additions & 0 deletions doc/docs/figure/module.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
420 changes: 179 additions & 241 deletions doc/docs/figure/tutorial-example-vrh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
431 changes: 187 additions & 244 deletions doc/docs/figure/tutorial-hazard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions doc/docs/formulas/fir/b.svg

This file was deleted.

2 changes: 0 additions & 2 deletions doc/docs/formulas/fir/formula.svg

This file was deleted.

2 changes: 0 additions & 2 deletions doc/docs/formulas/fir/n.svg

This file was deleted.

2 changes: 0 additions & 2 deletions doc/docs/formulas/fir/x.svg

This file was deleted.

Loading

0 comments on commit 46be6ab

Please sign in to comment.