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

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

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 10053|回复: 17

[求助] 求教verilog i2c小程序

[复制链接]
发表于 2014-1-5 22:12:06 | 显示全部楼层 |阅读模式

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

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

x
各位大神,请留步啊
本人初学FPGA,拼接了一个verilog小程序,实现的功能是从串口发送数据到FPGA内部存储器,然后再从内部存储器读取数据到串口,在modelsim上跑通了,可是到了板子上出现了问题,现在问题是这样的,RTL-simulation没问题,Gate-Level Simulation跑不通,提示有
Critical Warning (332148): Timing requirements not met
Info (11105): For recommendations on closing timing, run Report Timing Closure Recommendations in the TimeQuest Timing Analyzer.
Critical Warning (332012): Synopsys Design Constraints File file not found: 'uart_i2c.sdc'. A Synopsys Design Constraints File is required by the TimeQuest Timing Analyzer to get proper timing constraints. Without it, the Compiler will not properly optimize the design.
谁能帮我调试下,告诉我是什么原因,实在是没脾气了,求指教啊
还有这个网站真的不错

uart_i2c.rar (7.23 MB, 下载次数: 83 )
 楼主| 发表于 2014-1-5 22:13:08 | 显示全部楼层
沙发自己来,求围观
发表于 2014-1-6 14:59:13 | 显示全部楼层
你用的是什么仿真工具
 楼主| 发表于 2014-1-6 17:02:29 | 显示全部楼层
回复 3# gygyg


   modelsim啊,我估计可能是我代码的问题,在板子上跑不通,能不能帮我调试一下,先谢过了,是实在是愁得不行啊
发表于 2014-1-7 08:51:48 | 显示全部楼层
回复 4# qqwoheni


    你自己写的吗?有开源代码可以下载啊
发表于 2014-1-7 11:25:29 | 显示全部楼层
你的错误信息显示:File file not found: 'uart_i2c.sdc',

你能不能提供这个约束文件呢?“uart_i2c.sdc"

另外,你是用串口,还是i2c?
 楼主| 发表于 2014-1-8 15:37:05 | 显示全部楼层
回复 5# gygyg


   是我拼接的一个i2c和uart,开源代码是哪个,能给我推荐下吗?最好是有注释的,我太菜,怕看不明白啊
 楼主| 发表于 2014-1-8 15:44:58 | 显示全部楼层
回复 6# adamsogood


   既有串口又有i2c,是从电脑通过串口发送数据到fpga,fpga通过i2c将数据写入EEPROM,然后再从EEPROM读取数据,通过串口发送到电脑端。我自己编了个约束文件(也不知道对不对),你自己添加进工程试试,谢谢你的回复啊 uart_i2c.rar (1 KB, 下载次数: 11 )
 楼主| 发表于 2014-1-8 15:47:55 | 显示全部楼层
回复 6# adamsogood


   既有串口又有i2c,是从电脑通过串口发送数据到fpga,fpga通过i2c将数据写入EEPROM,然后再从EEPROM读取数据,通过串口发送到电脑端。我自己编了个约束文件(也不知道对不对),下面是sdc代码,你自己添加进工程试试,谢谢你的回复啊




  1. ## Generated SDC file "uart_i2c.sdc"

  2. ## Copyright (C) 1991-2013 Altera Corporation
  3. ## Your use of Altera Corporation's design tools, logic functions
  4. ## and other software and tools, and its AMPP partner logic
  5. ## functions, and any output files from any of the foregoing
  6. ## (including device programming or simulation files), and any
  7. ## associated documentation or information are expressly subject
  8. ## to the terms and conditions of the Altera Program License
  9. ## Subscription Agreement, Altera MegaCore Function License
  10. ## Agreement, or other applicable license agreement, including,
  11. ## without limitation, that your use is for the sole purpose of
  12. ## programming logic devices manufactured by Altera and sold by
  13. ## Altera or its authorized distributors.  Please refer to the
  14. ## applicable agreement for further details.


  15. ## VENDOR  "Altera"
  16. ## PROGRAM "Quartus II"
  17. ## VERSION "Version 13.1.0 Build 162 10/23/2013 SJ Full Version"

  18. ## DATE    "Sat Jan 04 11:51:45 2014"

  19. ##
  20. ## DEVICE  "EP4CE6E22C8"
  21. ##


  22. #**************************************************************
  23. # Time Information
  24. #**************************************************************

  25. set_time_format -unit ns -decimal_places 3



  26. #**************************************************************
  27. # Create Clock
  28. #**************************************************************

  29. create_clock -name {clk} -period 20.000 -waveform { 0.000 10.000 } [get_ports {clk}]


  30. #**************************************************************
  31. # Create Generated Clock
  32. #**************************************************************



  33. #**************************************************************
  34. # Set Clock Latency
  35. #**************************************************************



  36. #**************************************************************
  37. # Set Clock Uncertainty
  38. #**************************************************************

  39. set_clock_uncertainty  -setup -rise_from clk -rise_to clk 0.150
  40. set_clock_uncertainty  -hold -rise_from clk -rise_to clk 0.150

  41. #**************************************************************
  42. # Set Input Delay
  43. #**************************************************************

  44. set_input_delay -add_delay  -clock [get_clocks {clk}]  2.000 [get_ports {clk}]
  45. set_input_delay -add_delay  -clock [get_clocks {clk}]  2.000 [get_ports {rs232_rx}]
  46. set_input_delay -add_delay  -clock [get_clocks {clk}]  2.000 [get_ports {rst_n}]
  47. set_input_delay -add_delay  -clock [get_clocks {clk}]  2.000 [get_ports {sda}]


  48. #**************************************************************
  49. # Set Output Delay
  50. #**************************************************************

  51. set_output_delay -add_delay  -clock [get_clocks {clk}]  1.500 [get_ports {rs232_tx}]
  52. set_output_delay -add_delay  -clock [get_clocks {clk}]  1.500 [get_ports {scl}]
  53. set_output_delay -add_delay  -clock [get_clocks {clk}]  1.500 [get_ports {sda}]


  54. #**************************************************************
  55. # Set Clock Groups
  56. #**************************************************************



  57. #**************************************************************
  58. # Set False Path
  59. #**************************************************************



  60. #**************************************************************
  61. # Set Multicycle Path
  62. #**************************************************************



  63. #**************************************************************
  64. # Set Maximum Delay
  65. #**************************************************************



  66. #**************************************************************
  67. # Set Minimum Delay
  68. #**************************************************************



  69. #**************************************************************
  70. # Set Input Transition
  71. #**************************************************************



复制代码
发表于 2014-1-9 21:31:37 | 显示全部楼层
顶一个
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

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

GMT+8, 2024-4-26 00:47 , Processed in 0.047940 second(s), 9 queries , Gzip On, Redis On.

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