15 초 이내에 임의의 시간에 LED가 켜져 있어야합니다. 예를 들어 버튼을 누른 후 4 초 또는 7 초 후 임의로 켜져 야합니다.주어진 시간 내에 임의의 숫자를 선택하는 방법은 무엇입니까?
나는 15 초 지연을 생성하는 코드를 생각해 냈지만,이 사이의 임의의 시간을 선택하는 방법을 찾아 낼 수 없다.
always @ (posedge clock or posedge reset)
begin
if(reset)
ticker <= 0;
else if(ticker == 750000000) //if it reaches the desired max value that equates 15 second reset it
ticker <= 0;
else if(start) //only start if the input is set high
ticker <= ticker + 1;
end
assign click = ((ticker == 750000000)?1'b1:1'b0); //click to be assigned high every 0.1 second
는 또한 나는 합성 솔루션을 원하십시오
다음은 15 초 지연에 대한 내 코드입니다.
http://en.wikipedia.org/wiki/Linear_feedback_shift_register – e19293001