Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Counter ( Clock,CountEn,AsyClear, Up,Q);
- parameter WIDTH = 2;
- input Clock;
- input CountEn;
- input AsyClear;
- input Up;
- output reg [WIDTH-1:0] Q;
- always @ (posedge Clock )
- if ( AsyClear ) begin
- Q <= 0 ;
- end else if ( CountEn ) begin
- if (Up) begin
- Q <= Q +1;
- end else begin
- Q <= Q - 1 ;
- end
- end
- endmodule
- //setTrueInputs(Arrays.asList(new String[] { "Up" }));
- //setUnusedInputs(Arrays.asList(new String[] {"AsyClear"}));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement