


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



SystemVerilog
module MY_SYSTEM(A, B, C); input A, B; output C;
assign C = A ^ B; endmodule
module MY_SYSTEM_2(A, B, C); input A, B; output C;
wire S0, S1;
assign S0 = A & ~B; assign S1 = ~A & B; assign C = S1 | S0; endmodule
Recipe to Create Combinational Components
always @(/* sensitivity list /) begin / combinational stements */ end
SystemVerilog
SystemVerilog
SystemVerilog
2'b01: Y = X[ 1 ]; 2'b10: Y = X[ 2 ]; 2'b11: Y = X[ 3 ]; endcase endmodule
module mux(input [ 3 : 0 ] X, input [ 1 : 0 ] SW, output Y); always_comb case (SW) 2'b01: Y = X[ 1 ]; 2'b10: Y = X[ 2 ]; 2'b11: Y = X[ 3 ]; default: Y = X[ 0 ]; endcase endmodule
SystemVerilog