.TH mdioblock2 1 "November 2013" "open-plc-utils-0.0.3" "Qualcomm Atheros Open Powerline Toolkit"

.SH NAME
mdioblock2 - Qualcomm Atheros Clause 45 MDIO Instruction Block Assembler

.SH SYNOPSIS
.BR mdioblock2
.RI [ options ]
.IR file
.RI [ file ]
.RI [ ... ]
.RI [> stdout ]

.PP
.BR mdioblock2
.RI [ options ]
.RI [< stdin ] 
.RI [> stdout ]

.SH DESCRIPTION
Assemble an Atheros MDIO instruction block from hexadecimal register instructions.
MDIO instruction blocks are written to Atheros powerline devices as modules using the \fBVS_MOD_OP\fR message type.
Alternately, program \fBint6kmod\fR can be used.

.PP
Atheros MDIO modules consists of a 16-bit header followed by one or more MDIO communication frames with register masks and padded to the nearest multiple of 32-bits for download purposes.
MDIO instructions are entered here using \fB802.3ae Clause 45\fR (or \fIaddr\fR, \fIdata\fR and \fImask\fR) format.
See program \fBmdioblock\fR for a similar program that accepts instructions in \fB802.3 Clause 22\fR (or \fIphy\fR, \fIreg\fR, \fIdata\fR and \fImask\fR) format.

.PP
This program is part of the Qualcomm Atheros Powerline Toolkit.
See the \fBAMP\fR man page for an overview and installation instructions.

.SH OPTIONS

.TP
.RB - q
Quiet mode.
Suppresses error messages caused by instruction syntax errors.

.TP
.RB - v
Verbose mode.
Prints instructions on stderr as they are processed.

.TP
.RB - ? ,-- help   
Displays program help information on stderr.
This option takes precedence over all other options on the command line except version information.

.TP
.RB - ! ,-- version
Displays program version information on stderr.
This option takes precedence over all other options on the command line except help information.
Use this option when sending screen dumps to Atheros technical staff.

.SH ARGUMENTS

.TP
.IR file
A text files contining one or more generic MDIO register intructions consisting of a \fBaddress\fR, \fBdata\fR and \fBmask\fR fields.
Fields are separated by whitespace.
Instructions are terminated with semicolon.
Multiple instructions may appear on one line and one instruction may span multiple lines.
Script-style comments are permitted between instructions but not between instruction fields.

.SH REFERENCES
See the Qualcomm Atheros \fIAR7x00 Firmware Technical Reference Manual\fR section on the \fIModule Operation\fR message type for more information on MDIO Block format.

.SH DISCLAIMER
Atheros HomePlug AV Vendor Specific Management Message structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.
Consequently, public information may not be available.
Qualcomm Atheros reserves the right to modify message structure and content in future firmware releases without any obligation to notify or compensate users of this program.

.SH EXAMPLES
The following command reads register instructions from text file \fBmdio.txt\fR and writes binary file \fBmdio.bin\fR.
In this example, the program acts as a filter, reading from \fBstdin\fR and writing to \fBstdout\fR.
Progress and error messages, if any, are written to \fBstderr\fR.

.PP
   # mdioblock2 < mdio.txt > mdio.bin

.PP
The following command reads register instructions from files \fBphysetup.dat\fR then \fBflowctl.dat\fR then \fBmisc.ins\fR and writes one binary MDIO block to file \fBmdio.bin\fR.
The previous contents of file \fBmdio.bin\fR are overwritten.

.PP
   # mdioblock2 physetup.dat flowctl.dat misc.ins > mdio.bin

.PP
An example register instruction file might look like this.
Instructions have \fIaddr\fR, \fIdata\fR and \fImask\fR fields.
Instruction fields are separated by whitespace and instructions are terminate by a semicolon.
Multiple instructions can appear on one line or one instruction can span multiple lines.
Script-style comments are permitted between instructions but not between instruction fields.

.PP
   2c 7e3f003f ffffffff;
   8 500 ffffffff;
   100 7d ffffffff; 30 19f005f2 ffffffff;
   200 
        7d 
            ffffffff;
   300 7d ffffffff;
   # Hello World
   400 7d ffffffff;
   500 7d ffffffff;

.SH SEE ALSO
.BR amp ( 1 ),
.BR int6kmod ( 1 ),
.BR int6kmdio ( 1 ),
.BR int6kmdio2 ( 1 ),
.BR mdioblock ( 1 ),
.BR mdiodump ( 1 ),
.BR mdiogen ( 1 )

.SH CREDITS
Charles Maier

