embedded RTOS class project.

Dependencies:   C12832_lcd USBDevice mbed-rtos mbed mmSPI_RTOS watchdog_RTOS

Fork of RTOS_project_fork_01 by Mike Moore

mmRTL/mux16x2.txt

Committer:
gatedClock
Date:
2013-09-18
Revision:
5:4409ff66b434
Parent:
0:8e898e1270d6

File content as of revision 5:4409ff66b434:

/*----------------------------------copyright---------------------------------*/
//      licensed for personal and academic use.
//      commercial use must be approved by the account-holder of
//      gated.clock@gmail.com
/*-----------------------------------module-----------------------------------*/
        module mux16x2
        (
          iDin1,                                // data-input 1.
          iDin0,                                // data-input 0.
          iSel,                                 // multiplexor select.
          oDout                                 // data-out.
        );
/*--------------------------------description-----------------------------------
        a 16-bit-wide, 2-selection multiplexor.
-------------------------------------notes--------------------------------------
------------------------------------defines-----------------------------------*/
/*-----------------------------------ports------------------------------------*/
        input   [15:0]  iDin1;                  // data-input 1.
        input   [15:0]  iDin0;                  // data-input 0.
        input           iSel;                   // multiplexor select.
        output  [15:0]  oDout;                  // data-out.
/*-----------------------------------wires------------------------------------*/
        wire    [15:0]  iDin1;                  // data-input 1.
        wire    [15:0]  iDin0;                  // data-input 0.
        wire            iSel;                   // multiplexor select.
        wire    [15:0]  oDout;                  // data-out.
/*---------------------------------registers----------------------------------*/
        reg     [15:0]  rDout;                  // output register.
/*---------------------------------variables----------------------------------*/
/*---------------------------------parameters---------------------------------*/
/*-----------------------------------clocks-----------------------------------*/
/*---------------------------------instances----------------------------------*/
/*-----------------------------------logic------------------------------------*/
        always @ (iDin1 or iDin0 or iSel)
        case (iSel)
        1 : rDout = iDin1;
        0 : rDout = iDin0;
        endcase

        assign oDout = rDout;                   // propagate output.
/*-------------------------------*/endmodule/*--------------------------------*/