forked from libre-chip/fayalite
rename ClockDomain fields to clk and rst for consistency
This commit is contained in:
parent
63fd038729
commit
86827def91
3 changed files with 13 additions and 13 deletions
|
@ -31,8 +31,8 @@ pub fn my_module(width: usize) {
|
|||
let rst: SyncReset = m.input();
|
||||
#[hdl]
|
||||
let clock_domain: ClockDomain = m.wire();
|
||||
m.connect(clock_domain.clock, clk);
|
||||
m.connect(clock_domain.reset, rst.to_reset());
|
||||
m.connect(clock_domain.clk, clk);
|
||||
m.connect(clock_domain.rst, rst.to_reset());
|
||||
#[hdl]
|
||||
let i: UInt<8> = m.input();
|
||||
#[hdl]
|
||||
|
@ -94,7 +94,7 @@ fn test_mymodule() {
|
|||
circuit my_module:
|
||||
type Ty0 = {`0`: UInt<32>, `1`: SInt<5>}
|
||||
type Ty1 = {|A, B: UInt<8>, C: UInt<1>[3]|}
|
||||
type Ty2 = {clock: Clock, `reset`: Reset}
|
||||
type Ty2 = {clk: Clock, rst: Reset}
|
||||
type Ty3 = {flip i: UInt<8>, o: UInt<8>}
|
||||
module my_module: @[module-XXXXXXXXXX.rs 1:1]
|
||||
input clk: Clock @[module-XXXXXXXXXX.rs 2:1]
|
||||
|
@ -106,14 +106,14 @@ circuit my_module:
|
|||
output o3: Ty0 @[module-XXXXXXXXXX.rs 11:1]
|
||||
output o4: Ty1 @[module-XXXXXXXXXX.rs 20:1]
|
||||
wire clock_domain: Ty2 @[module-XXXXXXXXXX.rs 4:1]
|
||||
connect clock_domain.clock, clk @[module-XXXXXXXXXX.rs 5:1]
|
||||
connect clock_domain.`reset`, rst @[module-XXXXXXXXXX.rs 6:1]
|
||||
connect clock_domain.clk, clk @[module-XXXXXXXXXX.rs 5:1]
|
||||
connect clock_domain.rst, rst @[module-XXXXXXXXXX.rs 6:1]
|
||||
wire _bundle_literal_expr: Ty0
|
||||
connect _bundle_literal_expr.`0`, UInt<32>(0h5)
|
||||
connect _bundle_literal_expr.`1`, SInt<5>(-0h3)
|
||||
connect o3, _bundle_literal_expr @[module-XXXXXXXXXX.rs 12:1]
|
||||
inst m2 of module2 @[module-XXXXXXXXXX.rs 13:1]
|
||||
regreset r: UInt<8>, clock_domain.clock, clock_domain.`reset`, UInt<8>(0h8) @[module-XXXXXXXXXX.rs 14:1]
|
||||
regreset r: UInt<8>, clock_domain.clk, clock_domain.rst, UInt<8>(0h8) @[module-XXXXXXXXXX.rs 14:1]
|
||||
connect m2.i, i @[module-XXXXXXXXXX.rs 15:1]
|
||||
connect r, m2.o @[module-XXXXXXXXXX.rs 16:1]
|
||||
wire _array_literal_expr: UInt<8>[3]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue