What is register file?

Discussion in 'General Electronics Chat' started by vead, Sep 22, 2016.

  1. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    Hello
    I am trying to understand what is actually logic behind register file. I understand the what is register. Register is use to store data. I am explaing my understanding with example
    4 bit register meaning
    It has 4 data input pins
    It has 4 data out pins
    It has clock and enable pins
    _20160922_220818.JPG
    Can someone explain with example?
     
  2. dl324

    Distinguished Member

    Mar 30, 2015
    3,249
    626
  3. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    I have been seen that link. But I am not clear exactly what they do, Okey look my another effort I am not sure?
    Register file
    Address is 2 bit wide
    Data input is 2 bits
    Data output is 2 bits
    Input enable pins
    Code (Text):
    1. A0    A1      D0   D2   Q0   Q1
    2. 0       0     x     x     x     x
    3. 0       1     x     x     x     x
    4. 1       0     x     x     x     x
    5. 1       1     x     x     x     x
    If address 00 and data 00 than output will 00. If address 01 and data 01 than output will 01
     
  4. hp1729

    Well-Known Member

    Nov 23, 2015
    1,957
    219
    Sounds like you are getting there. My advice is to sit down and play with one. Breadboard with digital lab setup (switches and LEDs and appropriate circuits suggested.
    A 16 x 4 register file is simply16 four bit registers. In a microcontroller circuit these would be the general purpose registers the instructions could reference.
     
  5. hp1729

    Well-Known Member

    Nov 23, 2015
    1,957
    219
    Design 871 Add R3 to A.PNG
    Example of a register file in use. The instruction specifies the operation to be performed and what register is to be used. In this case we Add Register 3 to the Accumulator. (A very simplified processor.)
    In other instructions we might Move Accumulator to Register2, or subtract Register 0 from the Accumulator, or :logically AND Register 1 with the Accumulator.
    The magic is in the timing of when we latch data into devices or when we enable outputs of devices.
     
    Last edited: Sep 23, 2016
  6. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    Hello "hp1729
    First of all, thank you very much for helping. I appreciate your help. I saw your diagram, there is accumulator instructions register. I don't see any logic. Still I have confused how do you know in register file that it's R1,R2 or R3. Iook my handy. diagram does it make any little sense? I am using registers in place of register file.
    _20160922_174512.JPG
    I don't understand logic of register file so I am using register that has input data pins, data output pins, enable pin, and enable output pin. I want that my circuit should do following function
    Put immediate data to R1
    Put immediate data to R2
    Mov R1,R 2
    MovR2,R 1
    I understand if MOV R1,R2 than Enable R1 out, enable R2 pin and if MOV R2,R1 Enable R2 out, enable R1. I don't understand logic of signal when we put data to registers?
    How to connect control signals so that it can do that four function?
     
  7. hp1729

    Well-Known Member

    Nov 23, 2015
    1,957
    219
    Design 874 Register array example.PNG
    How about this? The instruction register is decoded to yield control functions. The data bus transfers the data.
     
  8. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    Hello "hp1729
    if there is program memory and program counter in your design. Than I want to see you how would you connect data register and instruction register ?
    I think 4 bit data bus should be connect at input of instruction register. If possible, could you connect program counter and program memory in your design?
     
  9. hp1729

    Well-Known Member

    Nov 23, 2015
    1,957
    219
    Design 874 register file example.PNG
    Like this?
     
    vead likes this.
  10. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    I like this but I have some questions on your design
    I think you are using 16 bit counter
    8 bit data bus
    16 bit address bus
    How many bit of your counter and program memory ?
    There is no connection for data register?
    What do you mean by instruction decode? Are you using decoder or just using logic sequence to enable or disable register
     
  11. hp1729

    Well-Known Member

    Nov 23, 2015
    1,957
    219
    General design. no specific bit length in mind. The original question was about Register files. A full 8 bit computer would not fit on the screen. Instruction decoding is very simplified. In a RISC design it might be simple. In a CISC design it could be complex.
    I have to make it fit on one screen and be readable.:)
    A 16 bit minicomputer in TTL takes up a dozen pages at 11 x 17 size paper.
     
    vead likes this.
  12. vead

    Thread Starter Active Member

    Nov 24, 2011
    621
    8
    Also I am trying to same
     
  13. hp1729

    Well-Known Member

    Nov 23, 2015
    1,957
    219
    You want to build a computer in TTL chips? Start with my first schematic and the 74181. It is a better example of the use of the register array. Do you want to start on the 74181?
     
Loading...