Line 1... |
Line 1... |
|
|
|
// File : ../RTL/serialInterfaceEngine/processTxByte.v
|
|
// Generated : 10/06/06 19:35:29
|
|
// From : ../RTL/serialInterfaceEngine/processTxByte.asf
|
|
// By : FSM2VHDL ver. 5.0.0.9
|
|
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// processTxByte
|
//// processTxByte
|
//// ////
|
//// ////
|
//// This file is part of the usbhostslave opencores effort.
|
//// This file is part of the usbhostslave opencores effort.
|
Line 40... |
Line 45... |
//// Public License along with this source; if not, download it ////
|
//// Public License along with this source; if not, download it ////
|
//// from http://www.opencores.org/lgpl.shtml ////
|
//// from http://www.opencores.org/lgpl.shtml ////
|
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//
|
//
|
`timescale 1ns / 1ps
|
`include "timescale.v"
|
`include "usbSerialInterfaceEngine_h.v"
|
`include "usbSerialInterfaceEngine_h.v"
|
`include "usbConstants_h.v"
|
`include "usbConstants_h.v"
|
|
|
module processTxByte (clk, JBit, KBit, processTxByteRdy, processTxByteWEn, rst, TxByteCtrlIn, TxByteFullSpeedRateIn, TxByteIn, USBWireCtrl, USBWireData, USBWireFullSpeedRate, USBWireGnt, USBWireRdy, USBWireReq, USBWireWEn);
|
module processTxByte (JBit, KBit, TxByteCtrlIn, TxByteFullSpeedRateIn, TxByteIn, USBWireCtrl, USBWireData, USBWireFullSpeedRate, USBWireGnt, USBWireRdy, USBWireReq, USBWireWEn, clk, processTxByteRdy, processTxByteWEn, rst);
|
input clk;
|
|
input [1:0]JBit;
|
input [1:0]JBit;
|
input [1:0]KBit;
|
input [1:0]KBit;
|
input processTxByteWEn;
|
|
input rst;
|
|
input [7:0]TxByteCtrlIn;
|
input [7:0]TxByteCtrlIn;
|
input TxByteFullSpeedRateIn;
|
input TxByteFullSpeedRateIn;
|
input [7:0]TxByteIn;
|
input [7:0]TxByteIn;
|
input USBWireGnt;
|
input USBWireGnt;
|
input USBWireRdy;
|
input USBWireRdy;
|
output processTxByteRdy;
|
input clk;
|
|
input processTxByteWEn;
|
|
input rst;
|
output USBWireCtrl;
|
output USBWireCtrl;
|
output [1:0]USBWireData;
|
output [1:0]USBWireData;
|
output USBWireFullSpeedRate;
|
output USBWireFullSpeedRate;
|
output USBWireReq;
|
output USBWireReq;
|
output USBWireWEn;
|
output USBWireWEn;
|
|
output processTxByteRdy;
|
|
|
wire clk;
|
|
wire [1:0]JBit;
|
wire [1:0]JBit;
|
wire [1:0]KBit;
|
wire [1:0]KBit;
|
reg processTxByteRdy, next_processTxByteRdy;
|
|
wire processTxByteWEn;
|
|
wire rst;
|
|
wire [7:0]TxByteCtrlIn;
|
wire [7:0]TxByteCtrlIn;
|
wire TxByteFullSpeedRateIn;
|
wire TxByteFullSpeedRateIn;
|
wire [7:0]TxByteIn;
|
wire [7:0]TxByteIn;
|
reg USBWireCtrl, next_USBWireCtrl;
|
reg USBWireCtrl, next_USBWireCtrl;
|
reg [1:0]USBWireData, next_USBWireData;
|
reg [1:0]USBWireData, next_USBWireData;
|
reg USBWireFullSpeedRate, next_USBWireFullSpeedRate;
|
reg USBWireFullSpeedRate, next_USBWireFullSpeedRate;
|
wire USBWireGnt;
|
wire USBWireGnt;
|
wire USBWireRdy;
|
wire USBWireRdy;
|
reg USBWireReq, next_USBWireReq;
|
reg USBWireReq, next_USBWireReq;
|
reg USBWireWEn, next_USBWireWEn;
|
reg USBWireWEn, next_USBWireWEn;
|
|
wire clk;
|
|
reg processTxByteRdy, next_processTxByteRdy;
|
|
wire processTxByteWEn;
|
|
wire rst;
|
|
|
// diagram signals declarations
|
// diagram signals declarations
|
reg [3:0]i, next_i;
|
|
reg [7:0]TxByte, next_TxByte;
|
|
reg [7:0]TxByteCtrl, next_TxByteCtrl;
|
|
reg TxByteFullSpeedRate, next_TxByteFullSpeedRate;
|
|
reg [1:0]TXLineState, next_TXLineState;
|
reg [1:0]TXLineState, next_TXLineState;
|
reg [3:0]TXOneCount, next_TXOneCount;
|
reg [3:0]TXOneCount, next_TXOneCount;
|
|
reg [7:0]TxByteCtrl, next_TxByteCtrl;
|
|
reg TxByteFullSpeedRate, next_TxByteFullSpeedRate;
|
|
reg [7:0]TxByte, next_TxByte;
|
|
reg [3:0]i, next_i;
|
|
|
// BINARY ENCODED state machine: prcTxB
|
// BINARY ENCODED state machine: prcTxB
|
// State codes definitions:
|
// State codes definitions:
|
`define START_PTBY 5'b00000
|
`define START_PTBY 5'b00000
|
`define PTBY_WAIT_EN 5'b00001
|
`define PTBY_WAIT_EN 5'b00001
|
Line 119... |
Line 124... |
`define STOP_W_RDY1 5'b11001
|
`define STOP_W_RDY1 5'b11001
|
`define STOP_W_RDY2 5'b11010
|
`define STOP_W_RDY2 5'b11010
|
`define STOP_W_RDY3 5'b11011
|
`define STOP_W_RDY3 5'b11011
|
`define STOP_W_RDY4 5'b11100
|
`define STOP_W_RDY4 5'b11100
|
|
|
reg [4:0]CurrState_prcTxB, NextState_prcTxB;
|
reg [4:0] CurrState_prcTxB;
|
|
reg [4:0] NextState_prcTxB;
|
|
|
|
|
|
//--------------------------------------------------------------------
|
// Machine: prcTxB
|
// Machine: prcTxB
|
|
//--------------------------------------------------------------------
|
// NextState logic (combinatorial)
|
//----------------------------------
|
always @ (processTxByteWEn or TxByteIn or TxByteCtrlIn or TxByteFullSpeedRateIn or i or TxByte or TXOneCount or KBit or JBit or USBWireRdy or TXLineState or USBWireGnt or TxByteCtrl or processTxByteRdy or USBWireData or USBWireCtrl or USBWireReq or USBWireWEn or USBWireFullSpeedRate or TxByteFullSpeedRate or CurrState_prcTxB)
|
// Next State Logic (combinatorial)
|
begin
|
//----------------------------------
|
|
always @ (TxByteIn or TxByteCtrlIn or TxByteFullSpeedRateIn or JBit or i or TxByte or TXOneCount or TXLineState or KBit or processTxByteWEn or USBWireGnt or USBWireRdy or TxByteFullSpeedRate or TxByteCtrl or processTxByteRdy or USBWireData or USBWireCtrl or USBWireReq or USBWireWEn or USBWireFullSpeedRate or CurrState_prcTxB)
|
|
begin : prcTxB_NextState
|
NextState_prcTxB <= CurrState_prcTxB;
|
NextState_prcTxB <= CurrState_prcTxB;
|
// Set default values for outputs and signals
|
// Set default values for outputs and signals
|
next_processTxByteRdy <= processTxByteRdy;
|
next_processTxByteRdy <= processTxByteRdy;
|
next_USBWireData <= USBWireData;
|
next_USBWireData <= USBWireData;
|
next_USBWireCtrl <= USBWireCtrl;
|
next_USBWireCtrl <= USBWireCtrl;
|
Line 141... |
Line 150... |
next_TxByteCtrl <= TxByteCtrl;
|
next_TxByteCtrl <= TxByteCtrl;
|
next_TXLineState <= TXLineState;
|
next_TXLineState <= TXLineState;
|
next_TXOneCount <= TXOneCount;
|
next_TXOneCount <= TXOneCount;
|
next_USBWireFullSpeedRate <= USBWireFullSpeedRate;
|
next_USBWireFullSpeedRate <= USBWireFullSpeedRate;
|
next_TxByteFullSpeedRate <= TxByteFullSpeedRate;
|
next_TxByteFullSpeedRate <= TxByteFullSpeedRate;
|
case (CurrState_prcTxB) // synopsys parallel_case full_case
|
case (CurrState_prcTxB)
|
`START_PTBY:
|
`START_PTBY:
|
begin
|
begin
|
next_processTxByteRdy <= 1'b0;
|
next_processTxByteRdy <= 1'b0;
|
next_USBWireData <= 2'b00;
|
next_USBWireData <= 2'b00;
|
next_USBWireCtrl <= `TRI_STATE;
|
next_USBWireCtrl <= `TRI_STATE;
|
Line 185... |
Line 194... |
next_USBWireFullSpeedRate <= TxByteFullSpeedRateIn;
|
next_USBWireFullSpeedRate <= TxByteFullSpeedRateIn;
|
next_i <= 4'h0;
|
next_i <= 4'h0;
|
end
|
end
|
end
|
end
|
`PTBY_WAIT_GNT:
|
`PTBY_WAIT_GNT:
|
begin
|
|
if (USBWireGnt == 1'b1)
|
if (USBWireGnt == 1'b1)
|
begin
|
|
NextState_prcTxB <= `WAIT_RDY_WIRE;
|
NextState_prcTxB <= `WAIT_RDY_WIRE;
|
end
|
|
end
|
|
`WAIT_RDY_WIRE:
|
`WAIT_RDY_WIRE:
|
begin
|
|
if ((USBWireRdy == 1'b1) && (TxByteFullSpeedRate == 1'b0))
|
if ((USBWireRdy == 1'b1) && (TxByteFullSpeedRate == 1'b0))
|
begin
|
|
NextState_prcTxB <= `LS_START_SND_IDLE1;
|
NextState_prcTxB <= `LS_START_SND_IDLE1;
|
end
|
|
else if (USBWireRdy == 1'b1)
|
else if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `WAIT_RDY_PKT;
|
NextState_prcTxB <= `WAIT_RDY_PKT;
|
//actively drive the first J bit
|
//actively drive the first J bit
|
next_USBWireData <= JBit;
|
next_USBWireData <= JBit;
|
next_USBWireCtrl <= `DRIVE;
|
next_USBWireCtrl <= `DRIVE;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
end
|
end
|
end
|
|
`WAIT_RDY_PKT:
|
`WAIT_RDY_PKT:
|
begin
|
begin
|
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
NextState_prcTxB <= `SEND_BYTE_UPDATE_BYTE;
|
NextState_prcTxB <= `SEND_BYTE_UPDATE_BYTE;
|
next_i <= 4'h0;
|
next_i <= 4'h0;
|
Line 232... |
Line 233... |
next_TXLineState <= JBit;
|
next_TXLineState <= JBit;
|
end
|
end
|
NextState_prcTxB <= `SEND_BYTE_WAIT_RDY;
|
NextState_prcTxB <= `SEND_BYTE_WAIT_RDY;
|
end
|
end
|
`SEND_BYTE_WAIT_RDY:
|
`SEND_BYTE_WAIT_RDY:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `SEND_BYTE_CHK;
|
NextState_prcTxB <= `SEND_BYTE_CHK;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= TXLineState;
|
next_USBWireData <= TXLineState;
|
next_USBWireCtrl <= `DRIVE;
|
next_USBWireCtrl <= `DRIVE;
|
end
|
end
|
end
|
|
`SEND_BYTE_CHK:
|
`SEND_BYTE_CHK:
|
begin
|
begin
|
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
if (TXOneCount == `MAX_CONSEC_SAME_BITS)
|
if (TXOneCount == `MAX_CONSEC_SAME_BITS)
|
begin
|
|
NextState_prcTxB <= `SEND_BYTE_BIT_STUFF;
|
NextState_prcTxB <= `SEND_BYTE_BIT_STUFF;
|
end
|
|
else if (i != 4'h8)
|
else if (i != 4'h8)
|
begin
|
|
NextState_prcTxB <= `SEND_BYTE_UPDATE_BYTE;
|
NextState_prcTxB <= `SEND_BYTE_UPDATE_BYTE;
|
end
|
|
else
|
else
|
begin
|
|
NextState_prcTxB <= `STOP_CHK;
|
NextState_prcTxB <= `STOP_CHK;
|
end
|
end
|
end
|
|
`SEND_BYTE_BIT_STUFF:
|
`SEND_BYTE_BIT_STUFF:
|
begin
|
begin
|
next_TXOneCount <= 4'h0;
|
next_TXOneCount <= 4'h0;
|
//reset 'TXOneCount'
|
//reset 'TXOneCount'
|
if (TXLineState == JBit)
|
if (TXLineState == JBit)
|
Line 269... |
Line 262... |
else
|
else
|
next_TXLineState <= JBit;
|
next_TXLineState <= JBit;
|
NextState_prcTxB <= `SEND_BYTE_WAIT_RDY2;
|
NextState_prcTxB <= `SEND_BYTE_WAIT_RDY2;
|
end
|
end
|
`SEND_BYTE_WAIT_RDY2:
|
`SEND_BYTE_WAIT_RDY2:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `SEND_BYTE_CHK_FIN;
|
NextState_prcTxB <= `SEND_BYTE_CHK_FIN;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= TXLineState;
|
next_USBWireData <= TXLineState;
|
next_USBWireCtrl <= `DRIVE;
|
next_USBWireCtrl <= `DRIVE;
|
end
|
end
|
end
|
|
`SEND_BYTE_CHK_FIN:
|
`SEND_BYTE_CHK_FIN:
|
begin
|
begin
|
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
if (i == 4'h8)
|
if (i == 4'h8)
|
begin
|
|
NextState_prcTxB <= `STOP_CHK;
|
NextState_prcTxB <= `STOP_CHK;
|
end
|
|
else
|
else
|
begin
|
|
NextState_prcTxB <= `SEND_BYTE_UPDATE_BYTE;
|
NextState_prcTxB <= `SEND_BYTE_UPDATE_BYTE;
|
end
|
end
|
end
|
|
`STOP_SND_SE0_2:
|
`STOP_SND_SE0_2:
|
begin
|
begin
|
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
NextState_prcTxB <= `STOP_W_RDY2;
|
NextState_prcTxB <= `STOP_W_RDY2;
|
end
|
end
|
`STOP_SND_SE0_1:
|
`STOP_SND_SE0_1:
|
begin
|
|
NextState_prcTxB <= `STOP_W_RDY1;
|
NextState_prcTxB <= `STOP_W_RDY1;
|
end
|
|
`STOP_CHK:
|
`STOP_CHK:
|
begin
|
|
if (TxByteCtrl == `DATA_STOP)
|
if (TxByteCtrl == `DATA_STOP)
|
begin
|
|
NextState_prcTxB <= `STOP_SND_SE0_1;
|
NextState_prcTxB <= `STOP_SND_SE0_1;
|
end
|
|
else
|
else
|
begin
|
|
NextState_prcTxB <= `PTBY_WAIT_EN;
|
NextState_prcTxB <= `PTBY_WAIT_EN;
|
end
|
|
end
|
|
`STOP_SND_J:
|
`STOP_SND_J:
|
begin
|
begin
|
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
NextState_prcTxB <= `STOP_W_RDY3;
|
NextState_prcTxB <= `STOP_W_RDY3;
|
end
|
end
|
Line 328... |
Line 307... |
next_USBWireReq <= 1'b0;
|
next_USBWireReq <= 1'b0;
|
//release the wire
|
//release the wire
|
NextState_prcTxB <= `PTBY_WAIT_EN;
|
NextState_prcTxB <= `PTBY_WAIT_EN;
|
end
|
end
|
`STOP_W_RDY1:
|
`STOP_W_RDY1:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `STOP_SND_SE0_2;
|
NextState_prcTxB <= `STOP_SND_SE0_2;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= `SE0;
|
next_USBWireData <= `SE0;
|
next_USBWireCtrl <= `DRIVE;
|
next_USBWireCtrl <= `DRIVE;
|
end
|
end
|
end
|
|
`STOP_W_RDY2:
|
`STOP_W_RDY2:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `STOP_SND_J;
|
NextState_prcTxB <= `STOP_SND_J;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= `SE0;
|
next_USBWireData <= `SE0;
|
next_USBWireCtrl <= `DRIVE;
|
next_USBWireCtrl <= `DRIVE;
|
end
|
end
|
end
|
|
`STOP_W_RDY3:
|
`STOP_W_RDY3:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `STOP_SND_IDLE;
|
NextState_prcTxB <= `STOP_SND_IDLE;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= JBit;
|
next_USBWireData <= JBit;
|
next_USBWireCtrl <= `DRIVE;
|
next_USBWireCtrl <= `DRIVE;
|
end
|
end
|
end
|
|
`STOP_W_RDY4:
|
`STOP_W_RDY4:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `STOP_FIN;
|
NextState_prcTxB <= `STOP_FIN;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= JBit;
|
next_USBWireData <= JBit;
|
next_USBWireCtrl <= `TRI_STATE;
|
next_USBWireCtrl <= `TRI_STATE;
|
end
|
end
|
end
|
|
`LS_START_SND_IDLE3:
|
`LS_START_SND_IDLE3:
|
begin
|
begin
|
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
NextState_prcTxB <= `LS_START_W_RDY2;
|
NextState_prcTxB <= `LS_START_W_RDY2;
|
end
|
end
|
Line 378... |
Line 349... |
begin
|
begin
|
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
NextState_prcTxB <= `LS_START_W_RDY3;
|
NextState_prcTxB <= `LS_START_W_RDY3;
|
end
|
end
|
`LS_START_SND_IDLE1:
|
`LS_START_SND_IDLE1:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `LS_START_SND_IDLE2;
|
NextState_prcTxB <= `LS_START_SND_IDLE2;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= JBit;
|
next_USBWireData <= JBit;
|
next_USBWireCtrl <= `TRI_STATE;
|
next_USBWireCtrl <= `TRI_STATE;
|
end
|
end
|
end
|
|
`LS_START_SND_IDLE2:
|
`LS_START_SND_IDLE2:
|
begin
|
begin
|
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
NextState_prcTxB <= `LS_START_W_RDY1;
|
NextState_prcTxB <= `LS_START_W_RDY1;
|
end
|
end
|
Line 399... |
Line 368... |
next_USBWireWEn <= 1'b0;
|
next_USBWireWEn <= 1'b0;
|
NextState_prcTxB <= `SEND_BYTE_UPDATE_BYTE;
|
NextState_prcTxB <= `SEND_BYTE_UPDATE_BYTE;
|
next_i <= 4'h0;
|
next_i <= 4'h0;
|
end
|
end
|
`LS_START_W_RDY1:
|
`LS_START_W_RDY1:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `LS_START_SND_IDLE3;
|
NextState_prcTxB <= `LS_START_SND_IDLE3;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= JBit;
|
next_USBWireData <= JBit;
|
next_USBWireCtrl <= `TRI_STATE;
|
next_USBWireCtrl <= `TRI_STATE;
|
end
|
end
|
end
|
|
`LS_START_W_RDY2:
|
`LS_START_W_RDY2:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `LS_START_SND_J1;
|
NextState_prcTxB <= `LS_START_SND_J1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= JBit;
|
next_USBWireData <= JBit;
|
next_USBWireCtrl <= `TRI_STATE;
|
next_USBWireCtrl <= `TRI_STATE;
|
end
|
end
|
end
|
|
`LS_START_W_RDY3:
|
`LS_START_W_RDY3:
|
begin
|
|
if (USBWireRdy == 1'b1)
|
if (USBWireRdy == 1'b1)
|
begin
|
begin
|
NextState_prcTxB <= `LS_START_FIN;
|
NextState_prcTxB <= `LS_START_FIN;
|
//Drive the first JBit
|
//Drive the first JBit
|
next_USBWireWEn <= 1'b1;
|
next_USBWireWEn <= 1'b1;
|
next_USBWireData <= JBit;
|
next_USBWireData <= JBit;
|
next_USBWireCtrl <= `DRIVE;
|
next_USBWireCtrl <= `DRIVE;
|
end
|
end
|
end
|
|
endcase
|
endcase
|
end
|
end
|
|
|
|
//----------------------------------
|
// Current State Logic (sequential)
|
// Current State Logic (sequential)
|
|
//----------------------------------
|
always @ (posedge clk)
|
always @ (posedge clk)
|
begin
|
begin : prcTxB_CurrentState
|
if (rst)
|
if (rst)
|
CurrState_prcTxB <= `START_PTBY;
|
CurrState_prcTxB <= `START_PTBY;
|
else
|
else
|
CurrState_prcTxB <= NextState_prcTxB;
|
CurrState_prcTxB <= NextState_prcTxB;
|
end
|
end
|
|
|
|
//----------------------------------
|
// Registered outputs logic
|
// Registered outputs logic
|
|
//----------------------------------
|
always @ (posedge clk)
|
always @ (posedge clk)
|
begin
|
begin : prcTxB_RegOutput
|
if (rst)
|
if (rst)
|
begin
|
begin
|
processTxByteRdy <= 1'b0;
|
|
USBWireData <= 2'b00;
|
|
USBWireCtrl <= `TRI_STATE;
|
|
USBWireReq <= 1'b0;
|
|
USBWireWEn <= 1'b0;
|
|
USBWireFullSpeedRate <= 1'b0;
|
|
i <= 4'h0;
|
i <= 4'h0;
|
TxByte <= 8'h00;
|
TxByte <= 8'h00;
|
TxByteCtrl <= 8'h00;
|
TxByteCtrl <= 8'h00;
|
TXLineState <= 2'b0;
|
TXLineState <= 2'b0;
|
TXOneCount <= 4'h0;
|
TXOneCount <= 4'h0;
|
TxByteFullSpeedRate <= 1'b0;
|
TxByteFullSpeedRate <= 1'b0;
|
|
processTxByteRdy <= 1'b0;
|
|
USBWireData <= 2'b00;
|
|
USBWireCtrl <= `TRI_STATE;
|
|
USBWireReq <= 1'b0;
|
|
USBWireWEn <= 1'b0;
|
|
USBWireFullSpeedRate <= 1'b0;
|
end
|
end
|
else
|
else
|
begin
|
begin
|
processTxByteRdy <= next_processTxByteRdy;
|
|
USBWireData <= next_USBWireData;
|
|
USBWireCtrl <= next_USBWireCtrl;
|
|
USBWireReq <= next_USBWireReq;
|
|
USBWireWEn <= next_USBWireWEn;
|
|
USBWireFullSpeedRate <= next_USBWireFullSpeedRate;
|
|
i <= next_i;
|
i <= next_i;
|
TxByte <= next_TxByte;
|
TxByte <= next_TxByte;
|
TxByteCtrl <= next_TxByteCtrl;
|
TxByteCtrl <= next_TxByteCtrl;
|
TXLineState <= next_TXLineState;
|
TXLineState <= next_TXLineState;
|
TXOneCount <= next_TXOneCount;
|
TXOneCount <= next_TXOneCount;
|
TxByteFullSpeedRate <= next_TxByteFullSpeedRate;
|
TxByteFullSpeedRate <= next_TxByteFullSpeedRate;
|
|
processTxByteRdy <= next_processTxByteRdy;
|
|
USBWireData <= next_USBWireData;
|
|
USBWireCtrl <= next_USBWireCtrl;
|
|
USBWireReq <= next_USBWireReq;
|
|
USBWireWEn <= next_USBWireWEn;
|
|
USBWireFullSpeedRate <= next_USBWireFullSpeedRate;
|
end
|
end
|
end
|
end
|
|
|
endmodule
|
endmodule
|
No newline at end of file
|
No newline at end of file
|