- 博客(25)
- 收藏
- 关注
原创 FPGA为何要尽量减少组合逻辑的使用
FPGA的硬件结构决定了信号的传播时间是不可控的,它受制于布线延迟、逻辑单元的处理时间等因素。在FPGA设计中,组合逻辑的使用确实需要谨慎,尤其是要尽量减少它的复杂性。如果组合逻辑过于复杂,可能需要多个LUT级联,这不仅增加了资源消耗,还延长了信号的传播路径,进一步加剧了延迟问题。相比之下,时序逻辑通过引入寄存器,将信号的传播分段处理,从而降低了路径延迟,并使得时序分析更加可控。通过在组合逻辑中插入寄存器,可以将复杂的逻辑路径分解为多个阶段,从而降低每个阶段的延迟,提高系统的整体性能。
2025-03-11 19:26:34
935
1
原创 通俗易懂,什么是cache一致性
缓存一致性就是让所有 CPU 的缓存数据“团结得像一个缓存”,即使数据被多处复制,也要保证所有人看到的是同一份最新内容!
2025-03-01 08:52:02
601
原创 Xilinx kintex-7系列 FPGA支持PCIe 3.0 吗?
Does the Xilinx kintex-7 FPGA support PCIe3.0?
2025-02-12 16:28:11
884
原创 PCIe 的 Flow Control
PCIe(Peripheral Component Interconnect Express)通过一种基于信用(Credit-Based)的流量控制(Flow Control)机制来确保数据传输的可靠性,避免接收端缓冲区溢出或数据丢失。
2025-02-12 15:02:43
964
原创 关于FPGA加速推理大语言模型时,内存限制问题的解决方案的思考。
以 >150MB/s 的速度从目标系统检索内存。实际带宽远不止这点,这是他转成usb外设后的速度。真正的带宽瓶颈可能是pcie和你电脑内存的速度。原理大致就是FPGA通过pcie接口直接访问电脑主机的内存,绕过CPU,简称DMA,直接内存访问。想象一下你的主机插满128G的内存。说实话开发难度还是有点大的你还得懂pcie。今天洗澡的时候我突然想到了之前在B站看到的直接用FPGA读取PC内存的外挂。然而对于百亿量级参数的大模型,大多数FPGA上那几个G的DDR根本不够使。证明了逻辑实现大模型推理的可行性。
2024-06-03 10:22:38
520
5
原创 AXI interconnecte 多主机 读写DDR,PL和软核共享DDR
PL 和 Microblaze均能正常对DDR读写,还可挂载其他外设。axi总线debug可以用system_ila,很方便。后续更新具体实现方法。
2024-05-30 18:53:04
427
原创 一种多通道数据源DDR缓存的FPGA实现方法
0013] 2)设置写FIFO水位线,目的是从写FIFO中读出数据时保证FIFO必须有一定的数据。写FIFO中取数据至DDR对应的地址空间内 ,再将DDR地址空间中取数据写到读FIFO中,其中。[0024] 进一步,所述的数据源通过多个通道将数据先写入异步FIFO端口的写FIFO,再从。对接量太小,这会导致DDR带宽利用率降低,设置的太大,写FIFO和读FIFO所需缓存的数据。设置读FIFO的水位线,目的是防止从DDR读出数据时写到读FIFO中会出现数据溢出,取数据存到设置的DDR对。
2024-05-21 20:07:07
528
原创 C语言-GPS经纬度数据提取
一帧数据:const char input[1024] ="$GNGGA,084852.000,2236.9453,N,11408.4790,E,1,05,3.1,89.7,M,0.0,M,,*48 $GNGLL,2236.9453,N,11408.4790,E,084852.000,A,A*4C $GPGSA,A,3,10,18,31,,,,,,,,,,6.3,3.1,5.4*3E $BDGSA,A,3,06,07,,,,,,,,,,,6.3,3.1,5.4*24 $GPGSV,3,1,09,10,78
2021-04-20 21:50:09
2297
2
原创 通过Windows命令行cmd访问树莓派
输入命令:ssh –p端口号 用户名@IP地址点击回车根据提示输入密码例如:方式一:ssh –p22 root@127.0.0.1方式二:省略了方式一的port端口号ssh root@192.168.1.254方式三:直接@名称ssh root@OpenWrtssh进入openwrt...
2021-04-19 14:44:17
1884
原创 图书管理系统
添加新书查询借阅二次添加新书(读取已有的.xls并修改)代码:import xlwtimport xlrddef read_old_data(row0_len): try: filename=".\图书.xls" old_data = []#读取表格已有内容 data = xlrd.open_workbook(filename) sheet0 = data.sheet_by_index(0)
2021-04-14 23:09:21
465
1
原创 UART、I2C、SPI的优缺点和区别
UART、I2C、SPI的优缺点和区别协议UARTSPII2C总线3(RX、TX、GND)4(CS、CLK、MOSI、MISO)4(VCC、GND、SCL、SDA)同/异步异步同步同步全/半双工半双工全双工半双工传输速度低高中应用场景板内/间板内(不同芯片之间)板内模式一对一一对多一对多/多对多一主多从实现X各CS地址名词解释:全双工:(Full Duplex)是指在发送数据的同时也能够接收数据,
2021-04-01 21:17:59
9194
1
原创 Verilog练习_6_More Verilog Features(合集)
1、Conditional运用:Verilog has a ternary conditional operator ( ? : )(condition ? if_true : if_false)找最小我的代码:module top_module ( input [7:0] a, b, c, d, output [7:0] min);// wire [7:0] min1,min2,min3; assign min1 = a < b ? a:b ; as
2021-03-31 22:02:46
232
原创 Verilog练习_6_Procedure(合集)
1、Alwaysblock1// synthesis verilog_input_version verilog_2001module top_module( input a, input b, input sel_b1, input sel_b2, output wire out_assign, output reg out_always ); assign out_assign = a & b ; always @(
2021-03-30 09:42:23
364
原创 Verilog中的XOR(异或)和XNOR(同或)
input a,b;output c异或 XORassign c = a ^ b ;同或 XNORassign c = ~a ^ b ;
2021-03-30 08:25:02
28382
原创 Verilog练习_6_Module cseladd
注意:第一级加法器与之前相同,但是我们复制了第二级加法器,一个假设进位= 0,另一个假设进位= 1,然后使用快速2比1多路复用器选择哪个结果碰巧是正确的。我的代码:module top_module( input [31:0] a, input [31:0] b, output [31:0] sum); wire [15:0] sum_1,sum_2,sum_3 ; wire cout_out ; add16 add1 ( ..
2021-03-29 23:30:38
258
原创 Verilog练习_5_Module addsub
注意:Use a 32-bit wide XOR gate to invert the b input whenever sub is 1. (This can also be viewed as b[31:0] XORed with sub replicated 32 times.我的代码:module top_module( input [31:0] a, input [31:0] b, input sub, output [31:0] sum); wir.
2021-03-29 23:09:53
456
原创 Verilog练习_4_Module fadd
module top_module ( input [31:0] a, input [31:0] b, output [31:0] sum);// wire cout_cin; wire [15:0] sum_1 ,sum_2; add16 add1 ( .a(a[15:0]), .b(b[15:0]), .cin(0), .cout(cout_cin), .
2021-03-29 22:26:14
498
原创 Verilog练习_3_Module add
我的答案:module top_module( input [31:0] a, input [31:0] b, output [31:0] sum); wire cout_cin ; wire [15:0] sum_1 , sum_2 ; add16 a1 ( .a(a[15:0]), .b(b[15:0]), .cin(0), .cout(cout_cin), .
2021-03-29 20:08:14
451
原创 Verilog练习_2_Module shift8
This exercise is an extension of module_shift. Instead of module ports being only single pins, we now have modules with vectors as ports, to which you will attach wire vectors instead of plain wires. Like everywhere else in Verilog, the vector length of th
2021-03-29 19:19:50
502
原创 Verilog练习_1_3Modules
题目:You are given a module my_dff with two inputs and one output (that implements a D flip-flop). Instantiate three of them, then chain them together to make a shift register of length 3. The clk port needs to be connected to all instances.The module provi
2021-03-26 13:48:21
234
转载 树莓派4B/400/3B+等等 的USB大容量存储启动
仅在Raspberry Pi 2B v1.2、3A +,3B,3B +,4B,400,计算模块3,计算模块3+和计算模块4上可用。本页说明如何从USB大容量存储设备(如闪存驱动器或USB硬盘)引导Raspberry Pi。连接USB设备(尤其是硬盘和SSD)时,请注意其电源要求。如果您希望在Pi上连接多个SSD或硬盘,则通常需要外部电源-有源硬盘盒或有源USB集线器。请注意,Pi 4B之前的型号存在已知问题,无法使用某些USB设备引导。树莓派400要从USB大容量存储设备启动Pi 400,只需使用Ra
2021-01-31 13:29:06
2464
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人