Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module mod4_seq(input q0,q1,u,clk,output reg d0,d1);
- begin
- always @ (posedge clk);
- begin
- if(q1 == 0)
- d1 <= 1;
- else
- d1 <=0;
- case(~u);
- if ( q0== 0 && q1 == 1);
- d0 <= 1;
- if ( q0== 1 && q1 == 0);
- d0 <= 0;
- endcase
- case(u);
- if ( q0== 0 && q1 == 0);
- d0 <= 1;
- if ( q0== 1 && q1 == 1);
- d0 <= 0;
- endcase
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement