- 博客(35)
- 资源 (1)
- 收藏
- 关注
原创 原因是这样,所谓去除毛刺,就是要避免毛刺的产生,那么得先明白毛刺是如何产生的,其实只要两个时钟相反时切换都换产生毛刺
原因是这样,所谓去除毛刺,就是要避免毛刺的产生,那么得先明白毛刺是如何产生的,其实只要两个时钟相反时切换都换产生毛刺
2022-10-21 16:43:33
135
原创 Error: Flash Download failed - Could not load file ‘..\OBJ\Template.axf‘
keil编译出错了,产生不了烧入单片机的文件。
2022-05-29 16:25:40
4797
1
原创 fpga vivado fft/ifft ip核实现
`timescale 1ns / 1psmodule fft( input aclk, input aresetn, output [7:0] fft_real, output [7:0] fft_imag, output [7:0] ifft_real, output [7:0] ifft_imag ); //DDS core wire [15:0] dds_m_data_tdata; wire fft_s_data_.
2022-05-09 18:38:38
780
原创 FPGA vivado FFT/IFFT/DDS
问:为什么仿真的数据只能显示15ns,但是仿真设置的是2000ns答:areset需要至少两个周期之后置1如:
2022-05-09 18:34:58
242
原创 stm32 keil
出现字符nan,原因1,出现非数字,或者无穷大是数字,原因2,malloc构造空间程序在循环体内,而有的空间没有在循环体内释放,单片机空间用完了。
2022-04-29 17:40:52
1507
原创 verilog
第一种是电平触发,例如always @(a or b or c),a、b、c均为变量,当其中一个发生变化时,下方的语句将被执行;第二种是沿触发,例如always @(posedge clk or negedge rstn),即当时钟处在上升沿或下降沿时,语句被执行。第三种:always@(*)中的*是指该always块内的所有输入信号的变化为敏感列表...
2022-04-11 15:48:58
49
原创 串口发送,中心处理,接收,mosulesim
//串口发送模块`timescale 1ns/10psmodule uart_tx( clk, res, data_in, en_data_in, TX, rdy ); input clk; input res; input[7:0] data_in;//zhun befasongde shuju input en_data_in;//fasongshinneg output TX; output rdy;//kogxianbiaozhi 0bioashikongxi.
2022-04-10 10:42:57
224
原创 MODULSEM VERILOG 串口发送模块
//串口发送模块`timescale 1ns/10psmodule uart_tx( clk, res, data_in, en_data_in, TX, rdy ); input clk; input res; input[7:0] data_in;//zhun befasongde shuju input en_data_in;//fasongshinneg output TX; output rdy;//kogxianbiaozhi 0bioashikongxi.
2022-04-09 10:08:06
88
原创 Verilog 梯形波
//三角波发生器`timescale 1ns/10psmodule tri_gen( clk, res, d_out);input clk,res;output d_out;reg[1:0] state;reg[8:0] d_out;reg[7:0] con;always@(posedge clk or negedge res) if(~res) begin state<=0; d_out<=0; .
2022-04-08 09:30:44
448
原创 Verilog 三角波
//三角波发生器`timescale 1ns/10psmodule tri_gen( clk, res, d_out);input clk,res;output d_out;reg state;reg[8:0] d_out;always@(posedge clk or negedge res) if(~res) begin state<=0; d_out<=0; end el.
2022-04-08 09:08:26
541
原创 verilog 11
`timescale 1ns/10psmodule nand_gate_4bits( A, B, Y );input[3:0] A;input[3:0] B;output[3:0] Y; assign Y =~(A&B);endmodule module nand_gate_4bits_tb;reg[3:0] aa,bb;wire[3:0] yy;nand_gate_4bits nand.
2022-04-08 09:05:44
47
原创 verilog 相邻点累加。
`timescale 1ns/10psmodule sigma_16p( clk, res, data_in, syn_in, data_out, syn_out);input clk,res, syn_in;//sys采样时钟input[7:0] data_in;//采样信号output syn_out;//累加结果同步脉冲output[11:0] data_out;//累加结果reg sys_in_n1;//采样时钟的反向延时reg[.
2022-04-08 08:31:11
324
原创 verilog 10
`timescale 1ns/10psmodule nand_gate( A, B, Y );input A;input B;output Y; assign Y =~(A&B);endmodule module nand_gate_tb;reg aa,bb;wire yy;nand_gate nand_gate( .A(aa), .B(bb),.
2022-04-07 20:50:46
259
原创 verilog 9
`timescale 1ns/10psmodule m_gen(clk,res,y);input clk;input res;output y;reg[3:0] d;assign y=d[0];always@(posedge clk or negedge res)if(~res) begin d<=4'b1111;endelse begin d[2:0]<=d[3:1]; d[3]<=d[3]+d[0]; end endmodule modul.
2022-04-07 20:49:57
35
原创 verilog 7
`timescale 1ns/10psmodule con( clk, res, y); input clk; input res; output[7:0] y; reg[7:0] y; wire[7:0] sum; assign sum=y+1;always@(posedge clk or negedge res)if(~res) begin y<=0; endelse be.
2022-04-07 20:49:22
38
原创 verilog 6
`timescale 1ns/10psmodule seg_dec(num,a_g);input[3:0] num;output[6:0] a_g;reg[6:0] a_g;always@(num) begincase(num) 4'd0:a_g<=7'b111_1110; 4'd1:a_g<=7'b011_0000; 4'd2:a_g<...
2022-04-07 20:48:45
78
原创 verilog 5
`timescale 1ns/10psmodule fn_sw_4(a,b,sel,y);input a;input b;input[1:0] sel;output y;//assign y = sel?(a^b):(a&b);reg y;always@(a or b or sel)begin case(sel)2'b00:begin y<=a&b;end2'b01:begin y<=a|b;end2'b10:begin y<=a^b;.
2022-04-07 20:48:14
57
原创 verilog 4
`timescale 1ns/10psmodule inv( A, Y );input A;output Y;assign Y=~A;endmodulemodule inv_tb;reg aa;wire yy;inv inv( .A(aa), .Y(yy) ); initial begin aa<=0; #10 aa<=1; #10 aa<=0; #10 aa&.
2022-04-07 20:47:30
45
原创 verilog 3
`timescale 1ns/10psmodule comp_conv(a,a_comp);input[7:0] a;output[7:0] a_comp;wire[6:0] b;wire[7:0] y; assign b =~a[6:0];assign y[6:0]=b[6:0]+1;assign y[7]=a[7];assign a_comp=a[7]?y:a;endmodulemodule comp_conv_tb;reg[7:0] a_in;wire[7:.
2022-04-07 20:46:32
38
原创 verilog 训练2
`timescale 1ns/10psmodule fn_sw(a,b,sel,y);input a;input b;input sel;output y;//assign y = sel?(a^b):(a&b);reg y;always@(a or b or sel)begin if(sel ==1)beginy<=a^b;endelse beginy<=a&b;endendendmodulemodule fn_sw.
2022-04-07 20:45:35
41
原创 verilog 训练1 计数器
`timescale 1ns/10psmodule s_counter( clk, res, s_sum);input clk,res;output[3:0] s_sum;parameter frequency_clk=24; reg[24:0] con_t;reg s_pulse;reg[3:0] s_sum;always @(posedge clk or negedge res) if(~res) begin co.
2022-04-07 20:42:50
221
原创 modulesi,verilog错误
near "clk": syntax error, unexpected IDENTIFIER, expecting or or ')' or ','原因:posedge拼写错误也有可能是negedge拼写错误。
2022-04-07 20:41:03
297
原创 modulesim
# ** Error: (vlog-13069) D:/UltraEditv26.1/m_gen.v(26): near "EOF": syntax error, unexpected end of source code.原因是:没加endmodule.
2022-04-06 18:00:13
1606
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人