- 博客(11)
- 收藏
- 关注
原创 期末实验三
1.实验名称:篮球24秒计时器 2.实验代码: 源代码: module digital(TimerH,TimerL,over,Reset,Stop,clk); output [6:0]TimerH; output [6:0]TimerL; output over; input Reset; input Stop; input clk; wire [1:0]H; wire [3:0]L; wire clk_1; fenpin UO (.clk(clk),.clk_old(clk_1)); basketbal
2021-06-28 19:00:29
86
原创 期末实验二
1.实验名称:传播延时 2.实验代码 module Add_full_unit_delay(output c_out,sum,input a,b,c_in); wire w1,w2,w3; ADD_half_unit_delay M1(w2,w1,a,b); ADD_half_unit_delay M2(w3,sum,w1,c_in); or #1 M3(c_out,w2,w3); endmodule module ADD_half_unit_delay (output c_out,sum
2021-06-28 18:32:08
102
原创 期末实验一
1.实验名称(P154页图5.38): 两级联触发器 2.实验代码: module example5_4(D,Clock,Q1,Q2); input D,Clock; output reg Q1,Q2; always@(posedge Clock) begin Q1<=D; Q2<=Q1; end endmodule 3.实验截图 4.实验视频
2021-06-28 18:02:36
147
原创 个人实验
1.实验内容:教材P379页图A.22 2.实验代码 module ripple_g(carryin,X,Y,S,carryout); parameter n = 4; input carryin; input [n-1:0]X,Y; output [n-1:0]S; output carryout; wire [n:0]C; genvar i; assign C[0] = carryin; assign carryout = C[n]; generate for(i = 0;i<=n-1;i=i+
2021-06-28 17:37:16
43
原创 第五次实验
一.独热码状态机 1.代码以及测试代码如下: module ex8_1(clock,reset, x,y1,y2); input clock,reset; input x; output y1,y2; reg y1,y2; reg[3:0] cstate, nstate; parameter s0=4’b0001, s1=4’b0010, s2=4’b0100, s3=4’b1000; always @(posedge clock or posedge reset) begin if(reset) csta
2021-06-28 15:23:57
106
原创 第四次实验
1.实验代码: module barrel(W,S,Y); input [3:0]W; input [1:0]S; output [3:0]Y; wire [3:0]T; assign {T,Y} = {W,W} >> S; endmodule module parity(X,Y); input [7:0]X; output [7:0]Y; assign Y = {^X[6:0],X[6:0]}; endmodule
2021-06-28 15:10:47
35
原创 第三次实验
一.实验名称:4位加器的门级建模 二。实验代码: module fulladd(S,Cout,Cin,A,B); output S,Cout; input Cin,A,B; wire and1,and2,and3,and4; xor (S,Cin,A,B); and (and1,Cin,A); and (and2,A,B); and (and3,Cin,B); or (Cout,and1,and2,and3); endmodule module add4a(S3,S2,S1,S0,COU
2021-06-27 22:52:05
75
原创 第二次实验
一: 下载Modelsim SE-64 10.4 根据网上步骤下载好Modelsim SE-64 10.4以后。 二 QUARTUS ii 联合仿真 1.新建工程,创号测试文件的路径 如图:在这里插入图片描述 接着点击next,选择modelsim,一直点击next知道finsh。 2.点击file,创建。在这里插入图片描述 入代码保存并运行。 3.运行完成之后,点击上方tool,找到Options,选择modelsim在电脑中的路径。 4.设置完成之后,点击上方processing<<<
2021-06-27 21:59:25
167
原创 第一次实验
1.实验目的: 下载Quartursii软件并进行图片仿真和代码仿真。 2.实验内容: 安装好Quartursii软件后并按照书上的代码进行仿真。 代码如下: module f_g(x,y,z,f,g); input x, y, z; output f, g; wire k; assign k=y^z; assign g=k^x; assign f=(~k&z)|(k &x); endmodule 3.实验截图 4.实验过程视频链接 ...
2021-06-27 21:04:50
77
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人