O dziwo przesyłka dotarła w 20 dni… Daleka droga przede mną, ale od czegoś trzeba zacząć 😉
module light ( input x1, x2, output f ); assign f = ~((x1 & ~x2) | (~x1 & x2)); endmodule
A tutaj diody migają wg zegara:
module leds ( input clk_50, output [7:0] led_arr ); reg [25:0] counter; reg [8:0] state = 9'b011111111; reg shft = 1'b0; assign led_arr = state[8:1]; always @ (posedge clk_50) begin counter <= counter + 1'd1; shft <= counter[25]; // zmiana statusu co 0.6s if (shft) begin state <= state >> 1; counter <= 0; shft <= 0; end if (state == 9'b000000000) state <= 9'b011111111; end endmodule
Wszystkie eksperymenta będę wrzucał tutaj:
https://bitbucket.org/greblus/fpga_fun
Wątpie żeby komuś się to do czegoś przydało, ale przyda się na pewno mnie 😉
BTW: https://translate.google.com/#view=home&op=translate&sl=zh-CN&tl=pl&text=daxigua