veryl-simulator 0.20.0

A modern hardware description language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::ir::VarId;

#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum Event {
    Clock(VarId),
    Reset(VarId),
    Initial,
    Final,
}

impl Event {
    pub fn var_id(&self) -> Option<VarId> {
        match self {
            Event::Clock(id) | Event::Reset(id) if *id != VarId::SYNTHETIC => Some(*id),
            _ => None,
        }
    }
}