Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=======================================================
- // This code is generated by Terasic System Builder
- //=======================================================
- module Program3(
- //////////// CLOCK //////////
- CLOCK_50,
- //////////// LED //////////
- LED,
- //////////// KEY //////////
- KEY
- );
- //=======================================================
- // PARAMETER declarations
- //=======================================================
- //=======================================================
- // PORT declarations
- //=======================================================
- //////////// CLOCK //////////
- input CLOCK_50;
- //////////// LED //////////
- output reg [7:0] LED;
- //////////// KEY //////////
- input [1:0] KEY;
- //=======================================================
- // REG/WIRE declarations
- //=======================================================
- //=======================================================
- // Structural coding
- //=======================================================
- always @ (posedge CLOCK_50)
- if (KEY[0])
- begin
- LED = (LED << 1) | 1;
- end
- //else if (KEY[1])
- //begin
- // LED = (LED >> 1);
- //end
- endmodule
Add Comment
Please, Sign In to add comment