1 Reply Latest reply on Oct 31, 2012 9:12 AM by kishore.kumar

    Storing values to D0/D1 register in Datapath


      HI fellow programmers,


      I am doing some datapath and verilog programming and I needed help with the transferring of data. As you all know, all computation are stored inside the A0/A1 register. However, I am interested in pushing this data to D0/D1 register so that I can carry on with more computation on the A0/A1 registers. I have already used up the 4 bytes in FIFO. So is there anyway I can transfer the data from A0/A1 to D0/D1?

        • 1. Re: Storing values to D0/D1 register in Datapath

           As shown in the attached picture "Datapath.png", ALU output can be written directly into FIFO0 or FIFO1 or Accumulator0 or Accumulator1 only. It is not possible to directly write the ALU output into Data registers.




          So the simplest option is to move the ALU output into any of the FIFOs and then move it Data registers using another state of Datapath. But you are already using FIFOs for some other purpose and data is there in FIFOs as well. So you can trigger a DMA to move the data from Accumulator register to put into Data register externally. In the Verilog code, wait for DMA transaction complete signal to make sure that data has been copied onto Data register.