fix wire example to actually be about wires, not registers
All checks were successful
/ test (push) Successful in 14m43s
All checks were successful
/ test (push) Successful in 14m43s
This commit is contained in:
parent
b33566841d
commit
305805d237
|
@ -15,13 +15,13 @@
|
|||
//! # #[hdl]
|
||||
//! # let v: UInt<1> = m.input();
|
||||
//! #[hdl]
|
||||
//! let cd: ClockDomain = m.input();
|
||||
//! #[hdl]
|
||||
//! let my_register: UInt<8> = m.reg_builder().clock_domain(cd).reset(8_hdl_u8);
|
||||
//! let my_wire: UInt<8> = m.wire();
|
||||
//! #[hdl]
|
||||
//! if v {
|
||||
//! // my_register is only changed when both `v` is set and `cd`'s clock edge occurs.
|
||||
//! m.connect(my_register, 0x45_hdl_u8);
|
||||
//! m.connect(my_wire, 0x45_hdl_u8);
|
||||
//! } else {
|
||||
//! // wires must be connected to under all conditions
|
||||
//! m.connect(my_wire, 0x23_hdl_u8);
|
||||
//! }
|
||||
//! # }
|
||||
//! ```
|
||||
|
|
Loading…
Reference in a new issue