What is register file?

Thread Starter

vead

Joined Nov 24, 2011
629
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?
 

Thread Starter

vead

Joined Nov 24, 2011
629
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:
A0    A1      D0   D2   Q0   Q1
0       0     x     x     x     x
0       1     x     x     x     x
1       0     x     x     x     x
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
 

hp1729

Joined Nov 23, 2015
2,304
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:
A0    A1      D0   D2   Q0   Q1
0       0     x     x     x     x
0       1     x     x     x     x
1       0     x     x     x     x
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
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.
 

hp1729

Joined Nov 23, 2015
2,304
Design 871 Add R3 to A.PNG
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.
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:

Thread Starter

vead

Joined Nov 24, 2011
629
View attachment 112439

(A very simplified processor.)
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?
 

hp1729

Joined Nov 23, 2015
2,304
Design 874 Register array example.PNG
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.
View attachment 112440
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?
How about this? The instruction register is decoded to yield control functions. The data bus transfers the data.
 

Thread Starter

vead

Joined Nov 24, 2011
629
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?
 

hp1729

Joined Nov 23, 2015
2,304
Design 874 register file example.PNG
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?
Like this?
 

Thread Starter

vead

Joined Nov 24, 2011
629
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
 

hp1729

Joined Nov 23, 2015
2,304
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
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.
 
Top