Пример #1
0
    def __init__(self, platform, *args, **kwargs):
        # Need a larger integrated ROM on or1k to fit the BIOS with TFTP support.
        if 'integrated_rom_size' not in kwargs and kwargs.get(
                'cpu_type', 'lm32') == 'or1k':
            kwargs['integrated_rom_size'] = 0x10000

        BaseSoC.__init__(self, platform, *args, **kwargs)

        self.submodules.ethphy = LiteEthPHY(platform.request("eth_clocks"),
                                            platform.request("eth"))
        self.submodules.ethmac = LiteEthMAC(phy=self.ethphy,
                                            dw=32,
                                            interface="wishbone")
        self.add_wb_slave(mem_decoder(self.mem_map["ethmac"]), self.ethmac.bus)
        self.add_memory_region("ethmac",
                               self.mem_map["ethmac"] | self.shadow_base,
                               0x2000)

        self.ethphy.crg.cd_eth_rx.clk.attr.add("keep")
        self.ethphy.crg.cd_eth_tx.clk.attr.add("keep")
        #self.platform.add_period_constraint(self.crg.cd_sys.clk, 10.0)
        self.platform.add_period_constraint(self.ethphy.crg.cd_eth_rx.clk,
                                            40.0)
        self.platform.add_period_constraint(self.ethphy.crg.cd_eth_tx.clk,
                                            40.0)
        self.platform.add_false_path_constraints(self.crg.cd_sys.clk,
                                                 self.ethphy.crg.cd_eth_rx.clk,
                                                 self.ethphy.crg.cd_eth_tx.clk)
Пример #2
0
    def __init__(self, platform, *args, **kwargs):
        # Need a larger integrated ROM on or1k to fit the BIOS with TFTP support.
        if 'integrated_rom_size' not in kwargs and kwargs.get(
                'cpu_type', 'lm32') != 'lm32':
            kwargs['integrated_rom_size'] = 0x10000

        BaseSoC.__init__(self, platform, *args, **kwargs)

        # Ethernet ---------------------------------------------------------------------------------
        # Ethernet Phy
        self.submodules.ethphy = LiteEthPHY(
            clock_pads=self.platform.request("eth_clocks"),
            pads=self.platform.request("eth"))
        self.add_csr("ethphy")
        # Ethernet Core
        etherbone_mac_address = 0x10e2d5000000
        etherbone_ip_address = "192.168.100.50"
        self.submodules.ethcore = LiteEthUDPIPCore(
            phy=self.ethphy,
            mac_address=etherbone_mac_address,
            ip_address=etherbone_ip_address,
            clk_freq=self.clk_freq)
        # Etherbone Core
        self.submodules.etherbone = LiteEthEtherbone(self.ethcore.udp, 1234)
        self.add_wb_master(self.etherbone.wishbone.bus)
        # timing constraints
        self.platform.add_period_constraint(self.ethphy.crg.cd_eth_rx.clk,
                                            1e9 / 25e6)
        self.platform.add_period_constraint(self.ethphy.crg.cd_eth_tx.clk,
                                            1e9 / 25e6)
        self.platform.add_false_path_constraints(self.crg.cd_sys.clk,
                                                 self.ethphy.crg.cd_eth_rx.clk,
                                                 self.ethphy.crg.cd_eth_tx.clk)
Пример #3
0
    def __init__(self, platform, *args, **kwargs):
        BaseSoC.__init__(self, platform, *args, **kwargs)

        self.submodules.ethphy = LiteEthPHY(
            platform.request("eth_clocks"),
            platform.request("eth"))
        self.submodules.ethmac = LiteEthMAC(
            phy=self.ethphy, dw=32, interface="wishbone")
        self.add_wb_slave(mem_decoder(self.mem_map["ethmac"]), self.ethmac.bus)
        self.add_memory_region("ethmac",
            self.mem_map["ethmac"] | self.shadow_base, 0x2000)

        self.ethphy.crg.cd_eth_rx.clk.attr.add("keep")
        self.ethphy.crg.cd_eth_tx.clk.attr.add("keep")
        #self.platform.add_period_constraint(self.crg.cd_sys.clk, 10.0)
        self.platform.add_period_constraint(self.ethphy.crg.cd_eth_rx.clk, 40.0)
        self.platform.add_period_constraint(self.ethphy.crg.cd_eth_tx.clk, 40.0)
        self.platform.add_false_path_constraints(
            self.crg.cd_sys.clk,
            self.ethphy.crg.cd_eth_rx.clk,
            self.ethphy.crg.cd_eth_tx.clk)