2022-02-06 07:54:00 -05:00
|
|
|
#
|
|
|
|
# This file is part of LiteX-Boards.
|
|
|
|
#
|
|
|
|
# Copyright (c) 2022 Ilia Sergachev <ilia@sergachev.ch>
|
|
|
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
|
|
|
from litex.build.generic_platform import *
|
2023-03-01 03:37:55 -05:00
|
|
|
from litex.build.xilinx import XilinxUSPPlatform, VivadoProgrammer
|
2022-02-06 07:54:00 -05:00
|
|
|
|
|
|
|
|
2022-02-07 02:12:43 -05:00
|
|
|
# IOs ----------------------------------------------------------------------------------------------
|
|
|
|
|
2022-02-06 07:54:00 -05:00
|
|
|
_io = [
|
2022-02-07 02:12:43 -05:00
|
|
|
# Fan.
|
2022-02-06 07:54:00 -05:00
|
|
|
("fan", 0, Pins("A12"), IOStandard("LVCMOS33")),
|
2022-02-07 02:12:43 -05:00
|
|
|
|
|
|
|
# Seems like there are no on-board clock sources for PL when PS is not used so here a
|
|
|
|
# clock-capable PMOD connector pin is added as a possible clock input (not tested).
|
2022-02-06 07:54:00 -05:00
|
|
|
("pmod_hda16_cc", 0, Pins("B21"), IOStandard("LVCMOS33")),
|
|
|
|
]
|
|
|
|
|
2022-02-07 02:12:43 -05:00
|
|
|
# Platform -----------------------------------------------------------------------------------------
|
2022-02-06 07:54:00 -05:00
|
|
|
|
2023-03-01 03:37:55 -05:00
|
|
|
class Platform(XilinxUSPPlatform):
|
2022-02-07 02:12:43 -05:00
|
|
|
default_clk_name = "pmod_hda16_cc"
|
|
|
|
default_clk_period = 1e9/100e6
|
2022-02-06 07:54:00 -05:00
|
|
|
|
2022-02-14 05:35:08 -05:00
|
|
|
def __init__(self, toolchain="vivado"):
|
2023-03-01 03:37:55 -05:00
|
|
|
XilinxUSPPlatform.__init__(self, "xck26-sfvc784-2lv-c", _io, toolchain=toolchain)
|
2022-02-06 07:54:00 -05:00
|
|
|
self.toolchain.bitstream_commands = \
|
|
|
|
["set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]", ]
|
|
|
|
self.default_clk_freq = 1e9 / self.default_clk_period
|
|
|
|
|
|
|
|
def create_programmer(self):
|
|
|
|
return VivadoProgrammer()
|
|
|
|
|
|
|
|
def do_finalize(self, fragment, *args, **kwargs):
|
2023-03-01 03:37:55 -05:00
|
|
|
XilinxUSPPlatform.do_finalize(self, fragment, *args, **kwargs)
|
2022-02-07 02:12:43 -05:00
|
|
|
self.add_period_constraint(self.lookup_request("pmod_hda16_cc", loose=True), 1e9/100e6)
|