This is a combinational circuit. Read the simulation waveforms to determine what the circuit does, then implement it.
这种根据波形写逻辑的题目,y1s1,就像小时候的奥数题,(画一堆图形出来,然后问你最有可能缺少哪一个?)说白了,就是找规律,不过看规律的难度了吧。对于单端口单输入的波形,直接画卡诺图即可。对于单端口多输入的,目前我还没有找到普适性的方法,关于这个题的话,就是观察出来的,很显然是一个多路选择器的鸭子。
下面展示一些 内联代码片
。
module top_module (
input [2:0] a,
output [15:0] q );
always@(*)begin
case(a)
0: q = 16'h1232;
1: q = 16'haee0;
2: q = 16'h27d4;
3: q = 16'h5a0e;
4: q = 16'h2066;
5: q = 16'h64ce;
6: q = 16'hc526;
7: q = 16'h2f19;
endcase
end
endmodule