boards.vh 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * boards.vh
  3. *
  4. * vim: ts=4 sw=4 syntax=verilog
  5. *
  6. * Copyright (C) 2020 Sylvain Munaut <tnt@246tNt.com>
  7. * All rights reserved.
  8. *
  9. * BSD 3-clause, see LICENSE.bsd
  10. *
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions are met:
  13. * * Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions and the following disclaimer.
  15. * * Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in the
  17. * documentation and/or other materials provided with the distribution.
  18. * * Neither the name of the <organization> nor the
  19. * names of its contributors may be used to endorse or promote products
  20. * derived from this software without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  23. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  24. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  25. * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
  26. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  27. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  28. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  29. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. `ifdef BOARD_BITSY_V0
  34. // 1bitsquared iCEbreaker bitsy prototypes (v0.x)
  35. `define HAS_PSRAM
  36. `elsif BOARD_BITSY_V1
  37. // 1bitsquared iCEbreaker bitsy prod (v1.x)
  38. `define HAS_PSRAM
  39. `elsif BOARD_ICEBREAKER
  40. // 1bitsquared iCEbreaker
  41. `define HAS_PSRAM
  42. `elsif BOARD_ICEPICK
  43. // iCEpick
  44. `define PLL_CORE
  45. `define HAS_VIO
  46. `elsif BOARD_ICE1USB
  47. // icE1usb
  48. // 30.72M input, 48M output
  49. `define PLL_CORE
  50. `define PLL_CUSTOM
  51. `define PLL_DIVR 4'b0000
  52. `define PLL_DIVF 7'b0011000
  53. `define PLL_DIVQ 3'b100
  54. `define PLL_FILTER_RANGE 3'b011
  55. `elsif BOARD_E1TRACER
  56. // osmocom E1 tracer
  57. `define PLL_CORE
  58. `define HAS_VIO
  59. `endif
  60. // Defaults
  61. // PLL params 12M input, 48M output
  62. `ifndef PLL_CUSTOM
  63. `define PLL_DIVR 4'b0000
  64. `define PLL_DIVF 7'b0111111
  65. `define PLL_DIVQ 3'b100
  66. `define PLL_FILTER_RANGE 3'b001
  67. `endif