This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
en:software:default_firmware [2018/09/12 13:54] – [ezusb_io.v] 83.173.241.10 | en:software:default_firmware [2019/07/05 15:18] – [ezusb_io.v] stefan | ||
---|---|---|---|
Line 41: | Line 41: | ||
<code verilog> | <code verilog> | ||
- | module ezusb_io | + | module ezusb_io ( |
- | parameter OUTEP = 2, // FX2 only: Endpoint for FPGA -> EZ-USB transfers | + | output ifclk, |
- | parameter INEP = 6 , // FX2 only: Endpoint for EZ-USB -> FPGA transfers | + | |
- | parameter TARGET = "" | + | |
- | ) ( | + | |
- | output ifclk, | + | |
- | // this is the clock for the user logic | + | |
input reset, | input reset, | ||
- | output reset_out, | + | output reset_out, // synchronous reset output |
- | + | | |
- | // FPGA pins that are connected directly to EZ-USB are omitted here | + | |
- | + | inout [15:0] fd, | |
- | // Signals | + | output reg SLWR, SLRD, |
+ | output reg SLOE, PKTEND, // low active | ||
+ | input EMPTY_FLAG, FULL_FLAG, | ||
+ | // signals | ||
input [15:0] DI, // data written to EZ-USB | input [15:0] DI, // data written to EZ-USB | ||
- | input DI_valid, | + | input DI_valid, |
- | output DI_ready, | + | output DI_ready, |
input DI_enable, | input DI_enable, | ||
- | | + | input pktend_arm, |
+ | // PKTEND is asserted as soon output becomes idle | ||
+ | // recommended procedure for accurate packet transfers: | ||
+ | // * DI_valid goes low after last data of package | ||
+ | // * monitor PKTEND and hold DI_valid until PKTEND is asserted (PKTEND = 0) | ||
+ | | ||
// setting to 0 disables this feature | // setting to 0 disables this feature | ||
- | + | // signals | |
- | // Signals | + | |
output reg [15:0] DO, // data read from EZ-USB | output reg [15:0] DO, // data read from EZ-USB | ||
- | output reg DO_valid, | + | output reg DO_valid, |
- | input DO_ready, | + | input DO_ready, |
- | // DO and DO_valid are hold if DO_ready is 0 | + | |
// set to 0 to disable data reads | // set to 0 to disable data reads | ||
// debug output | // debug output | ||
- | output [3:0] status | + | output [6:0] status |
); | ); | ||
</ | </ |