Administrator
|
This post was updated on .
Let's see if I can come up with an analogy.
Imagine that I am a planner for a community that is going to house around sixty-five thousand people and I want to be really systematic about how to be able to contact any one of them. So I organize my community into a set of identical neighborhoods and in each neighborhood I build a set of identical apartment buildings, each having a fixed number of floors and with each floor having a fixed number of apartments and which apartment having a fixed number of rooms. Perhaps the following:
Each apartment has 4 rooms (need 2 bits).
Each floor has 8 apartments (need 3 bits).
Each building has 16 floors (need 4 bits).
Each neighborhood as 32 buildings (need 5 bits).
The community has 4 neighborhoods (need 2 bits).
So I can identify a given person's room uniquely in the following way:
[neighborhood][apartment][building][floor][apartment][room]
This can be represented as a 16-bit number with the first two bits being the neighborhood ID and so on.
Now imagine that each room has a light in it and I want to be able to turn on exactly one of those lights by setting a sequence of sixteen switches on a board in a central control room. How might I do that?
When I build an apartment, I bring in three lines. Two of them are the address bits for the four rooms and the third tells that apartment whether to pay attention to what is on the room bits (it tells that apartment if it is the one being selected). This additional bit is analogous to the "Load" signal. So now I can run the same two room selection bits to every apartment in the entire community as long as I only turn on exactly one of the apartment select signals. The wiring in the apartment will use those three pieces of information to decide which, if any, of the four rooms to turn the light on in.
So how do I select an apartment?
I do that at the floor level. In addition to the two room-select bits (which it simply routes directly to each apartment), each floor receives the 3-bit apartment ID as well as a floor-select signal. If uses those four bits of information to decide which, if any, of the apartment select lines on it's floor to assert.
Now we keep walking up. All buildings get the same floor, apartment, and room IDs plus an additional signal that indicates if that building is selected. If it is, then it uses the floor ID to assert the appropriate floor-select line.
At the top level, I route the lower 14 bits to all four communities and I use the top 2-bits to decide which of the four neighborhood select lines to assert.
I hope that helps.
|