-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
16 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
pub mod Top { | ||
incoming clk : Clock; | ||
incoming reset : Word[1]; | ||
outgoing out : Word[1]; | ||
outgoing out : Word[3]; | ||
|
||
out := reset; | ||
out := buffer.out; | ||
|
||
mod foo of Foo; | ||
foo.in := reset; | ||
reg counter : Word[3] on clk; | ||
counter <= if reset { 0 } else { counter->add(1) }; | ||
|
||
mod buffer of Buffer; | ||
buffer.clk := clk; | ||
buffer.in := counter; | ||
} | ||
|
||
mod Foo { | ||
incoming in : Word[1]; | ||
incoming out : Word[1]; | ||
mod Buffer { | ||
incoming clk : Clock; | ||
incoming in : Word[3]; | ||
outgoing out : Word[3]; | ||
|
||
node tmp : Word[1]; | ||
tmp := in; | ||
out := tmp; | ||
reg buffer : Word[3] on clk; | ||
buffer <= in; | ||
out := buffer; | ||
} |
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