Beispiel #1
0
 internal void CreateRams()
 {
     CreateRam <Ram1B>(1);
     CreateRam <Ram4B>(4);
     CreateRam <Ram8B>(8);
     CreateRam <Ram12B>(12);
     CreateRam <Ram16B>(16);
     ComponentRegistry.CreateNew <Ram32B>("ram32b", "RAM 32 Bit", BuilderHelper.CreateMultiIOChip(24, 1, 32, 32, false, false, true, false, "A", "Write", "O", "D", false, true, false, false));
 }
        public void LoadFloatCircuits()
        {
            var unary  = BuilderHelper.Create1To1(32);
            var binary = BuilderHelper.Create2To1(32);

            ComponentRegistry.CreateNew <IntToFloat>("ifconv", "INT to FLOAT conv", unary);
            ComponentRegistry.CreateNew <FloatToInt>("ficonv", "FLOAT to INT conv", unary);
            ComponentRegistry.CreateNew <Negator>("fneg", "FLOAT negator", unary);
            ComponentRegistry.CreateNew <Adder>("fadd", "FLOAT adder", binary);
            ComponentRegistry.CreateNew <Divider>("fdiv", "FLOAT divider", binary);
            ComponentRegistry.CreateNew <Moduler>("fmod", "FLOAT modulo", binary);
            ComponentRegistry.CreateNew <Multiplier>("fmul", "FLOAT multiplier", binary);
            ComponentRegistry.CreateNew <Subtractor>("fsub", "FLOAT subtractor", binary);
        }
Beispiel #3
0
 internal void CreateMuxC <T>(int channels, int selectorBits) where T : MuxCBase
 {
     ComponentRegistry.CreateNew <T>("muxc" + channels, "MUXC" + channels, BuilderHelper.CreateMuxC(channels, selectorBits));
 }
Beispiel #4
0
 internal void Create2InputGate <T>(string name, int bits) where T : TwoInputGateBase
 {
     ComponentRegistry.CreateNew <T>(name + bits, name.ToUpper() + " " + bits + " Bit", BuilderHelper.Create2To1(bits));
 }
Beispiel #5
0
 internal void CreateTopInputGate <T>(string name) where T : TwoInputGateBase
 {
     ComponentRegistry.CreateNew <T>(name + "1t", name.ToUpper() + " 1 Bit Top", BuilderHelper.CreateTopInputGate());
 }
Beispiel #6
0
 internal void CreateRotate <T>(int bits, int shiftBits) where T : RotateBase
 {
     ComponentRegistry.CreateNew <T>("rotate" + bits, "ROTATE " + bits + " Bit", BuilderHelper.CreateShiftLike(bits, shiftBits));
 }
Beispiel #7
0
 internal void CreateShift <T>(int bits, int shiftBits) where T : ShiftBase
 {
     ComponentRegistry.CreateNew <T>("shift" + bits, "SHIFT " + bits + " Bit", BuilderHelper.CreateShiftLike(bits, shiftBits));
 }
Beispiel #8
0
 internal void CreateRam <T>(int bits) where T : UpdateHandler
 {
     ComponentRegistry.CreateNew <T>("ram" + bits, "RAM " + bits + " Bit", BuilderHelper.CreateRam(bits));
 }
Beispiel #9
0
 internal void CreateRng <T>(int bits) where T : RngBase
 {
     ComponentRegistry.CreateNew <T>("rng" + bits, "RNG " + bits + " Bit", BuilderHelper.CreateRng(bits));
 }
Beispiel #10
0
 internal void CreateAdd <T>(int bits) where T : AddBase
 {
     ComponentRegistry.CreateNew <T>("add" + bits, "ADD " + bits + " Bit", BuilderHelper.CreateAdd(bits));
 }
Beispiel #11
0
 internal void CreateMuxB <T>(int bits) where T : MuxBBase
 {
     ComponentRegistry.CreateNew <T>("muxb" + bits, "MUXB" + bits, BuilderHelper.CreateMuxB(bits));
 }
Beispiel #12
0
 internal void CreateMatrix <T>(int columns, int rowBits) where T : MatrixBase
 {
     ComponentRegistry.CreateNew <T>("matrix" + columns + "x" + (1 << rowBits), "MATRIX " + columns + "X" + (1 << rowBits), BuilderHelper.CreateMatrix(columns, rowBits));
 }
Beispiel #13
0
 internal void CreateMul <T>(int bits) where T : MulBase
 {
     ComponentRegistry.CreateNew <T>("mul" + bits, "MUL " + bits + " Bit", BuilderHelper.CreateMul(bits));
 }
Beispiel #14
0
 internal void CreateInc <T>(int bits) where T : IncBase
 {
     ComponentRegistry.CreateNew <T>("inc" + bits, "INC " + bits + " Bit", BuilderHelper.CreateInc(bits));
 }
Beispiel #15
0
 internal void CreateDiv <T>(int bits) where T : DivBase
 {
     ComponentRegistry.CreateNew <T>("div" + bits, "DIV " + bits + " Bit", BuilderHelper.CreateDiv(bits));
 }
Beispiel #16
0
 internal void CreateDcb <T>(int digits, int bits) where T : DcbBase
 {
     ComponentRegistry.CreateNew <T>("dcb" + digits, "BCD to BIN " + digits + " Digit", BuilderHelper.CreateDcb(digits, bits));
 }
Beispiel #17
0
 internal void CreateCmp <T>(int bits) where T : CmpBase
 {
     ComponentRegistry.CreateNew <T>("cmp" + bits, "CMP " + bits + " Bit", BuilderHelper.CreateCmp(bits));
 }
Beispiel #18
0
 internal void CreateBcd <T>(int bits, int digits) where T : BcdBase
 {
     ComponentRegistry.CreateNew <T>("bcd" + bits, "BIN to BCD " + bits + " Bit", BuilderHelper.CreateBcd(bits, digits));
 }