- 博客(6)
- 收藏
- 关注
原创 数字电路期末作业
例8.4: moduleAdd_full_unit_delay(outputc_out,sum,inputa,b,c_in); wirew1,w2,w3; Add_half_unit_delayM1(w2,w1,a,b); Add_half_unit_delayM2(w3,sum,w1,c_in); or#1M3(c_out,w2,w3); endmodule moduleAdd_half_unit_delay(outputc_out,sum,inputa,b);...
2021-06-27 14:57:43
246
原创 202003024027
heyuling14:34:44 moduleex8_3(clock,reset,x,z); inputclock,reset; inputx; outputz; regz; reg[3:0]cstate,nstate; parameters0=4'd0,s1=4'd1, s2=4'd2,s3=4'd3,s4=4'd4,s5=4'd5,s6=4'd6; always@(posedgeclockorposedgereset) begin if(reset) cstate&l...
2021-06-11 14:43:49
124
原创 数字电路个人实验二
代码 module p2s (data_in,clock,reset,load,data_out,done) ; input [3:0] data_in; input clock, reset, load; output data_out; output done; reg done; reg [3:0] temp; reg [3:0] cnt; always@ (posedge clock or posedge reset )begin if (reset) begin temp<=0; c...
2021-06-03 22:58:08
240
原创 数字电路个人实验
module tbdecoder;reg [2:0] din; reg en; wire [7:0] dout;wire ex; initial begin #10 en=0;din=3'b000; #10 en=0;din=3'b001; #10 en=0;din=3'b010; #10 en=0;din=3'b011; #10 en=0;din=3'b100; #10 en=0;din=3'b101; #10 en=0;din=3'b110; #10 en=0;din=3'b111; #10
2021-06-03 21:49:59
182
原创 Modelsim个人实验
一.代码 14:58:50 module fulladd(sum,c_out,a,b,c_in); output sum,c_out; input a,b,c_in; wires1,c1,c2; xor (s1,a,b); and (c1,a,b); xor (sum,s1,c_in); and (c2,s1,c_in); or (c_out,c2,c1); endmodule 14:59:10 moduletest; wiresum,c_out; rega,b,c_in; fulladd...
2021-05-28 15:06:36
422
原创 ModelSim SE-64 10.4的使用及书本121页个人实验
一.打开modelesim 二.建立Library File—>New—>library,(新建一个自己的库,命名为work) 三.建立project 点击FIile—>New—>project 编辑project的名字(自己命名),注意工程保存的路径(可以现在work文件夹中建立相应工程的文件夹)点击ok。 四.建立两个File(一个文件,一个测试文件) 1.编辑File的名字,注意区分两个文件的名字,注意文件名以.v结尾。建立好后关闭Add items ..
2021-05-22 19:55:25
2957
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人