Editing the hwconfig.cf File to Configure SICL

This appendix explains how to manually edit the hwconfig.cf file. The hwconfig.cf file contains the configuration details for SICL interfaces. This file is automatically updated when you run the I/O Setup utility during the system configuration (described in the "Configuring SICL for BASIX/UX 8.0 section in Chapter 2). We recommend you use the I/O Setup utility to update this file. If needed, however, you can change the configured SICL interfaces by manually editing the hwconfig.cf file, rebuilding the kernel, and then rebooting the system.

The Procedure

This configuration involves editing the hwconfig.cf file to specify your I/O interfaces, building the kernel, and rebooting the system. If you are using only the LAN client interface (SICL-LAN), you only need to edit the hwconfig.cf file. Building the kernel and rebooting your system are not necessary.

However, if you are using the LAN server (SICL-LANSVR), you must edit the hwconfig.cf file to specify one or more instrument interfaces that you will use with the LAN server. To configure the instrument interface, you will then need to run the configuration program siclconf on the Series 700 which will act as a LAN server, and reboot the system.

NOTE
This procedure must be performed on each node of a diskless cluster that will be using SICL. You only need to configure the server of a diskless cluster if you plan to run applications on the server.

  1. Login as root on the system to be configured.

  2. If you are executing on a diskless cluster, then the /etc/opt/sicl directory will be NFS diskless client private and all files in it will be client-specific. Edit the /etc/opt/sicl/hwconfig.cf file to reflect the I/O hardware you want to use. You need to have one entry for each I/O interface in the system. The default hwconfig.cf file should contain entries (commented out) for each I/O interface already installed in your system. Therefore, edit the file and un-comment the entries that you want to use in your system.

    NOTE
    You must ensure that all addresses and interrupt lines (IRQs) are unique and do not conflict with an address or IRQ line used by any other card in the system.

    The following are some example I/O interface configuration entries. If you need more information about the contents of the hwconfig.cf file, see the section, "The Hardware Configuration File," at the end of this appendix.

  3. Run the SICL configuration program, siclconf:
    
         /opt/sicl/bin/siclconf
    

    If you are executing on a diskless cluster, then run this program on all network client that will use this software. Note that this step is not necessary if you are using only the LAN interface (client). (Execute man siclconf for a list of options.)

    NOTE
    You must execute this utility from a writable directory such as /tmp.

    The siclconf program will configure your system, including building a new kernel and running the eisa_config(1m) program, if necessary. While the program runs, it prompts with the following:

  4. When the SICL configuration program finishes, it will ask if you want to reboot your system. Type y to reboot at this time. If you want to manually reboot, type n and manually reboot by executing the following:
    
                /sbin/reboot
    

    Note that this step is not necessary if you are using only the LAN interface (client).

    NOTE
    With some current kernel configurations, the SICL configuration will be unable to complete until after the system has rebooted. If this happens, you will be informed of an unsuccessful completion and you will be asked to reboot your system. After you reboot, login as root and execute the following:
    
                /opt/sicl/bin/siclconf -e
    

    The -e option runs only eisa_config.

  5. If you are configuring a cluster node or a root server of a diskless cluster to act as a LAN server (also known as a LAN-to-instrument_interface gateway), then you must run the lanconf utility by executing the following:
    
               /opt/sicl/bin/lanconf
    

    If you are configuring a standalone system to act as a LAN-to-instrument_interface gateway, then this utility was already run for you as part of the installation customization process.

    See the lanconf man page for details as to what steps this utility performs. Also, be sure to read the section, "Customizing the SICL LAN Server," in Chapter 2 for more information about configuring the SICL LAN server.

The Hardware Configuration File

Each line in the hwconfig.cf file corresponds to an interface card that will be used for instrument I/O. There is only one line for each interface card in the system. This file only needs to be edited if you are not running the I/O setup utility.

The format of each line is as follows:


        lu symname cardname location  [card specific values]

Where: Represents:
lu Logical unit number of the card (0<lu<10000). Each interface card must have a unique logical unit number. The actual value used is not important, but you must remember this number, or the sysname, in order to address the card in your application properly.

symname A symbolic name for your card. Each card must have a unique symbolic name. This name may be used instead of the logical unit number to address an interface. The default symbolic name for your first HP-IB card should be hpib. Possible values for additional HP-IB cards include (but are not limited to): hpib2, xhpib, etc.

cardname The specific name of the card. This is used to determine which driver to use.

location The location of the card. For EISA/ISA cards, this is the slot number. For Series 700 built-in RS-232 cards, this field is the port number (for example, 1 or 2). This field is 0 for LAN.

Card-specific information is described below for each possible card. In each case, the values specified are numbers and may be represented in either hexadecimal (using 0x...), octal (using 0...), binary (using 0b...), or decimal (default).

HP E2070 HP-IB Hardware Configuration

HP E2070 HP-IB Interface:


       lu symname e2070 slot_num hpib_busaddr dip_switch sys_ctl

Where: Represents:
slot_num EISA/ISA slot number.
hpib_busaddr HP-IB bus address of this card.
dip_switch The value of the DIP switch setting for this E2070 interface card. See the table below and the HP E2071 and E2070 Installation Guide for information on how to code this value.

Switch positions one through four set the memory address of the card, and switches five and six set the IRQ line. Note the following:

HP E2070 Switch Settings
EISA Slot

Switches

1 2 3 4 5 6 7 8

Memory Address

Range

Interrupt

Line

1 0 1 1 1 0 0 0 0 DC000-DFFFF 3
2 0 1 1 0 0 1 0 0 D8000-DBFFF 4
3 0 1 0 1 1 0 0 0 D4000-D7FFF 5
4 0 1 0 0 1 1 0 0 D0000-D3FFF 7

sys_ctl 1 for system controller or 0 for non-system controller.

Default E2070 HP-IB Interface:

    7  hpib  e2070 1 21 0b01110000  1 # Card in first slot  (Slot #1)

If you have more than one interface card, the following lines can be used for the 2nd through 4th interface cards. Note, however, only slots (1,3) or (1,4) or (2,4) are allowed combinations, since two HP-IB cards cannot sit in two consecutive slots because of the connector's width (the HP-IB connectors will not fit on consecutive cards).


8  hpib2 e2070 2 21 0b01100100  1 # Card in second slot (Slot #2)
9  hpib3 e2070 3 21 0b01011000  1 # Card in third slot  (Slot #3)
10 hpib4 e2070 4 21 0b01001100  1 # Card in fourth slot (Slot #4)

HP E2071 HP-IB Hardware Configuration

HP E2071 High Speed HP-IB Interface:


        lu symname e2071 slot_num hpib_busaddr dip sysctl irq

Where: Represents:
slot_num EISA/ISA slot number.
hpib_busaddr HP-IB Bus address of this card.
dip The value of the DIP switch setting on the E2071 interface card. See the table below and the HP E2071 and E2070 Installation Guide for information on how to code this value.

Switch positions one, two, and three set the base I/O address. Switch four is not used. Note the following:

HP E2071 Switch Settings
Switches

1 2 3 4

I/O Base Address

(Hexadecimal)

I/O Address Range Used

(Hexadecimal)

0 0 1 0

220

220-227

0 0 0 0

250

250-257

1 0 0 0

270

270-277

1 0 1 0

280

280-287

0 1 0 0

350

350-357

1 1 0 0

370

370-377

1 1 1 0

380

380-387

0 1 1 0

390

390-397

sysctl 1 for system controller or 0 for non-system controller.
irq Interrupt request line.

Default E2071 HP-IB Interface:


          7       hpib  e2071 1 21 0b0000 1  3

If you have more than one interface card, the following lines can be used for the 2nd through 4th interface cards. Note, however, only slots (1,3) or (1,4) or (2,4) are allowed combinations, since two HP-IB cards cannot sit in two consecutive slots because of the connector's width (the HP-IB connectors will not fit on consecutive cards).

                   8 hpib2 e2071 2 21 0b0100 1     4       # Card in second slot

                   9 hpib3 e2071 3 21 0b1000 1     5      # Card in third slot

                  10 hpib4 e2071 4 21 0b1100 1   7      # Card in fourth slot

HP Model 745i Built-in HP-IB Hardware Configuration

HP Model 745i Built-in HP-IB Interface:


         lu symname s745 0xf0835000 hpib_busaddr sysctrl

Where: Represents:
hpib_busaddr HP-IB Bus address of this card.
sysctl 1 for system controller or 0 for non-system controller.

Default 745i Built-in HP-IB Interface:


        7       hpib s745 0xf0835000 21 1

HP Model V743 Built-in HP-IB Hardware Configuration

HP Model V743 Built-in HP-IB Interface:


       lu symname s743  99 hpib_busaddr 0b0000  sysctl 9

Where: Represents:
hpib_busaddr HP-IB Bus address of this card.
sysctl 1 for system controller or 0 for non-system controller.

Default V743 HP-IB Interface:


      7       hpib  s743 99 21 0b0000 1  9

HP Series 700 Built-in RS-232 Hardware Configuration

HP Series 700 Built-in RS-232 Interface:


       lu symname serial700 location irq baud parity
         cbits sbits flow SRQ

Where: Represents:
location The location value corresponds to which port is being used. location should be 0x00000001 for COM1, or 0x00000002 for COM2.
irq The irq is system-dependent and should be as follows:

RS-232 irq Values
Port Model irq
COM1 All Series 700s 26
COM2 All except Model 712 25
Add on COM2 Model 712 26

baud Baud rate. Can be 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 3600, 4800, 7200, 9600, 14400, 19200, 38400, and 57600.
parity Parity bit. Can be 0x00 for NONE, 0x08 for ODD, 0x18 for even, 0x38 for zero, or 0x28 for one.
cbits Bit per character (width). Use 0x02 for 7 or 0x03 for 8.
sbits Number of stop bits. Use 0x00 for 1 or 0x04 for 2.
flow Flow. Can be 0x00 for none, 0x01 for XON_XOFF, 0x02 for RTS/CTS, or 0x03 for DTR/DSR.
SRQ Service Request. Use 0x00 for RI or 0x01 for DSR.

Default Series 700 RS-232 Interface:

       9 COM1 serial700 0x00000001 26 9600 0x00 0x03 0x00 0x00 0x00

The following can be used for port B (excluding the Model 712 computer):

     10 COM2 serial700 0x00000002 25 9600 0x00 0x03 0x00 0x00 0x00

NOTE
An RS-232 port which is configured for use by SICL is not available for use by HP-UX termio functions, and vice versa.

HP Series 700 LAN Hardware Configuration

HP Series 700 LAN Interface (client):


     lu symname ilan 0 0  server_timeout  client_timeout_delta
        chain_sigpipe  log_errors

Where: Represents:
server_timeout Timeout value (in seconds) used by the LAN server when applications either use the default timeout value or set the timeout to 0 (infinity).
client_timeout_delta Value (in seconds) added to the server timeout value to determine the LAN client timeout value.
chain_sigpipe If a non-zero value is specified, the library will call a previously installed SIGPIPE handler, if one existed.
log_errors If a non-zero value is specified, the library will log errors.

Default Series 700 LAN Interface (client):


     30 lan ilan 0 0 120 25 1 1

HP E2074 GPIO Hardware Configuration

HP E2074 GPIO (General Purpose Input Output) Interface:


         lu symname e2074 slot_num dma dip irq polarity mode read_clk delay

Where: Represents:
slot_num EISA/ISA slot number.
dma The number of the ISA DMA channel to be used by the interface. This field has two independent hexadecimal digits. The first (most-significant) digit selects the DMA channel which will be used for 8-bit transactions (see igpiosetwidth). The choices are 1 or 2. The second digit selects the DMA channel which will be used for 16-bit transactions. The choices are 5, 6, or 7. A 0 (zero) in either digit prevents DMA from being used for transactions of that width.

There should not be any other card (HP SICL or otherwise) assigned to the DMA channel chosen. However, multiple SICL E2074 cards can cooperate on the same DMA channel. (The exact nature of that cooperation depends upon the ihint selected.) Note that the E2074 does not allocate two DMA channels. Assuming that the card's data width remains constant in a given application, only the one channel corresponding to that width will be used.

dip The value of the DIP switch setting on the E2074 interface card. See the following table and the "Installation" chapter of the HP E2074 GPIO Interface Installation Guide for more information about this value.

Switch positions one, two, and three set the base I/O address. Switch four is not used. The mappings are:

HP E2074 Switch Settings
Switches

1 2 3 4

I/O Base Address

(Hexadecimal)

I/O Address Range Used

(Hexadecimal)

0 0 0 0

228

228-22F, 628-62F

1 0 0 0

238

238-23F, 638-63F

0 1 0 0

258

258-25F, 658-65F

1 1 0 0

288

288-28F, 688-68F

0 0 1 0

328

328-32F, 728-72F

1 0 1 0

348

348-34F, 748-74F

0 1 1 0

388

388-38F, 788-78F

1 1 1 0

398

398-39F, 798-79F

irq Interrupt request line. The E2074 can use one of the following lines: 3, 5, 7, 9, 10, 11, 12, or 15. However, there must not be any other card (SICL or otherwise) assigned to that IRQ line.
polarity The default hardware polarity of all E2074 lines is low-true. The polarity of some lines cannot be altered, including: STI0, STI1, CTL0, CTL1, I/O, P_RESET, and EIR. The polarity of the remaining lines can be altered by the polarity mask in the hwconfig.cf file.

Each bit of this mask corresponds to a particular line (or set of lines). A 0 in that bit selects low-true (the default). A 1 in that bit selects high-true. The bits are assigned as follows:

The default polarity (0 in the associated bit) is shown in the following table. Putting a 1 in the associated bit inverts the polarity shown in this table.

Default Logical Polarity
Line Default Polarity
Data Out Low = 1
Data In Low = 1
PSTS Low = Not OK
PFLG Low = Ready
PCTL Low = Set

mode Configures the data port and handshake mode. For a more detailed description, refer to the "Configuration Information" chapter of the HP E2074 GPIO Interface Installation Guide. This field has two independent hexadecimal digits. The first (most-significant) digit establishes the data port configuration. The choices are:

HP E2074 Data Port Configuration
Digit Data Port Clear DOUT at Reset
0 98622 Compatible No
1 98622 Compatible Yes
2 Enhanced Mode No
3 Enhanced Mode Yes

The second (least-significant) digit selects the PCTL/PFLG handshake mode. The choices follow. Note that Async mode applies to output operations only.

HP E2074 Handshake Modes
Digit Write Handshake Read Handshake
0 Full Full
1 Pulse Pulse
2 Async Pulse

For example, a mode value of 0x20 configures the interface in Enhanced mode, with no DOUT clear at reset, and Full Handshake.

read_clk Determines when the data input registers are latched. For a more detailed description, refer to the "Configuration Information" chapter of the HP E2074 GPIO Interface Installation Guide. This field is a 2-digit hexadecimal number. The first (most-significant) digit establishes the read clock for the most-significant data byte. The second digit establishes the read clock for the least-significant data byte. The choices are:

HP E2074 Read Clock Choices
Digit Read Clock Timing
0 When register is read
1 At Busy edge of PFLG
2 At Ready edge of PFLG

delay Sets the delay (settling time) from a data write to PCTL set in Auto-Handshake mode. In Standard-Handshake mode with I_HINT_USEPOLL, the actual delay is approximately 500 ns longer than the value shown. In a program that implements its own explicit handshake, this delay shown occurs after the I_GPIO_SET_PCTL request. The value is interpreted as follows:

HP E2074 PCTL Delay Choices
Value Actual Delay
0 200 ns
1 400 ns
2 700 ns
3 1.2 µs
4 2 µs
5 5 µs
6 10 µs
7 50 µs

Default E2074 GPIO Interface:

         12 gpio e2074 1 0x15 0b0000 10 0b00000 0x00 0x00 1

If you have more than one interface card, the following lines can be used for the second through fourth interface cards.

           13 gpio2 e2074 2 0x26 0b1000 11       0b00000    0x00    0x00 1   # Card in slot    #2

        14 gpio3 e2074 3 0x17 0b0100 12       0b00000    0x00    0x00 1   # Card in slot    #3

           15 gpio4 e2074 4 0x25 0b1100 15       0b00000    0x00    0x00 1   # Card in slot   #4