8-bit computer RAM intro
Summary
TLDRThis video script delves into the construction of a 16-byte memory system using 8-bit registers, each with a write and enable signal. It explains the concept of static and dynamic RAM, highlighting the differences in complexity and speed. The script introduces the 74 LS189 chip, a 64-bit RAM chip, and outlines its use in building an 8-bit, 16-byte memory system. It also discusses the necessity of inverting the chip's output due to its inverse logic and the importance of address decoding for memory access.
Takeaways
- 😀 The video discusses the construction of a bit register with a single input and output, which can store one bit of data.
- 🔧 The interface for the bit register includes an input, an output, a write signal, an enable signal, and a clock signal.
- ⏱️ The clock signal is crucial for making the register synchronous, ensuring data is only read on the rising edge of the clock.
- 📈 The video then scales up to an 8-bit register, which operates on the same principles but can store eight bits of data at once.
- 💾 To build computer memory, the concept is extended to create an 8-bit storage unit replicated multiple times to store multiple bytes.
- 🔑 Each memory location has a separate write and enable signal, allowing individual control over each storage unit.
- 🔄 The video introduces the concept of Dynamic RAM (DRAM) and Static RAM (SRAM), explaining their differences in refresh mechanisms and use cases.
- 🛠️ The 74LS189 chip is introduced as a convenient way to build memory, being a 64-bit random access memory chip that can be used to create the desired 16-byte memory.
- 🔢 The chip uses a 4-bit address to select which of the 16 memory locations is being accessed, simplifying the control mechanism.
- ⚙️ The video concludes with a discussion of the pinout and functionality of the 74LS189 chip, including its use of inverse logic for outputs and the need for inverter chips.
Q & A
What is the primary function of a bit register?
-A bit register is used to store one bit of data. It has a single input and a single output, with an LED indicating the stored bit. The interface includes an input, an output, a write signal, and an enable signal.
How does the write signal affect the bit register?
-The write signal, when active, allows the bit register to store whatever is coming into the input.
What is the role of the enable signal in the bit register?
-The enable signal, when active, sends the bit stored in the register to the output.
Why is the clock signal important for a synchronous register?
-The clock signal is important because it synchronizes data storage with the rising edge of the clock, ensuring that data is only read or written at specific times.
How does an 8-bit register differ from a 1-bit register?
-An 8-bit register stores eight bits of data instead of one, but it operates on the same principle with enable and write signals. The difference is that it has eight inputs and eight outputs, all managed through a bus.
What is the purpose of building a 16-byte memory?
-A 16-byte memory is built by replicating the 8-bit storage units 16 times, allowing the storage of 16 bytes of data. Each byte has its own write and enable signals.
What is the difference between Dynamic RAM and Static RAM?
-Dynamic RAM requires constant refreshing to maintain data because it uses a capacitor that discharges over time. Static RAM, on the other hand, does not need refreshing as it typically uses flip-flop circuits that retain data as long as power is supplied.
Why is Static RAM more expensive than Dynamic RAM?
-Static RAM is more expensive because it uses more transistors and has more complexity in each memory cell compared to Dynamic RAM.
How does address decoding logic help in memory management?
-Address decoding logic allows the selection of specific memory locations using an address. It uses AND gates and the address signals to enable the appropriate memory location for reading or writing.
What is the 74LS189 chip and how does it relate to the memory discussed in the script?
-The 74LS189 is a 64-bit random access memory chip. It is used to build an 8-bit, 16-byte memory by using two of these chips, as each chip provides half the required memory width.
Why are inverters needed when using the 74LS189 chip?
-The 74LS189 outputs the inverse of the stored value. Inverters are needed to re-invert these outputs to match the stored values.
Outlines
💾 Introduction to 1-bit and 8-bit Registers
The paragraph introduces a 1-bit register with a single input and output, represented by an LED, which stores one bit of data. It explains the interface of the register, including the input, output, write signal, and enable signal. The write signal stores data when active, and the enable signal sends the stored data to the output. The paragraph also mentions the clock signal's role in synchronizing data storage with the rising edge of the clock, making it a synchronous register. The discussion then moves to an 8-bit register, which operates on the same principles but stores eight bits of data. The input and output are through a bus, and there's a separate write and enable signal for each bit. The paragraph concludes with a transition to building memory for a computer by replicating the 8-bit storage units, with separate write signals for each memory location.
🔌 Building a 16-Byte Memory with Address Decoding
This paragraph delves into constructing a 16-byte memory by replicating the 8-bit storage units. Each unit has its own write signal, and the memory is expanded to 16 locations, each with a unique write signal. The concept of 'words' in memory is introduced, explaining that each row represents a word, and in this case, each word is 8 bits long. The paragraph then discusses the practicality of building such memory with transistors and capacitors, noting the limitations of capacitors that require constant refreshing to maintain data. The difference between Dynamic RAM (DRAM), which requires refreshing, and Static RAM (SRAM), which does not, is explained. The decision to use SRAM for the computer being built is justified due to its simplicity and lack of need for a refresh circuit. The paragraph concludes with an introduction to address decoding logic, which uses a 4-bit address to select which of the 16 bytes to read or write, and explains the logic behind enabling specific memory locations based on the address.
🛠️ Implementing Memory with 74LS189 RAM Chip
The final paragraph discusses the practical implementation of the 16-byte memory using the 74LS189 RAM chip, which is a 64-bit random access memory. The chip's 4-bit width is noted, and it's mentioned that two chips are required to achieve the desired 8-bit width for the 16-byte memory. A block diagram from the data sheet is referenced to explain the chip's internal structure, including the 16-word by 4-bit memory cell array, chip select, and write enable signals. The pinout of the chip is described, highlighting the address lines, inputs, and outputs, with a special note on the inverse logic of the outputs, which requires the use of inverter chips to obtain the correct data. The paragraph ends with a plan to wire up the chip in the next video and begin building the computer's RAM.
Mindmap
Keywords
💡Bit Register
💡Enable Signal
💡Write Signal
💡Clock Signal
💡8-bit Register
💡Memory Cell
💡Static RAM (SRAM)
💡Dynamic RAM (DRAM)
💡Address Decode Logic
💡74LS189
Highlights
Introduction to a single-bit register with a single input and output, storing one bit of data.
Explanation of the interface for the bit register, including input, output, write, and enable signals.
Discussion on the role of the clock signal in synchronous registers.
Transition from a single-bit to an 8-bit register, maintaining similar functionality but with eight data bits.
Concept of a memory system built by replicating 8-bit storage units.
Description of a 16-byte memory system with separate write and enable signals for each memory location.
Introduction to the concept of bit lines and word lines in memory architecture.
Comparison between dynamic and static RAM, including their refreshing mechanisms and use cases.
Explanation of how static RAM is used for the computer being built due to its simplicity and lack of need for refresh circuits.
Overview of the process to encode memory addresses using a 4-bit address to select one of 16 bytes.
Introduction to address decode logic using AND gates to determine which memory byte is being accessed.
Discussion on the practicality of building memory by hand versus using integrated circuits like the 74 LS189.
Explanation of the 74 LS189 chip, a 64-bit random access memory, and its suitability for building an 8-bit, 16-byte memory.
Details on the pinout of the 74 LS189, including address lines, inputs, outputs, and control signals.
Mention of the need for inverter chips due to the inverse logic of the 74 LS189 outputs.
Plan for the next video to wire up the 74 LS189 and start building the computer's RAM.
Transcripts
so in a previous video we made this one
bit register and it's got a single input
a single output here is the LED and it
stores one bit of data and just as kind
of a reminder uh basically the interface
for this is we've got our input our
output we've got a right signal which uh
if this is active then it it stores
whatever is coming in our input and we
have an enable signal which when this is
active it sends whatever bit is stored
in here to our output and of course the
registers we've been building also have
a clock signal which uh for the for this
video I'm going to kind of sidestep but
just as a reminder you know the the
clock uh makes this a synchronous
register uh because it even if or when
the the the right signal is active it
still only reads data at the on the
rising edge of the clock so it's
synchronous in in the sense that it's
synchronized with this clock for for for
when it's storing data uh but but for
now just to simplify things I'm not
including the clock here we'll come back
to that in a future video we talk more
about the actual implementation of our
memory and of course after we
implemented a 1 bit register we then
went on to implement an 8bit register
which you know we've got a couple of
them here we've got you know this is our
a register this is our B register uh
down here and it's the same idea uh it
stores eight bits of data instead of one
bit um but we still have our enable
signal we still have our right signal
and then of course we have our clock in
here as well which is this white wire uh
and in this case input and output are
are through the bus so we have our eight
bits of input and output
so it's essentially the same idea as
our single bit register input output
right and enable but now we've got eight
of them uh so we have our eight inputs
our eight outputs uh we have a write and
an enable that uh either writes a whole
bite into into all of these or enable it
outputs the whole bite from all of these
now if we want to build a memory for our
computer basically we can do the same
thing and just replicate that 8bit
storage as many times as we want to as
we want bytes that we want to store so
in our case we're going to build a 16
byte memory so we could essentially
replicate 16 essentially registers I
guess 8 bit register 8 bit storage units
um and we have a separate right signal
for each of those registers so right
zero will write into this first uh
memory location right one will write
into the second one if this uh right two
is active it wres into the third one and
so on all the way up to right 15 which
writes into this last the 16th uh bite
down here and you can see the eight bits
that make up the bite are connected to
each of these and you know we'd either
we'd either have one of these enable
signals active you know one of these 16
enable signals active in which case we
would be reading um whichever whichever
bite is enabled so if we have enable one
that's this bite here this row uh is
enabled then it would be outputting
each of its bits onto each of our eight
uh bit lines so these these vertical
lines we can call those bit lines and
then these horizontal uh uh rows are
essentially our words um you know each
one is a bite but uh generally it's
referred to as a word um because it
could be a different length depending on
the memory in our case our memory is is
8 bit words but you could get memory
that's 16bit words or 32-bit words or so
on and so each of these uh memory cells
each of these little boxes here is a
memory cell and in our case we're going
to build these or we're going to we're
going to use something that's very
similar to the registers that we used
which you know at its core is
essentially a uh latch which is able to
store one bit of data um in uh you know
practical memory that that you might
that you might have in in your computer
or for example the computer that I'm
using to edit this video on I have 16 GB
of memory in that computer so that would
be 16 billion of these rows essentially
uh which is which is a lot um I
certainly wouldn't want to build it like
this um but you can imagine you know the
these these flip flops are fairly
complex I mean you know you've seen the
the one that we built here you know six
well 16 billion bytes that's 128 billion
memory cells so you wouldn't want to
build 128 billion of these that
certainly wouldn't work very well um of
course you know it can be miniaturized
and all the rest but but even that is a
fairly complex circuit to store one bit
so most memory you know the memory in in
my computer uh that I'm editing this
video on for example uh uses you know
essentially the the simplest way of
storing a bit which is essentially each
of these cells is uh you know just a a
single transistor and a capacitor and
the the bit is stored as a charge on the
capacitor now one drawback of that is
that the capacitor will discharge over
time you know after a few seconds it'll
lose its charge and so you can only
store a bit in here for you know a
couple seconds at most um
but one way to get around that is have a
separate circuit that basically read
each bite of memory and then writes that
same bite back into that same memory
location and so you have a separate
circuit that's just doing that
constantly it's just going through all
of memory it's reading every bite and
then it's writing the exact same data
back to that bite and so it's refreshing
what's in each of those bits so even
though uh you know a capacitor could
only store that data for you know at
most a couple seconds because we're
reading and writing that many times a
second it's keeping that data refreshed
but because we have to continually uh
refresh it like that um this is referred
to as Dynamic Ram um it's dynamic
because if you don't refresh it you lose
the data that's in it um whereas if we
used a a flip-flop uh circuit or
something like we've been building with
our registers uh as you know once you
store a bit of data in here it stays
there uh essentially forever until we
take the power away so as long as this
is powered up we don't have to
constantly refresh this or anything we
store the bid in there it stays it stays
there um and so this is if we're using
this type of memory cell uh that's
referred to a static RAM and that's what
we're going to do for our computer and
it's you know static Ram is generally
more expensive than Dynamic Ram because
you need a lot more transistors you know
there's a lot more complexity to each
memory cell in in static Ram uh it has
some advantages right you don't have to
do the refresh although that's you know
fairly easy to do that you know
certainly in a larger larger scale
computer uh but it's also generally
faster um so you see static RAM used in
special applications where you need
really fast memory access of course we
don't really care about speed for the
computer we're building uh so um you
know we're we're basically using static
Ram just because it's more convenient
because we don't want to have to build
that that refresh circuit so for our
computer you know easy way to think of
it is is each of these byes is
essentially just like the registers that
we've already built so you already know
how these work um the thing that's a
little bit weird now is that we have a
separate right signal for each of our 16
bytes of memory and we have a separate
enable enable signal for each of our 16
bytes of memory and so that could get a
little bit unwieldy um so what we'd like
to do is be able to encode which of
these 16 bytes we're reading or writing
from using an address because you can
represent a number from 0 to 15 using
just a 4-bit
address so the way we can do that is
using this address decode logic where we
have four address signals and these four
bits essentially represent which address
you know which of the 16 bytes uh in
memory we want to we want to talk to and
our address decode logic starts out by
you know basically giving us the address
signals and then an inverted copy of the
address signals so we have a z and
inverse of a z A1 inverse of A1 A2
inverse of A2 A3 inverse of A3 and then
we just have a bunch of and Gates and so
if uh if we and together the inverses of
a0 A1 A2 and
A3 this and gate will only turn on if
all of these address addresses are zero
so if it's 0 0 0 0 then this and gate
turns on and our enable zero comes on
and so that would be our enable zero
that would enable this
this this first row in our address in
our
memory if we had one 0 0 0 so a binary
of one um
then then this and gate wouldn't be on
but this one would be because a z is one
and then the inverse of a A1 A2 and A3
is also one because A1 A2 and A3 are
zeros so we have 1 0 0 0 then this is
this all all of these signals is are on
and so this andate turns on and so now
we're enabling reading from byte one
which is our second bite here in memory
uh and so on so you know enable two is
you know 0 1 0 0 is essentially what's
coming in on our address lines over here
for three it's 1 1 0 0 which is binary
for three for four it's 0 0 1 0 and so
on and so on until we get down to um our
16th byte which is you know 15 uh
because we're zero based uh and then in
that case if our address lines are one
one one one then this last one comes on
we have enable 15 and that enables
reading from our our 15th row here and
of course this is for our enables and we
because we're also anding it with our
enable signal down here at the bottom uh
and so we'd have something similar for
the right lines as well so we'd have you
know all of these same things Ed uh in
the in kind of a similar way with with
our uh with our right signal down here
instead of the enable signal this is
essentially how we would go about
building a 16 by memory now we could do
this you know by hand and build 128 of
these uh of these individual memory
cells uh but now that you kind of have
an understanding of how it works I'm
actually going to use a chip that does
this for us and that's the 74 LS
189 um which if you can't find that you
can also use the 74 189 without the ls
um for some reason that's that one's
easier to find but uh if you can find
the ls 189 that's that's fine too um but
this is a 64-bit random access memory
and of course with 8 bits per BTE and 16
bytes that's 8 * 16 is 128 bits um and
this is only 64 bit and that's because
it uh essentially has a four bit um it's
four bits wide instead of 8 Bits wide
but if we use two of these chips uh then
we'll be able to build our eight or 8bit
16 by memory and so if we take a look at
the data sheet here they have a block
diagram on the back of what's going on
here and you can see they have a 16w by
4bit memory cell array and that's you
know basically what we have here of
course we have a 16 word by 8 bit so
they're basically just giving us half of
this U which is fine because we can use
two
chips and you can see they have the four
bits coming in they've got the four bits
coming out and there's a chip select and
write enable uh signals that uh enable
whether we're we're reading or writing
from this and then you can see the four
address lines and you know they just
have this address decoder as a block but
of course you know we just went through
how that works this is essentially what
that address decoder is doing or
something very similar to
this and so if we look at the the pin
out here just to get a sense of what's
going on you can see you know like most
of these chips we've got our voltage and
our ground to power the chip uh but then
we've also got our address lines a0 A1
A2 and A3 are our address lines
to select which of the rows we're going
to be reading or writing
from um and then we have our inputs you
know D1
D2 uh D3 and D4 are inputs so that's
kind of coming in the top
here and then we have our outputs 01 O2
03 and 04 and something that's uh a
little bit interesting here that we're
going to have to account for is you'll
notice that our outputs have a little
bar over over them and because this chip
for whatever reason uh the outputs give
you the inverse of whatever is stored in
that memory location so you know we're
going to have to end up uh putting these
outputs through an inverter because you
know we want to store we want to get the
same value out that we stored we don't
want to get the inverse of the value out
uh so we're going to have to use some
inverter chips to to sort of re un
invert these I guess um so we have our
our inputs our outputs our address lines
and then the only other pins on here are
this CS which is Chip select and that's
essentially the enable so whenever it's
an inverse signal so whenever it's low
it's active um which means that when
that's low then we're going to get um
data out of our outputs uh so in our
case we'll just we'll just tie that low
all the time and then we'll use a a
Tri-State buffer like we have for our
other registers um and then write enable
and this is also an inverse logic so
when it's low then it's reading in um
from our from our inputs and writing it
to whatever location in memory is
addressed from our address lines and so
that's the basics of how the 74 LS 189
works and so in the next video we'll uh
uh wire this up and and play around with
it and and start to build our our RAM
for our computer
5.0 / 5 (0 votes)