在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 704|回复: 4

[原创] USB2.0 IP Verilog

[复制链接]
发表于 2023-11-20 18:10:13 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 dodoee 于 2023-11-20 20:38 编辑

USB2.0 IP verilog  商业廉价版
Malogic USB2.0 IP (verilog)是从开源项目修改而来,增加完善的中文版specification和验证环境 ,并且在FPGA上验证过,购买IP 送配套的Malogic FPGA Board ,专门验证USB 2.0 IP 的,板载UTMI 高速 PHY CY7C68000,在此板上用此IP和CY7C68000实现了USB2UART。
230008vvgrf4bcdrjvc7ec.jpg
可看演示https://www.bilibili.com/video/B ... id_from=333.999.0.0
百度盘有USB协议的视频课程https://pan.baidu.com/s/1T0eOTcukOgpl14w5ubzpKA?pwd=ly01
提取code:ly01

付款后可获得USB2.0 IP Verilog source code(包括USB to UART 例程)、中文版specification和验证环境,同时Malogic FPGA Board 也会寄出,6天内交付完善版的中文版specification,并提供技术支持。

Malogic USB2.0 IP Core支持的性能:
高速和全速;
UTMI 接口;
cpu 接口AXI4-Lite
4 个端点;
提供 USB to UART 例程,Verilog描述;
可定制DMA接口(需要时间,单独收费);
提供技术支持。



购买链接:https://item.taobao.com/item.htm ... wEG&id=748930555868

英文简单文档如下:

### USB Peripheral Interface

This component is a simple USB Peripheral Interface (Device) implementation with an AXI4-Lite slave register interface, and
with a UTMI interface for connection to a USB PHY.

It has been designed to support USB2.0, but currently has been only tested in Full Speed peripheral mode (12Mbit/s).
##### Features
* USB 2.0 Device mode support.
* Simple register data read/write interface (low performance / not DMA based).
* UTMI PHY interface (see my UTMI to ULPI Conversion wrapper project to allow connection to a ULPI PHY e.g. USB3300)
* Current build configuration has 4 endpoints

##### Limitations
* Only tested for USB-FS (Full Speed / 12Mbit/s) only.
* AXI4-L address and data must arrive in the same cycle.

##### Software
Provided with a USB-CDC test stack (USB Serial port) with loopback/echo example.

To make this functional on your platform;
* Set USB_DEV_BASE to the correct address for the peripheral.
* Implement the millisecond timer functions in timer.h.
* Change USB_BYTE_SWAP16 in usbf_defs.h if your CPU is big endian.

##### Testing
Verified under simulation then tested on FPGA as a USB-CDC mode peripheral (USB serial port) against Linux & Windows PCs.


##### Register Map
| Offset | Name | Description   |
| ------ | ---- | ------------- |
| 0x00 | USB_FUNC_CTRL | [RW] Control Register |
| 0x04 | USB_FUNC_STAT | [RW] Status Register |
| 0x08 | USB_FUNC_ADDR | [RW] Address Register |
| 0x0c | USB_EP0_CFG | [RW] Endpoint 0 Configuration |
| 0x10 | USB_EP0_TX_CTRL | [RW] Endpoint 0 Tx Control |
| 0x14 | USB_EP0_RX_CTRL | [W] Endpoint 0 Rx Control |
| 0x18 | USB_EP0_STS | [R] Endpoint 0 status |
| 0x1c | USB_EP0_DATA | [RW] Endpoint Data fifo |
| 0x20 | USB_EP1_CFG | [RW] Endpoint 1 Configuration |
| 0x24 | USB_EP1_TX_CTRL | [RW] Endpoint 1 Tx Control |
| 0x28 | USB_EP1_RX_CTRL | [W] Endpoint 1 Rx Control |
| 0x2c | USB_EP1_STS | [R] Endpoint 1 status |
| 0x30 | USB_EP1_DATA | [RW] Endpoint Data FIFO |
| 0x34 | USB_EP2_CFG | [RW] Endpoint 2 Configuration |
| 0x38 | USB_EP2_TX_CTRL | [RW] Endpoint 2 Tx Control |
| 0x3c | USB_EP2_RX_CTRL | [W] Endpoint 2 Rx Control |
| 0x40 | USB_EP2_STS | [R] Endpoint 2 status |
| 0x44 | USB_EP2_DATA | [RW] Endpoint Data FIFO |
| 0x48 | USB_EP3_CFG | [RW] Endpoint 3 Configuration |
| 0x4c | USB_EP3_TX_CTRL | [RW] Endpoint 3 Tx Control |
| 0x50 | USB_EP3_RX_CTRL | [W] Endpoint 3 Rx Control |
| 0x54 | USB_EP3_STS | [R] Endpoint 3 status |
| 0x58 | USB_EP3_DATA | [RW] Endpoint Data FIFO |

##### Register: USB_FUNC_CTRL
| Bits | Name | Description    |
| ---- | ---- | -------------- |
| 8 | HS_CHIRP_EN | High-speed Chirp Enable |
| 7 | PHY_DMPULLDOWN | UTMI PHY D+ Pulldown Enable |
| 6 | PHY_DPPULLDOWN | UTMI PHY D+ Pulldown Enable |
| 5 | PHY_TERMSELECT | UTMI PHY Termination Select |
| 4:3 | PHY_XCVRSELECT | UTMI PHY Transceiver Select |
| 2:1 | PHY_OPMODE | UTMI PHY Output Mode |
| 0 | INT_EN_SOF | Interrupt enable - SOF reception |

##### Register: USB_FUNC_STAT
| Bits | Name | Description    |
| ---- | ---- | -------------- |
| 13 | RST | USB Reset Detected (cleared on write) |
| 12:11 | LINESTATE | USB line state (bit 1 = D+, bit 0 = D-) |
| 10:0 | FRAME | Frame number |

##### Register: USB_FUNC_ADDR
| Bits | Name | Description    |
| ---- | ---- | -------------- |
| 6:0 | DEV_ADDR | Device address |

##### Register: USB_EPx_CFG
| Bits | Name | Description    |
| ---- | ---- | -------------- |
| 3 | INT_RX | Interrupt on Rx ready |
| 2 | INT_TX | Interrupt on Tx complete |
| 1 | STALL_EP | Stall endpoint |
| 0 | ISO | Isochronous endpoint |

##### Register: USB_EPx_TX_CTRL
| Bits | Name | Description    |
| ---- | ---- | -------------- |
| 17 | TX_FLUSH | Invalidate Tx buffer |
| 16 | TX_START | Transmit start - enable transmit of endpoint data |
| 10:0 | TX_LEN | Transmit length |

##### Register: USB_EPx_RX_CTRL
| Bits | Name | Description    |
| ---- | ---- | -------------- |
| 1 | RX_FLUSH | Invalidate Rx buffer |
| 0 | RX_ACCEPT | Receive data accepted (read) |

##### Register: USB_EPx_STS
| Bits | Name | Description    |
| ---- | ---- | -------------- |
| 20 | TX_ERR | Transmit error (buffer underrun) |
| 19 | TX_BUSY | Transmit busy (active) |
| 18 | RX_ERR | Receive error - CRC mismatch or buffer overflow |
| 17 | RX_SETUP | SETUP request received |
| 16 | RX_READY | Receive ready (data available) |
| 10:0 | RX_COUNT | Endpoint received length (RD) |

##### Register: USB_EPx_DATA
| Bits | Name | Description    |
| ---- | ---- | -------------- |
| 7:0 | DATA | Read or write from Rx or Tx endpoint FIFO |



 楼主| 发表于 2023-11-20 18:32:16 | 显示全部楼层
卖的是中文版技术文档、验证环境和FPGA验证通过的code 及技术支持,还有Malogic板子。
 楼主| 发表于 2023-11-20 20:37:05 | 显示全部楼层
有些人的FPGA 板子可能连板子都没有,只有个不清不楚的文档,想骗人?
发表于 2023-11-20 21:47:38 | 显示全部楼层
看看
发表于 2023-11-23 09:04:00 | 显示全部楼层
谢谢分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-28 22:49 , Processed in 0.023953 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表