RAM_Like_Circuit

Thread Starter

GTeclips

Joined Feb 18, 2012
96
Hello,

Sorry for using underscores in the title. I was getting an error when I tried to post this with spaces in the title.

I have a circuit design that I am wishing to construct on a breadboard. The sad thing is I don't actually know what type of circuit it is; the best I could describe it is a small ram circuit. Let me show you the (horribly messy) logic diagram. I'm using a program called Logicly:



Red Box: Inputs.

Black Box: Binary to Base-one. (Don't know if that is the technical name.)

Green Box: Don't know exactly what to call it, processor maybe? It determines what D-latches to write too based on the values from the binary de-compiler (black box).

Blue Box: D-Latches. (D=Data, C=Clock, O=Output. Sorry for the weird labeling.)

Yellow Box: Similar to the green box. It determines what D-Latch values to send to the output based on the values it receives from the binary de-compiler (black box).

Purple Box: Quad-Input OR Gates.

Orange Box: Converts a four bit binary value to Hex then displays it on a 7-seg.

How it works: The black switch, in spite of what it is connected to in the picture, will break the source, resting the D-Latches. The green switches represent a two bit binary value. That value determines what file (I will explain "file" later) is to be displayed/written too. The blue switches represent a four bit binary value. The grey switch writes whatever value is on the blue switches to the file is selected by the green switches.

If you look at the D-Latches, you will notice they are broken up into four four bit blocks, this represents one "file".

The four AND gates between the purple and orange box are completely irrelevant.

I know I likely explained this absolutely horrifically, but if you managed to understand the purpose of this circuit, could you answer some questions for me. If this circuit were in a computer, what would it be called? If I were to construct this on a breadboard, should I use TTL or CMOS, and could I compact it any further while using AND/OR/NOT and D-Latch ICs? Are there any major flaws in this design?

Thanks!
 
Last edited:

MrChips

Joined Oct 2, 2009
30,810
You need some help in learning how to describe a design problem.

Firstly, you define the inputs and the outputs.

Secondly, you learn the difference between combinational logic and sequential logic.
In combinational logic, there is a one-to-one relationship between the outputs and the inputs independent of time.

In sequential logic, not only is the output a function of the inputs, it is also a function of the previous output. That is, the sequence of events comes into play. (I mention this so that you recognize which part of your circuit is combinational and which is sequential.)


Inputs:

RESET
CLOCK
ADDRESS[1:0]
DATA[3:0]

Outputs:

OUTPUT[3:0]


ADDRESS[1:0] refers to a 2-bit address which we can label as A1, A0

DATA[3:0] refers to a 4-bit address which we can label as D3, D2, D1, D0

OUTPUT[3:0] refers to a 4-bit output which we can label as Q3, Q2, Q1, Q0.

Your black box is called a 2-to-4 decoder

Your green box does not have a name because it is not necessary. You will connect D3-D0 directly to the D-inputs of the D-Latches. You will use the A1, A0 address to select which register receives the CLOCK signal.


Your blue box is called a Quad 4-bit D-register

Your yellow box is called a Quad 4-to-1 multiplexer.

You can call the whole thing a Quad 4-bit register file.

All of this can be implemented in one chip such as a FPGA or a microcontroller.

If you are going to build this from separate ICs use CMOS for lower power consumption.
 

Thread Starter

GTeclips

Joined Feb 18, 2012
96
Thank you very much Chip! It really does mean a lot that you are willing to lay this all out to me considering I know just about nothing.

The labeling system you described makes perfect sense.

There are three things that still have me confused. Why does it matter whether I know what parts of the circuit are sequential and combinational? What practical effect does that knowledge have? Secondly, if I don't have the green box, how can I implement the Clock input (grey switch)? Lastly, what is the physical difference in circuitry between RAM and a register?

Thanks again Chip for enduring my stupidity.
 

LDC3

Joined Apr 27, 2013
924
There are three things that still have me confused. Why does it matter whether I know what parts of the circuit are sequential and combinational? What practical effect does that knowledge have?
Secondly, if I don't have the green box, how can I implement the Clock input (grey switch)?
Lastly, what is the physical difference in circuitry between RAM and a register?
Sorry I can't answer the first one.
Actually, you can decrease the number of AND gates to 1/4 the number. If you notice, there are 4 AND gates with high on both lines when the clock is high (this clocks the four Data Registers). You only need the 1 AND gate fanning out to the 4 Data Registers.

I think you could say that a register contains data and RAM consists of many registers.
 

Thread Starter

GTeclips

Joined Feb 18, 2012
96
Thank you very much for that catch LCD3, I completely missed that! I would have wasted 12 AND gates for that! Thanks for clarifying the difference between RAM and registers too.
 

Austin Clark

Joined Dec 28, 2011
412
Check out my favorite logic simulator, called Logisim: http://ozark.hendrix.edu/~burch/logisim/

It might not look as pretty, but it's a TON faster, has a ton more built-in components, has built-in simplification software and in/out table generation, has text inputs, displays, etc; And, lastly, has the ability to encapsulate entire circuits into they're own components. For example, you could encapsulate your entire circuit here into a single box with the same functionality, and use that later as a component itself.

Oh, and it's free and open-source!
 
Top