eeric 0.0.21

An easily embeddable RV64I core with MFDV extensions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub trait NumMaskExt {
    fn with_mask_bit(self, value: u64) -> u64;
    fn get_mask_bit(&self) -> u64;
}

impl NumMaskExt for u64 {
    fn with_mask_bit(self, bit: u64) -> u64 {
        if bit == 1 {
            self | 1
        } else {
            self & !1
        }
    }

    fn get_mask_bit(&self) -> u64 {
        *self & 1
    }
}