当前位置: 首页 > news >正文

FPGA 综合笔记

仿真时阻塞赋值和非阻塞赋值
Use of Non-Blocking Assignment in Testbench : Verilog

Use of Non-Blocking Assignment in Testbench : Verilog - Stack Overflow

non-blocking assignment does not work as expected in Verilog

non-blocking assignment does not work as expected in Verilog - Electrical Engineering Stack Exchange

This is actually quite similar to a question I answered previously, but I will try to build up a canonical answer for this somewhat common issue.

In a zero-delay simulation like this, the test flip-flop has a setup time and a hold time of zero:

```math

Tsetup=Thold=0

```

What this means is that the instant the sensitive clock edge occurs, the output is updated, regardless of what happened immediately before or after that instant. This is not like real hardware which would usually have a non-zero 𝑇𝑠𝑒𝑡𝑢𝑝 and 𝑇ℎ𝑜𝑙𝑑.

I ran your testbench, and the results are pretty clear. The valid signal changes at the same time the clock signal does. You have delayed them by precisely the same amount. So at the very edge when the clock is high, the valid signal has also changed:

image-20240610165752339

Both the input (div_valid), and the clock (gclk) go high at the same time: 220 ns. Therefore, the DFF latches this new data, and the output changes instantly since there is also 0 propagation delay. This simulation would look less confusing if we just chose a different delay value for the input to the design:

image-20240610165807953

In this case, we update the input on the falling edge of the clock (620 ns). It is much more clear now that the next clock edge (640 ns) will be when the DFF updates its output.

Curious state transitions in state machine RTL simulation

digital logic - Curious state transitions in state machine RTL simulation - Electrical Engineering Stack Exchange

image-20240610165840485

Pitfall: If your testbench updates the TxSync input exactly at the rising clock edge, You will just have a glitch in nextState. Your simulator may remove this glitch, making it look like nextState never entered State_WRITETOLANE1, when in fact it did, just for a very brief moment. This would make it look like currentState latched a value that nextState never had.

Remedy: Don't update the inputs exactly at the rising clock edge. Add some small delay so that the simulation can be more clearly understood. In my case, I updated the input at the falling clock edge. But the update time is arbitrary if you are doing a 0 delay simulation.

陷阱:如果您的测试台在上升的时钟边缘精确更新了 TxSync 输入,那么 nextState 中将会出现一个毛刺。您的模拟器可能会消除这个毛刺,使其看起来 nextState 从未进入过 State_WRITETOLANE1 状态,但实际上它确实进入过,只是非常短暂。这会让它看起来 currentState 捕获了一个 nextState 从未拥有的值。

解决方法:不要在上升的时钟边缘精确更新输入。增加一些小延迟,以便模拟更清晰地理解。在我的情况下,我是在下降的时钟边缘更新输入的。但如果您正在进行零延迟模拟,更新时间是任意的。

Quartus 编译错误
Can't place multiple pins assigned to pin location

Error (176310): Can't place multiple pins assigned to pin location Pin_101 (IOPAD_X34_Y18_N21) Info (176311): Pin ch1_dac[3] is assigned to pin location Pin_101 (IOPAD_X34_Y18_N21) Info (176311): Pin ALTERA_nCEO is assigned to pin location Pin_101 (IOPAD_X34_Y18_N21)

解决办法:

菜单->Assignments->Device->Device and Pin Options:

image-20240625094814057

将相关引脚改为普通 IO:

image-20240625094908135

仿真通过,上板验证失败

解决办法:板子断电,上电,再烧录

一个可能的原因:FPGA 器件支持除法吗?

固化程序启动失败

故障描述

EP4CE6E22C8 通过 jic 文件固化成功,但是启动失败,FPGA 的 CONF_DONE 引脚输出总是低。实际该引脚在配置期间为低,配置成功后为高。

image-20240804162554766

启动失败板子:带10k 上电阻,CONIFG_DONE 脚对地95M电阻,对VCC电阻:32k

启动 OK 的板子:CONFIG_DONE 脚对比:102M,, 对 VCC电阻:102M

故障原因

怀疑1:板子 FPGA 引脚有四根分线,怀疑是飞线过多,在操作时烧了板子。

怀疑2: CONF_DONE 引脚的 R27、D1 是手焊的,可能在焊接时烧了板子?

尝试

测量 FPGA 晶振频率: OK

尝试重新焊接 R19 ,失败

尝试更换 W25Q16: 失败

尝试重新编译: 失败

FPGA 坏了,只能更换FPGA

http://www.lryc.cn/news/429750.html

相关文章:

  • Android MVVM框架详解与应用
  • 浅析KHD-厨帽检测算法从源码到实际应用的方案
  • ESXi里的FreeBSD装bhyve Ubuntu子系统,外网不通,子系统里无法ping通外面(使用NAT解决)
  • Connectionist Logic Systems and Hybrid Systems by Translation
  • 盘点数据摆渡的8种常用方式 最推荐哪一种?
  • 仿照ContentLoadingProgressBar 的特点在Android项目中自定义Loading对话框
  • 基于数据复杂度的数据库选型
  • QT基础知识5
  • C++中vector存放内置数据类型
  • shell编程:安装部署前常见环境检查
  • 思特科技:国家宝藏数字体验馆展现东方美学 让“文物活起来”
  • ES6笔记总结(Xmind格式):第二天
  • Kotlin 流flow、ShareFlow、StateFlow、Channel的解释与使用
  • 【个人学习】JVM(7):方法区概述、方法区内部结构、垃圾回收等
  • @Scheduled 定时任务自定义
  • 一种新颖的面试方式
  • 【Linux】生产消费模型实践 --- 基于信号量的环形队列
  • Science Robotics 与蜜蜂群互动的蜂窝型机器人系统
  • Vue 计算属性:优雅地处理数据逻辑
  • C++中`union`
  • Linux——网络(1)
  • 【五】阿伟开始学Kafka
  • Java—Arrays api
  • Java - 基数排序算法介绍、应用场景和示例代码
  • Django 后端架构开发:文件云存储,从本地存储到腾讯COS桶集成
  • 【系统分析师】-综合知识-计算机网络与信息安全
  • C++ | Leetcode C++题解之第363题矩形区域不超过K的最大数值和
  • python动画:场景的线性变换展示
  • HBase体系架构与环境搭建
  • 海思SD3403/SS928V100开发(16)Tsensor驱动开发