ClkOutMMCM.v 861 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. module clkOutMMCM(
  2. input Rst_i,
  3. input [2:0]clkNum,
  4. input clk0out,
  5. input clk1out,
  6. input clk2out,
  7. input clk3out,
  8. input clk4out,
  9. input clk5out,
  10. input clk6out,
  11. output ClkOutMMCM_o
  12. );
  13. reg clkOutMMCMReg;
  14. wire clkOutMMCM;
  15. assign clkOutMMCM = clkOutMMCMReg;
  16. always @(*) begin
  17. if (Rst_i) begin
  18. clkOutMMCMReg = 0;
  19. end
  20. else begin
  21. case (clkNum)
  22. 0: clkOutMMCMReg = clk0out;
  23. 1: clkOutMMCMReg = clk1out;
  24. 2: clkOutMMCMReg = clk2out;
  25. 3: clkOutMMCMReg = clk3out;
  26. 4: clkOutMMCMReg = clk4out;
  27. 5: clkOutMMCMReg = clk5out;
  28. 6: clkOutMMCMReg = clk6out;
  29. default: clkOutMMCMReg = 0;
  30. endcase
  31. end
  32. end
  33. BUFG BUFG_inst (
  34. .O(ClkOutMMCM_o), // 1-bit output: Clock output
  35. .I(clkOutMMCM) // 1-bit input: Clock input
  36. );
  37. endmodule