Closed aroelke closed 6 years ago
This sounds like a bug to me. It may take me some time to get to this this week, but I'll add it to the unit tests. That should uncover whatever is going on.
I've started trying to fix this with PR #19, but I'm running into a problem with creating/loading the scan chain into LeChiffre. It works fine (i.e. passes my assembly test) if I only annotate one register as faulty, but if I annotate two or more the tests fail. How LeChiffre works and what it does to enable the injectors is hard for me to understand; do you know what might be going on?
I believe I figured it out. The transform was creating modules for each of the new injectors, but was only instantiating one of them (the rest were all instances of the first one). The latest update to PR #19 should address this.
If two
Reg
s are annotated as being faulty with the same type of injector, they are reported in the scan chain to have the same width even if they don't in the Chisel code (it appears to be the minimum of the widths of the registers annotated). For example, if bothreg_fflags
andreg_frm
in CSR.scala are annotated withStuckAt
faults, scan-chain.json will report them to have widths of three even thoughfflags
is five bits wide. This doesn't happen when the injectors are different.I can't tell if this affects the final circuit, but it does affect the scan chain tool's ability to create a bitstream for LeChiffre.