e1_rx_phy.v 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * e1_rx_phy.v
  3. *
  4. * vim: ts=4 sw=4
  5. *
  6. * E1 RX IOB instances
  7. *
  8. *
  9. * Copyright (C) 2019 Sylvain Munaut <tnt@246tNt.com>
  10. * All rights reserved.
  11. *
  12. * LGPL v3+, see LICENSE.lgpl3
  13. *
  14. * This program is free software; you can redistribute it and/or
  15. * modify it under the terms of the GNU Lesser General Public
  16. * License as published by the Free Software Foundation; either
  17. * version 3 of the License, or (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  22. * Lesser General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU Lesser General Public License
  25. * along with this program; if not, write to the Free Software Foundation,
  26. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  27. */
  28. `default_nettype none
  29. module e1_rx_phy (
  30. // IO pads
  31. input wire pad_rx_hi_p,
  32. input wire pad_rx_hi_n, // Unused in ice40
  33. input wire pad_rx_lo_p,
  34. input wire pad_rx_lo_n, // Unused in ice40
  35. // Output
  36. output wire rx_hi,
  37. output wire rx_lo,
  38. // Common
  39. input wire clk,
  40. input wire rst
  41. );
  42. SB_IO #(
  43. .PIN_TYPE(6'b000000),
  44. .PULLUP(1'b0),
  45. .NEG_TRIGGER(1'b0),
  46. .IO_STANDARD("SB_LVDS_INPUT")
  47. ) rx_hi_I (
  48. .PACKAGE_PIN(pad_rx_hi_p),
  49. .LATCH_INPUT_VALUE(1'b0),
  50. .CLOCK_ENABLE(1'b1),
  51. .INPUT_CLK(clk),
  52. .OUTPUT_CLK(1'b0),
  53. .OUTPUT_ENABLE(1'b0),
  54. .D_OUT_0(1'b0),
  55. .D_OUT_1(1'b0),
  56. .D_IN_0(rx_hi),
  57. .D_IN_1()
  58. );
  59. SB_IO #(
  60. .PIN_TYPE(6'b000000),
  61. .PULLUP(1'b0),
  62. .NEG_TRIGGER(1'b0),
  63. .IO_STANDARD("SB_LVDS_INPUT")
  64. ) rx_lo_I (
  65. .PACKAGE_PIN(pad_rx_lo_p),
  66. .LATCH_INPUT_VALUE(1'b0),
  67. .CLOCK_ENABLE(1'b1),
  68. .INPUT_CLK(clk),
  69. .OUTPUT_CLK(1'b0),
  70. .OUTPUT_ENABLE(1'b0),
  71. .D_OUT_0(1'b0),
  72. .D_OUT_1(1'b0),
  73. .D_IN_0(rx_lo),
  74. .D_IN_1()
  75. );
  76. endmodule // e1_rx_phy