HDlbits
HDlbits
Design
module top_module(
input clk,
input areset, // Freshly brainwashed Lemmings walk left.
input bump_left,
input bump_right,
output walk_left,
output walk_right); //
// Output logic
assign walk_left = (state == LEFT) ? 1 : 0;
assign walk_right = (state == RIGHT) ? 1 : 0;
endmodule
Lemmings 2
Design code:
module top_module(
input clk,
input areset, // Freshly brainwashed Lemmings walk left.
input bump_left,
input bump_right,
input ground,
output walk_left,
output walk_right,
output aaah );
//output
assign aaah = (state == fall_left || state== fall_right) ? 1 :
0;
assign walk_left = (state == left) ? 1 : 0;
assign walk_right = (state == right) ? 1 : 0;
endmodule
Lemmings 3
Design code:
module top_module(
input clk,
input areset, // Freshly brainwashed Lemmings walk left.
input bump_left,
input bump_right,
input ground,
input dig,
output walk_left,
output walk_right,
output aaah,
output digging );
//output
assign aaah = (state == fall_left || state== fall_right) ? 1 :
0;
assign walk_left = (state == left) ? 1 : 0;
assign walk_right = (state == right) ? 1 : 0;
assign digging = (state == dig_left || state == dig_right) ? 1 :
0;
endmodule
Lemmings 4
Design code:
module top_module(
input clk,
input areset, // Freshly brainwashed Lemmings walk left.
input bump_left,
input bump_right,
input ground,
input dig,
output walk_left,
output walk_right,
output aaah,
output digging );
integer count_clk=0;
//output
assign aaah = ((state == fall_left || state== fall_right) ? 1 :
0);
assign walk_left =((state == left) ? 1 : 0);
assign walk_right = ((state == right) ? 1 : 0);
assign digging =((state == dig_left || state == dig_right) ? 1 :
0);
endmodule
Water service FSN
endmodule
endmodule
clk count question
que : question from HDLbits
Design code
module top_module (
input clk,
input reset, // Synchronous reset
input s,
input w,
output z
);