![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
verilog
cherry1307
这个作者很懒,什么都没留下…
展开
-
FPGA——fifo 以及几个信号的理解
Altera provides FIFO functions through the parameterizable single-clock FIFO(SCFIFO) and dual-clock FIFO (DCFIFO) megafunctions用Quartus II的MegaFunction中的FIFO时,通常会用到wrusedw或rdusedw这两个信号,前者标志当前FIFO已经被...转载 2019-12-23 11:34:49 · 1062 阅读 · 0 评论 -
FPGA——UART串口通信2
设计要求从PC的串口调试助手上发送32bit数据到FPGA,FPGA接收到数据以后把接收的数据返回给串口调试助手显示115200bps,32bit顶层架构比特率产生模块和数据接收模块参考UART串口收发的原理与Verilog实现 代码数据缓存模块rxd_flag为数据接收模块数据接收完成信号,每一个8bit数据接收完成的同时,rxd_flag拉高,所以,在数据缓存模块,检测rxd_...原创 2019-08-29 22:05:50 · 1085 阅读 · 0 评论 -
FPGA——SD卡控制器3
硬件设计向sd卡指定扇区地址写入512个字节数据,写完后读出,并验证读出数据是否正确。系统框图sd卡控制器SD卡初始化原创 2019-08-15 13:25:48 · 389 阅读 · 0 评论 -
Verilog —— 四级流水方式的八位全加器
module Four_Adder(out,ina,inb,cin,cout,clk); input[7:0] ina,inb; input cin,clk; output [7:0]out; output cout; reg [7:0]out; reg cout; reg[7:0] tempa,tempb,tempci; reg[5:0] rega1; reg[5:0] reg...原创 2019-07-29 22:22:54 · 1143 阅读 · 0 评论 -
verilog——对串行输入的数据流进行检测。只要发现10010序列,就立即输出高电平。
module seqdet(x,z,clk,rst_n);input clk,rst_n;input x;output z;reg z;reg [2:0] pstate,nstate;parameter s1=3'd0, s2=3'd1, s3=3'd2, s4=3'd3, s5=3'd4, ...原创 2019-07-29 22:21:58 · 2545 阅读 · 0 评论 -
verilog —— 四位串并转换器
#四位串并转换器module serial_pal( //四位串并转换程序 clk,en,rst, in,out ); input cin,clk,en,rst;output[3:0] out;reg[3:0] out;always @ (posedge clk or negedge rst) begin if(!...原创 2019-07-29 22:20:26 · 7276 阅读 · 1 评论 -
verilog——奇偶校验位
#奇偶校验位module parity(bus,odd,even);input [7:0] bus;output odd;output even;assign odd = ^bus;assign even = ~odd;endmodule #模10加法计数器module count10(cout,qout,rst_n,clk);input clk,rst_n;outpu...原创 2019-07-29 22:19:49 · 5189 阅读 · 0 评论 -
python——原码转补码
#原码转化为补码def true2complement(str_bin): str_new = "" flag = True if str_bin[0] == "0": complement = str_bin else: for i in str_bin[1:]: if i == "0":...原创 2019-07-29 12:18:55 · 2661 阅读 · 0 评论 -
python——十进制浮点与有符号16位定点相互转化
#将十进制浮点转化为二进制定点原码S12def float2fix(f,int_bit = 3,decimal_bit = 12 ): bit_num = int_bit + decimal_bit + 1 prec = 1 / 2 ** decimal_bit #精度 decimal_max = (2**12-1)*prec num_max = 2**int_...原创 2019-07-29 12:17:10 · 1601 阅读 · 2 评论 -
python——创建mif文件
from PIL import Imageimport numpy as npfrom float2hex import *import osdef make_mif(file_path = "/home/chenrui/hardware"): img_pil = Image.open("resize_img.png") w,h = img_pil.size img...原创 2019-07-29 11:37:11 · 1236 阅读 · 1 评论