Exemplo n.º 1
0
        public Wire(string name, FIRIO inputType, FirrtlNode defNode) : base(defNode)
        {
            if (!inputType.IsPassiveOfType <Input>())
            {
                throw new Exception("Wire input type must be a passive input type.");
            }

            this.Name   = name;
            this.In     = inputType.Copy(this);
            this.Result = inputType.Flip(this);
            AddPairedIO(In, Result);

            In.SetName(Name + "/in");
            Result.SetName(Name);
        }
Exemplo n.º 2
0
        public Memory(string name, FIRIO inputType, ulong size, int readLatency, int writeLatency, ReadUnderWrite ruw, FirrtlNode defNode) : base(defNode)
        {
            if (!inputType.IsPassiveOfType <Input>())
            {
                throw new Exception("Input type must be a passive input type.");
            }

            this.Name         = name;
            this.InputType    = inputType.Copy(this);
            this.Size         = size;
            this.ReadLatency  = readLatency;
            this.WriteLatency = writeLatency;
            this.RUW          = ruw;
            this.MemIO        = new MemoryIO(this, name, new List <FIRIO>(), InputType, GetAddressWidth());
        }