HDLbits verilog
Given the state-assigned table shown below, implement the logic functions Y[0] and z.
写这道题得关键是什么,好好看题,logical(题目重点),不要因为FMS让自己掉坑里。
下面展示一些 内联代码片
。
// A code block
var foo = 'bar';
// An highlighted block
module top_module (
input clk,
input [2:0] y,
input x,
output Y0,
output z
);
parameter A=3'B000,B=3'B001,C=3'B010,D=3'B011,E=3'B100;
assign z = (y==D)||(y==E);
assign Y0 = (y==A&&x==1)||(y==B&&x==0)||(y==C&x==1)||(y==D&&x==0)||(y==E&&x==0);、这里Y0指的是y与x作用后y得次态及Y得[0]位
endmodule