
FPGA
主要介绍一些EDA的基本代码
别叫我派大星
哦豁,拐咯
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【Verilog】FPGA控制RGB灯WS2812B
【Verilog】FPGA控制RGB灯WS2812B最近学业繁忙,因此好久没有更新博客,今日闲来无事,准备开始整理一下最近写的东西今天先更新一下短学期做的东西吧——FPGA控制RGB灯WS2812B好久没接触Verilog和FPGA了,所以做的可能有点烂,望读者勿怪,小弟上传只是为了记录和分享一下最近做的东西。设计目标代码老师提供了灯的驱动代码:TOP.vmodule TOP( input clk, input rst_n, output RZ_data);//------原创 2020-07-20 01:49:39 · 8290 阅读 · 15 评论 -
【Verilog_16】: 序列发生器、序列校验器、序列检测器一条龙服务
序列发生器、序列校验器、序列检测器一条龙服务序列发生器:产生指定序列author : Mr.Maoe-mail : 2458682080@qq.commodule seq_generator( input clk , input rst_n , output reg data );//规定输出数据 p...原创 2020-01-28 18:30:17 · 1466 阅读 · 0 评论 -
【Verilog_15】: 设计一个16-4优先编码器
设计一个16-4优先编码器法一author : Mr.Maoe-mail : 2458682080@qq.commodule encoder_16_4(x, y, e) ; input wire [15:0] x ; output reg [3:0] y ; output reg e ; integer i ; integer j=0 ; ...原创 2020-01-28 18:22:31 · 10188 阅读 · 0 评论 -
【Verilog_14】: 设计一个5-32译码器
设计一个5-32译码器法一:这是个简单又笨的方法author : Mr.Maoe-mail : 2458682080@qq.commodule decoder_5_32(en, data_in, data_out) ; input en ; input [4:0] data_in ; output reg [31:0] data_out ; ...原创 2020-01-28 18:20:34 · 7427 阅读 · 2 评论 -
【Verilog_13】: RTL ←→Verilog
RTL ←→Verilogmodule rtlxx ( //分频器,周期为div_param input clk, input reset_n, input a, input b, input c, output reg y, inout reg x);reg t,k; always @(posedge clk or negedge reset_n) if...原创 2020-01-28 18:16:36 · 751 阅读 · 0 评论 -
【Verilog_12】: 设计一个7.5分频的分频器,不能使用PLL
设计一个7.5分频的分频器,不能使用PLL法一author : Mr.Maoe-mail : 2458682080@qq.commodule Fre_div_decimal(clk, rst, div_out, count, clkN, clkP); input clk, rst ; output div_out, clkN, clkP ; output [4:0...原创 2020-01-28 18:11:05 · 781 阅读 · 0 评论 -
【Verilog_11】: 设计一个11分频的分频器,要求输出占空比为50%,不能使用PLL
5.设计一个11分频的分频器,要求输出占空比为50%,不能使用PLL法一author : Mr.Maoe-mail : 2458682080@qq.commodule div11x( input clk, input reset_n, output q);reg [3:0] cnt;reg x_p,x_n;always @(posedge clk,negedg...原创 2020-01-28 18:08:57 · 3863 阅读 · 0 评论 -
【Verilog_10】: 设计24位无符号数乘法器
设计24位无符号数乘法器法一author : Mr.Maoe-mail : 2458682080@qq.commodule muln#( parameter N=24)( input [N-1:0] A, input [N-1:0] B, output [2*N-1:0] R);assign R = A * B;endmodule 法二author : Mr.M...原创 2020-01-27 14:43:47 · 1640 阅读 · 0 评论 -
【verilog_9】: 设计16位二进制计数器,带异步复位、同步使能、同步装载、同步清零、同步置位
2.设计16位二进制计数器,带异步复位、同步使能、同步装载、同步清零、同步置位法一author : Mr.Maoe-mail : 2458682080@qq.commodule CNT_16B2(rst_a, en_s, load_s, clr_s, clk, q, cnt, data) ;input rst_a, en_s, load_s, clr_s, clk ;input ...原创 2020-01-27 14:41:51 · 12740 阅读 · 1 评论 -
【verilog_8】: 设计60进制计数器,带异步复位、同步使能、同步装载、同步清零、同步置位
1.设计60进制计数器,带异步复位、同步使能、同步装载、同步清零、同步置位法一author : Mr.Maoe-mail : 2458682080@qq.commodule cnt60x( input clk, input reset, input [5:0] d, input en, input load, input sclr, output reg[5:0] q,...原创 2020-01-27 14:39:35 · 16019 阅读 · 3 评论 -
【verilog_7】: 设计一个 32 位 ALU 支持加法、减法、与、或、异或、取非这六中运算
设计一个 32 位 ALU 支持加法、减法、与、或、异或、取非这六中运算author : Mr.Maoe-mail : 2458682080@qq.commodule ALU_32( input [31:0] data_a_in, input [31:0] data_b_in, input carry_in, input [3:0] op_code, output reg car...原创 2020-01-27 14:35:00 · 3950 阅读 · 0 评论 -
【verilog_6】: 设计一个 16 位串入并出移位寄存器
设计一个 16 位串入并出移位寄存器author : Mr.Maoe-mail : 2458682080@qq.commodule shifter_s1p16( //串行右移专并行输出 input clk, input reset_n, input serial_in, output reg [15:0] parallel_out); always@(posedge cl...原创 2020-01-27 14:33:40 · 5723 阅读 · 0 评论 -
【Verilog_5】: 设计一个脉冲发生器,已知系统时钟为 50MHz,生成脉冲宽度为 1ms,脉 冲间隔可调,最大间隔为 1s
设计一个脉冲发生器,已知系统时钟为 50MHz,生成脉冲宽度为 1ms,脉冲间隔可调,最大间隔为 1sauthor : Mr.Maoe-mail : 2458682080@qq.commodule pulse_gen #( parameter N = 26,parameter DUTY = 1000*50,parameter PERIOD_MAX = 50*1000*1000 )...原创 2020-01-27 14:32:15 · 5788 阅读 · 0 评论 -
【verilog_4】: 设计一个 16 选 1 选择器 Design a 16-to-1 selector
设计一个 16 选 1 选择器 Design a 16-to-1 selector法一author : Mr.Maoe-mail : 2458682080@qq.commodule mux16_1( input [3:0] sel, input [15:0] D, output Y);assign Y = D[sel];endmodule 法二author : Mr...原创 2020-01-27 14:29:55 · 5933 阅读 · 9 评论 -
【verilog_3】: 设计一个可以预置分频器,最大分频系数为 100000
设计一个可以预置分频器,最大分频系数为 100000Design a preset frequency divider with a maximum frequency dividing coefficient of 100000.author : Mr.Maoe-mail : 2458682080@qq.commodule freq_div#( parameter N = 17 ...原创 2020-01-27 14:25:50 · 3171 阅读 · 6 评论 -
【Verilog_2】: 设计 n 位乘加器(先乘后加)
设计 n 位乘加器(先乘后加)Design a n-bit multiplier (firstly multiply and then add)`author : Mr.Maoe-mail : 2458682080@qq.commodule MAC_N#( parameter N = 16)( input [N - 1: 0 ] A, input [N - 1: 0 ] B,...原创 2020-01-27 14:22:26 · 1915 阅读 · 0 评论 -
【Verilog_1】: 设计 4 位 BCD 十进制计数器
设计 4 位 BCD 十进制计数器Design a 4-digit BCD decimal countermodule bcd_4d_cnt( //4位十进制计数器 input clk, input reset_n, input en, //同步使能 input load, //同步装载 input [15:0] d, output reg [15:0] bcd);...原创 2020-01-27 14:17:59 · 9906 阅读 · 0 评论