Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module ledTest2(
- (* side=RIGHT, colors={WHITE,MAGENTA,ORANGE} *)
- output [2:0] lights
- );
- (* analog *)
- reg sel;
- reg [2:0] lightsRaw;
- reg [2:0] lightsRaw_n;
- reg clk;
- RandomizerAnalog ar (
- .Min(0),
- .Max(8),
- .Q(sel)
- );
- DeMux16Analog d16 (
- .I(1),
- .S(sel),
- .O(lightsRaw)
- );
- Square s (
- .Pd(10),
- .Q(clk)
- );
- Inverter i [2:0] (
- .I0(lightsRaw),
- .O0(lightsRaw_n)
- );
- FlipFlopJK ff [2:0] (
- .J(lightsRaw),
- .K(lightsRaw_n),
- .CLK(clk),
- .Q(lights)
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement