摘要: int:4字节,有符号 char:字符型变量,只占一个字节 使用union联合体,数据共享同一段内存 1 #include<stdio.h> 2 3 union ci{ 4 char c[4]; 5 int i; 6 }uci; 7 8 int main() 9 { 10 printf("int值: 阅读全文
posted @ 2020-08-10 10:44 will_w 阅读(5042) 评论(0) 推荐(0)
摘要: 有编号1~100个灯泡,起初所有的灯都是灭的。有100个同学来按灯泡开关,如果灯是亮的,那么按过开关之后,灯会灭掉。如果灯是灭的,按过开关之后灯会亮。现在开始按开关。第1个同学,把所有的灯泡开关都按一次(按开关灯的编号: 1,2,3,......100)。第2个同学,隔一个灯按一次(按开关灯的编号: 阅读全文
posted @ 2020-07-17 15:04 will_w 阅读(1434) 评论(0) 推荐(0)
摘要: 1 module sync_fifo( 2 input sys_clk, 3 input sys_rst_n, 4 input [7:0] wr_data, 5 input wr_en, 6 input rd_en, 7 8 output reg [7:0] rd_data, 9 output re 阅读全文
posted @ 2020-07-16 11:15 will_w 阅读(277) 评论(0) 推荐(0)
摘要: module divide_3 ( input clk, input rst_n, output clk_out ); parameter N = 3 ;//分频系数 reg div_1,div_2; reg [1:0] cnt_1,cnt_2; assign clk_out = div_1 | d 阅读全文
posted @ 2020-07-15 16:18 will_w 阅读(283) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/pure-z/p/12606551.html 一、GPIO 库函数:#include "xgpiops.h" 1、XGpioPs_LookupConfig(u16 DeviceId) @param DeviceId是要查找的设备的唯一设备ID。 @re 阅读全文
posted @ 2020-03-31 17:15 will_w 阅读(3186) 评论(0) 推荐(0)
摘要: Fanout即扇出,模块直接调用的下级模块的个数,如果这个数值过大的话,在FPGA直接表现为路径延时(net delay)较大,不利于时序收敛。因此,在写代码时应尽量避免高扇出的情况。但是,在某些特殊情况下,受到整体结构设计的需要或者无法修改代码的限制,则需要通过其它优化手段解决高扇出带来的问题。以 阅读全文
posted @ 2020-03-12 15:36 will_w 阅读(2427) 评论(0) 推荐(0)
摘要: Bubble Pushing是一种将De Morgan定理直接应用于逻辑图的技术。 1.更改逻辑门(AND to OR and OR to AND)。 2.在没有输入的输入和输出中添加气泡,并删除原始气泡。 可以用德摩根定律对逻辑门进行处理,以便在输入或输出上出现气泡,以满足信号条件,而不是特定的逻 阅读全文
posted @ 2020-03-12 11:50 will_w 阅读(1117) 评论(0) 推荐(0)