flat assembler
Message board for the users of flat assembler.

Index > Main > cpu lines?

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
When cpu wants to read or write data to memory, how is it happening?
I know 2 lines exists, address line and data line.
Does CPU first send address of accessed memory on address line, and then reads data to get its contents?
Same as in write, but other pair of lines used?
I need to understand it in general.
Post 11 Mar 2011, 20:06
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
the lines you are speaking about are BUSes

there are 3 BUSes out of a CPU (every CPU in the Von neumann architecture).
DATA bus ;64 wires
Adress bus ;depend on implementation, mainly 32-3 bits (4Gbytes), and in IA32-64, mainly 64Gbytes.
Control bus ;depend on implementation

adress bus is emitted by CPU, and just gives the signal of WHAT adress in RAM to act on.
data bus is controled by CPU and (theorically) RAM
control bus is controled by CPU, peripherals and others things. used to say, read, write, I/Oports, irq, etc...
Post 11 Mar 2011, 20:38
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
You should google "CPU Architecture" for more info.
This diagram illustrates edfed's response but for an 8-bit CPU with only an 8-bit address bus too, so it could only support 2^8 = 256 bytes of RAM and also 256 I/O ports.
One of the control bus lines is RW Read/Write which sets the direction of the bidirectional data bus buffers, either into (Read) or out of (Write) the CPU.
Another control line on Intel CPU's is IO/M which selects IO port buffers or RAM. CPU's with pure memory-mapped I/O architectures don't have this.


Description: Simplified 8-bit CPU Architecture
Filesize: 26.53 KB
Viewed: 2184 Time(s)

cpuarchitecture.PNG



_________________
FAMOS - the first memory operating system
Post 11 Mar 2011, 20:57
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17249
Location: In your JS exploiting you and your system
revolution
Note that later CPU interconnect architectures are much more complex. The traditional parallel buses (as shown above) are becoming less common and in some systems have been completely replaced by new types. So, check your system hardware first before assuming you have such a bus.
Post 24 Mar 2011, 02:24
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.