Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module LED(
- input hl,
- input hl1,
- input [2:0] id,
- input clk_50,
- output r1,
- output g2,
- output b3
- );
- reg R1=0;
- reg G2=0;
- reg B3=0;
- always @ (posedge clk_50)
- begin
- if (id == 0)
- begin
- R1 = 1;
- end
- else
- if (id == 1)
- begin
- G2 = 1;
- end
- if (id == 2)
- begin
- B3 = 1;
- end
- end
- assign r1= R1;
- assign g2= G2;
- assign b3= B3;
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement