[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correct IDSEL generation/identification.. ??



Hello Abraham,

> the host-pci bridge decodes the "device number" in the
> 32 bit address (config. access to address port) it
> gets from the CPU and uses one of the AD11-AD31 lines
> (or more practically AD16-AD31 AD lines) for
> generating IDSEL during address phase of conf/
> transaction instead of using a separate IDSEL signal.
> this IDSEL acts as a chip select for any one of
> various devices in the bus. in modern PCs, the IDSEL
> of the 1st device on the bus (which i believe means
> the 1st slot?? -- clarify if incorrect) is connected

There is no specific requirements on slot enumeration at all.
Device 1 on the bus may be a system device (i.e. integrated
on the mainboard) or it may be an add-on card plugged into
any PCI slot (normally into the first or into the last one). All
the cases are not uncommon.

> (/resistively coupled???) to AD16, 2nd to AD17 and so
> on...

The spec. proposes to route IDSEL to AD[31:11] and one
can mitigate the additional load on AD lines by resistively
coupling the IDSEL to the corresponding AD line. This
would introduce a very slow switching rate on IDSEL
however. In many systems it is done so (differing only in
which AD lines are used) but the spec. does not insist on
this implementation.

> my doubt is: if we need to tell our target device to
> use a particular AD line as chip select for it, how do
> we know which AD line to tell it bcos this may change
> if we change the slot in which we put our pci card?
> won't our device work if placed on any other slot (ie,
> if it takes any other device number??) bcos the the

The IDSEL is a distinct pin on the PCI connector. An add-on
card has no need to know which signal is routed to IDSEL.
I have seen only systems where the AD lines were used for
decoding the device number but there might be (at least,
theoretically) systems where device number being transmitted
using separate IDSEL lines.

> logic for decoding the IDSEL is "burn"t inside the
> target device... say, we could tell our card to OK a
> config access if AD16 line is asserted. what if this
> card is put in the next slot? in this case it won't
> work.. it will work only if AD17 is asserted since
> this is the way that the H/PCI bridge generates IDSEL.

In one slot the IDSEL is routed to AD16 and a device in
this slot has, say, number 1 (but the device does not know
it all). If it is then plugged into the next slot, then perhaps
the device's IDSEL is now connected to AD17 and the
device has now number 2 (but it still does not know it all,
it simply sees its IDSEL). Of course, the device's driver
will find then the device having its device number changed.

> what is the way around this? what's wrong in my
> understanding? if there is no fixed logic to
> understand which AD line is meant for our device, how
> does the right IDSEL reach the right device?

I hope this helps.

Regards,
Alexander