Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. begin
  2. an <= random_gen(2000, 2017);
  3. luna<= random_gen(1,12);
  4. temp<=random_gen(-15, 35);
  5.  
  6. process(ora)
  7. begin
  8. if mounth = 9 or mounth = 4 or mounth =6 or mounth = 11 then
  9. day<=random_gen(1,30);
  10. elsif mounth = 1 or mounth = 3 or mounth = 5 or mounth = 7 or mounth = 8 or mounth = 9 or mounth = 10 or mounth = 12 then
  11. day<=random_gen(1,31);
  12. elsif mounth = 2 and (an = 2000 or an = 2004 or an = 2008 or an = 2012 or an = 20016) then
  13. day<=random_gen(1,28);
  14. else day<=random_gen(1,29);
  15. end if;
  16. end process;
  17.  
  18. hour<=random_gen(1,23);
  19. min<=random_gen(1,59);
  20. sec<=random_gen(1,59);
  21.  
  22. process(sec)
  23. begin
  24. sec<=sec+1;
  25. if(sec = 59) then
  26. sec<=0;
  27. min <= min + 1;
  28. if(min = 59) then
  29. hour <= hour + 1;
  30. min <= 0;
  31. if(hour = 23) then
  32. hour <= 0;
  33. end if;
  34. end if;
  35. end if;
  36. end process;
  37. end architecture;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement