Exemple #1
0
        private static List <FIRIO> CreateIO(FIRIO inputType, int addressWidth, FIRRTLNode node)
        {
            FIRIO dataOut = inputType.Flip(node);

            dataOut.SetName("rdata");

            FIRIO dataIn = inputType.Copy(node);

            dataIn.SetName("wdata");

            FIRIO mask = inputType.Copy(node);

            mask.SetName("wmask");
            AsMaskType(mask);

            List <FIRIO> io = new List <FIRIO>();

            io.Add(new Input(node, "wmode", new UIntType(1)));
            io.Add(dataOut);
            io.Add(dataIn);
            io.Add(mask);
            io.Add(new Input(node, "addr", new UIntType(addressWidth)));
            io.Add(new Input(node, "en", new UIntType(1)));
            io.Add(new Input(node, "clk", new ClockType()));

            return(io);
        }
Exemple #2
0
        public Vector(FIRRTLNode node, string name, int length, FIRIO firIO) : base(node, name)
        {
            if (!firIO.IsPassive())
            {
                throw new Exception("IO type of vector must be passive.");
            }

            this.IO = new FIRIO[length];
            for (int i = 0; i < IO.Length; i++)
            {
                IO[i] = firIO.Copy(node);
                IO[i].SetName(i.ToString());
                IO[i].SetParentIO(this);
            }
        }
Exemple #3
0
 private MemoryIO(FIRRTLNode node, string name, List <FIRIO> io, FIRIO inputType, int addressWidth, List <MemPort> ports) : base(node, name, io)
 {
     this.Ports        = ports;
     this.InputType    = inputType.Copy(null);
     this.AddressWidth = addressWidth;
 }