fayalite 0.2.0

Hardware Description Language embedded in Rust, using FIRRTL's semantics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: LGPL-3.0-or-later
// See Notices.txt for copyright information
//! # `#[hdl] if` Statements
//!
//! `#[hdl] if` statements behave similarly to Rust `if` statements, except they end up as muxes
//! and stuff in the final hardware instead of being run when the fayalite module is being created.
//!
//! The condition of an `#[hdl] if` statement must have type [`Expr<Bool>`][Bool].
//!
//! `#[hdl] if` statements' bodies must evaluate to type `()` for now.
//!
//! You can use `if`, `else`, `else if`, `if let`, and `else if let` as usual, with the
//! `[else] if let` variants behaving like [`#[hdl] match`][match].
//!
//! [match]: super::hdl_match_statements

#[allow(unused)]
use crate::int::Bool;