1 package net.mograsim.logic.core.components;
5 import net.mograsim.logic.core.timeline.Timeline;
6 import net.mograsim.logic.core.types.Bit;
7 import net.mograsim.logic.core.types.BitVector;
8 import net.mograsim.logic.core.wires.Wire.ReadEnd;
9 import net.mograsim.logic.core.wires.Wire.ReadWriteEnd;
11 public class BitDisplay extends BasicComponent
13 private final ReadEnd in;
14 private BitVector displayedValue;
16 public BitDisplay(Timeline timeline, ReadEnd in)
25 protected void compute()
27 displayedValue = in.getValues();
30 public BitVector getDisplayedValue()
32 return displayedValue;
35 public boolean isDisplaying(Bit... values)
37 return displayedValue.equals(BitVector.of(values));
41 public List<ReadEnd> getAllInputs()
47 public List<ReadWriteEnd> getAllOutputs()