摘要:
Sim/circuit1 从波形不难看出ab是相与的关系。 module top_module ( input a, input b, output q );// assign q = a&b; // Fix me endmodule Sim/circuit2 根据波形图可以画出卡诺图并且之前有写过 阅读全文
posted @ 2022-11-08 12:09
Magnolia666
阅读(420)
评论(0)
推荐(0)
摘要:
Bugs mux2 原本代码的逻辑是反的,这不是坑人吗。 module top_module ( input sel, input [7:0] a, input [7:0] b, output [7:0]out ); assign out = ({8{sel}} & a) | ({8{~sel}} 阅读全文
posted @ 2022-11-07 18:46
Magnolia666
阅读(253)
评论(0)
推荐(1)
摘要:
Exams/review2015 count1k 计数到999再清零即可。 module top_module ( input clk, input reset, output reg[9:0] q); always@(posedge clk) begin if(reset) q <= 'd0; e 阅读全文
posted @ 2022-11-07 12:39
Magnolia666
阅读(591)
评论(0)
推荐(0)
摘要:
Fsm1 这里需要实现一个简单的摩尔状态机,即输出只与状态有关的状态机。 我这里代码看上去比长一点,答案用的case和三目运算符,结果是一样的。 module top_module( input clk, input areset, // Asynchronous reset to state B 阅读全文
posted @ 2022-11-06 22:51
Magnolia666
阅读(1035)
评论(0)
推荐(0)
摘要:
Rule90 第一次见这东西有点莫名其妙,但是其实看懂了之后就是左移和右移相异或,注意这里使用的是逻辑右移,会自动补零,不能使用算数左移<<<。 module top_module( input clk, input load, input [511:0] data, output reg[511: 阅读全文
posted @ 2022-11-01 16:29
Magnolia666
阅读(322)
评论(0)
推荐(0)
浙公网安备 33010602011771号