大家好,我们现在使用ICE40HX1K(CB132) 的LVDS功能,是否有相关例程?
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /www/wwwroot/chipdebug.com/wp-content/themes/zibll/inc/functions/shop/widgets/widgets-product.php:652 Stack trace: #0 /www/wwwroot/chipdebug.com/wp-content/themes/zibll/inc/csf-framework/classes/widget-options.class.php(672): zib_shop_widget_ui_oneline_product_lists() #1 /www/wwwroot/chipdebug.com/wp-includes/class-wp-widget.php(394): CSF_Widget->widget() #2 /www/wwwroot/chipdebug.com/wp-includes/widgets.php(847): WP_Widget->display_callback() #3 /www/wwwroot/chipdebug.com/wp-content/themes/zibll/inc/functions/bbs/inc/template.php(42): dynamic_sidebar() #4 /www/wwwroot/chipdebug.com/wp-content/themes/zibll/inc/functions/bbs/page/posts.php(36): zib_bbs_page_template() #5 /www/wwwroot/chipdebug.com/wp-includes/template.php(880): require_once('...') #6 /www/wwwroot/chipdebug.com/wp-content/themes/zibll/inc/functions/bbs/inc/class.init.php(428): load_template() #7 /www/wwwroot/chipdebug.com/wp-includes/class-wp-hook.php(353): zib_bbs->template_redirect() #8 /www/wwwroot/chipdebug.com/wp-includes/class-wp-hook.php(377): WP_Hook->apply_filters() #9 /www/wwwroot/chipdebug.com/wp-includes/plugin.php(523): WP_Hook->do_action() #10 /www/wwwroot/chipdebug.com/wp-includes/template-loader.php(23): do_action() #11 /www/wwwroot/chipdebug.com/wp-blog-header.php(19): require_once('...') #12 /www/wwwroot/chipdebug.com/index.php(17): require('...') #13 {main} thrown in /www/wwwroot/chipdebug.com/wp-content/themes/zibll/inc/functions/shop/widgets/widgets-product.php on line 652


ICE的LVDS差分对使用可以参考文档《UsingDifferentialIOLVDSSubLVDSiniCE40Devices.pdf》,文档中有verilog代码片段,可能由于这个比较简单,我没有在官网找到工程可以参考。
VHDL的代码示例没有提供,我写了一下(本人不懂VHDL,以下内容仅供参考):
1.首先你要搞清楚你要用哪种类型的LVDS差分对,有三种,如下表(文档第8页),分别是LVDS差分输入原语SB_IO、LVDS差分输出原语SB_IO、LVDS差分时钟SB_GB_IO,其中输入输出的原语都是SB_IO,只是要注意如果是LVDS差分输出,在锁定管脚时IO属性要设为SB_LVCMOS。
2.假定你用的是LVDS输入,那么按上表,原语是SB_IO,按照SB_IO这个表(文档第8页)的端口定义,先按VHDL的格式声明这个SB_IO元件。
SB_IO元件声明大概如下(本人不懂VHDL,以下内容为检索网络所得,仅供参考), 每个端口的定义及位宽详见文档。
3.然后在你需要使用地方按VHDL的格式例化一个SB_IO。
另外两种原语类似。
还是贴一段我的代码吧: