8-bit vs. 16 bit ISA bus port writes?

8-bit vs. 16 bit ISA bus port writes?

Post by Steve Heldin » Mon, 07 Feb 2000 04:00:00



I'm working on a custom ISA board that is supposed to perform 16-bit ISA

bus writes.  It has 4 IO ports (base_address, base_address+1,
base_address+2 and base_address+3) that are each supposed to be able
read/write 16 bits.  From the mini-HowTo on IO-Port-Programming by Riku
Saikkonen (second page) it speaks of using INW to read 8 bits from port
x and then 8 bits from port x+1.  My confusion stems from the fact that
on our custom ISA board we are supposed to be able to perform 16 bit
transfers to any of the 4 ports.  So if the base address is 0x300 we
should be able to write 16 bits to 0x300, 16 bits to 0x301 etc.  My
first question is, is this possible in the ISA architecture and then, if

so, are inw and outw the correct instructions for doing so?  It doesn't
seem to be the case based on the HowTo.

 
 
 

8-bit vs. 16 bit ISA bus port writes?

Post by Mark Gra » Mon, 07 Feb 2000 04:00:00



> I'm working on a custom ISA board that is supposed to perform 16-bit ISA
> bus writes.  It has 4 IO ports (base_address, base_address+1,
> base_address+2 and base_address+3) that are each supposed to be able
> read/write 16 bits.  From the mini-HowTo on IO-Port-Programming by Riku
> Saikkonen (second page) it speaks of using INW to read 8 bits from port
> x and then 8 bits from port x+1.  My confusion stems from the fact that
> on our custom ISA board we are supposed to be able to perform 16 bit
> transfers to any of the 4 ports.  So if the base address is 0x300 we
> should be able to write 16 bits to 0x300, 16 bits to 0x301 etc.  My
> first question is, is this possible in the ISA architecture and then, if
> so, are inw and outw the correct instructions for doing so?  It doesn't
> seem to be the case based on the HowTo.

A lot of boards have an internal flip-flop when they use the same port
for more than one byte, so you need two inb's from the same port to
get a 16 bit value.

You really should read the Intel manuals -- From Intel Architecture
Software Developer's Manual Volume 1 Basic Architecture, section
9.3. I/O ADDRESS SPACE (24319001.PDF when I got mine, but they keep
updating them.)

[snip]
The processor's I/O address space is separate and distinct from the
physical-memory address space. The I/O address space consists of 2^16
(64K) individually addressable 8-bit I/O ports, numbered 0 through
FFFFH.  I/O port addresses 0F8H through 0FFH are reserved.  Do not
assign I/O ports to these addresses.  The result of an attempt to
address beyond the I/O address space limit of FFFFH is implementation-
specific; see the Developer's Manuals for specific processors for more
details.

Any two consecutive 8-bit ports can be treated as a 16-bit port, and
any four consecutive ports can be a 32-bit port.  In this manner, the
processor can transfer 8, 16, or 32 bits to or from a device in the
I/O address space.  Like words in memory, 16-bit ports should be
aligned to even addresses (0, 2, 4, ...)  so that all 16 bits can be
transferred in a single bus cycle.  Likewise, 32-bit ports should be
aligned to addresses that are multiples of four (0, 4, 8, ...).  The
processor supports data transfers to unaligned ports, but there is a
performance penalty because one or more extra bus cycle must be used.
[end quote]

 
 
 

1. 16 bit vs. 8 bit ISA bus question

I'm working on a custom ISA board that is supposed to perform 16-bit ISA
bus writes.  It has 4 IO ports (base_address, base_address+1,
base_address+2 and base_address+3) that are each supposed to be able
read/write 16 bits.  From the mini-HowTo on IO-Port-Programming by Riku
Saikkonen (second page) it speaks of using INW to read 8 bits from port
x and then 8 bits from port x+1.  My confusion stems from the fact that
on our custom ISA board we are supposed to be able to perform 16 bit
transfers to any of the 4 ports.  So if the base address is 0x300 we
should be able to write 16 bits to 0x300, 16 bits to 0x301 etc.  My
first question is, is this possible in the ISA architecture and then, if
so, are inw and outw the correct instructions for doing so?  It doesn't
seem to be the case based on the HowTo.

2. mod_rewrite and Invalid URI

3. 8-bit ISA > 16-bit MCA, what ADF's?

4. Linux-patched SATAN source won't compile

5. SB 16 PnP: 8-bit sound works, 16-bit sound broken?

6. Help me!. I can't get PPPD to work

7. 8-bit fine, 16-bit wacky.

8. nfs issues

9. 16-bit au sound on an 8-bit card?

10. Cheapo PnP SB Pro clone: 8-bit works, 16-bit doesn't

11. 8-bit / 16-bit color

12. SB16: 16-bit sound o.k., 8-bit sound breaks off?????

13. mac2lat1 Convert 8-bit quoted printable characters to 8-bit latin1