Ejemplo n.º 1
0
        /// <summary>
        /// Constructs a new instance.
        /// </summary>
        /// <param name="dataWidth">bit-width of operand</param>
        /// <param name="pipelineDepth">number of pipeline stages, i.e. computation latency</param>
        public Shifter(int dataWidth, int pipelineDepth)
        {
            DataWidth     = dataWidth;
            ShiftWidth    = MathExt.CeilLog2(dataWidth);
            PipelineDepth = pipelineDepth;

            _y    = new SLVSignal(DataWidth);
            _pad  = StdLogicVector._0s(DataWidth);
            _pipe = new RegPipe(PipelineDepth, DataWidth);
            Bind(() => {
                _pipe.Clk  = Clk;
                _pipe.Din  = _y;
                _pipe.Dout = Y;
            });
            TASite = new ShifterTransactor(this);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructs a new instance.
        /// </summary>
        /// <param name="dataWidth">bit-width of operand</param>
        /// <param name="pipelineDepth">number of pipeline stages, i.e. computation latency</param>
        public Shifter(int dataWidth, int pipelineDepth)
        {
            DataWidth = dataWidth;
            ShiftWidth = MathExt.CeilLog2(dataWidth);
            PipelineDepth = pipelineDepth;

            _y = new SLVSignal(DataWidth);
            _pad = StdLogicVector._0s(DataWidth);
            _pipe = new RegPipe(PipelineDepth, DataWidth);
            Bind(() => {
                _pipe.Clk = Clk;
                _pipe.Din = _y;
                _pipe.Dout = Y;
            });
            TASite = new ShifterTransactor(this);
        }