📄 singlestaticfaultmodel.java
字号:
/*
* SingleStaticFaultModel.java
*
* Created on 18 May 2002, 17:00
*/
package jaga.pj.circuits.fpgaft;
/** A fault model where a single fixed element can fail in various ways. This
* generates a fault sequence of length 1.
*
* @author Michael Garvie
* @version
*/
public class SingleStaticFaultModel implements SingleFaultModel {
protected int pos;
protected int faultTypes = 2;
protected int currFaultType = 0;
/** Creates new SingleStaticFaultModel
* @param ppos position of element that will fail.
*/
public SingleStaticFaultModel(int ppos) {
pos = ppos;
}
/** Creates new SingleStaticFaultModel
* @param ppos position of element that will fail.
* @param ftypes number of fault types to generate. These are as defined in FTLib.
*/
public SingleStaticFaultModel(int ppos,int ftypes) {
pos = ppos;
faultTypes = ftypes;
}
/** Resets the sequence of faults
*/
public void reset() {
currFaultType = 0;
}
public boolean hasMoreElements() {
return currFaultType < faultTypes;
}
public java.lang.Object nextElement() {
return new java.awt.Point( pos, currFaultType++ );
}
public String toString()
{
String rv = "Single Static Fault Model with:";
rv += "\n Fault Pos = " + pos;
rv += "\n Fault Types = " + faultTypes;
return rv;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -