Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I build project with "--with-ethernet" I got "Liftoff!" screen #343

Open
fatihakalan opened this issue Jul 19, 2023 · 29 comments
Open

Comments

@fatihakalan
Copy link

Hey, I want to build litex project with ethernet peripheral. I succesfully builded project and generated bit file. I'm trying to loading boot.json file but I got this error.
image

How do I solve this any idea ? I try the changing --sys-clk 50MHz, 75 MHz ,100MHz but didn't worked. Also I was compiled with 100 MHz memtest is failed.

building command: python3 -m litex_boards.targets.efinix_trion_t120_bga576_dev_kit --with-ethernet --eth-ip ETH_IP --eth-phy=1 --sys-clk-freq 50e6 --build --load

@Beauxrel
Copy link

Have you gotten the serial boot to work?

@fatihakalan
Copy link
Author

Yeah, I'm using serial boot way this command (litex_term --images=images/boot.json /dev/ttyUSBX) and I got BIOS menu. I run the reboot command but then stuck Liftoff screen

@Beauxrel
Copy link

I see these clock values

io = [
# Clk
("clk40", 0, Pins("P19"), IOStandard("3.3_V_LVTTL
/LVCMOS")),
("clk50", 0, Pins("AA8"), IOStandard("3.3_V_LVTTL
/LVCMOS")),
("clk20", 0, Pins("AA9"), IOStandard("3.3_V_LVTTL
/LVCMOS")),
("clk74_25", 0, Pins("J9"), IOStandard("3.3_V_LVTTL
/_LVCMOS")),

have you tried clock 40, 20 or 74.25?

@Beauxrel
Copy link

Please let me know if that worked for you. @fatihakalan

@fatihakalan
Copy link
Author

Thanks for reply first of all but I try now didn't work. 40, 20 or 74.25 MHz clocks. and also when ı give to 74.25 I get PLL error. In the other clocks I succesfully loading ".bit" file but linux doesn't boot succesfully. What should I do ? @Beauxrel

@Beauxrel
Copy link

What happens if you build with <./make.py board=efinix_trion_t120_bga576_dev_kit --with-ethernet --eth-ip ETH_IP --eth-phy=1 --sys-clk-freq 50e6 --build --load>

@Beauxrel
Copy link

from the linux-on-litex folder @fatihakalan

@Beauxrel
Copy link

Some of those commands may not be acceptable, but building the SoC from the make.py file is how I always do it.

@fatihakalan
Copy link
Author

I get this error when I run "./make.py --board=efinix_trion_t120_bga576_dev_kit --with-ethernet --eth-ip ETH_IP --eth-phy=1 --sys-clk-freq 50e6 --build --load"

  • make.py: error: unrecognized arguments: --with-ethernet --eth-ip ETH_IP --eth-phy=1 --sys-clk-freq 50e6
  • @Beauxrel

@fatihakalan
Copy link
Author

When I want to add some peripheral to my SoC I follow this repo:https://github.com/litex-hub/litex-boards. make.py command ı guess doesn't work with peripheral did you ever add peripheral parameter ?
@Beauxrel

@Beauxrel
Copy link

Can you copy and paste the full make.py file

@fatihakalan

This comment was marked as off-topic.

@fatihakalan
Copy link
Author

Efinix Boards
#---------------------------------------------------------------------------------------------------

class TrionT120BGA576DevKit(Board):
soc_kwargs = {"l2_size" : 2048} # Use Wishbone and L2 for memory accesses.
def init(self):
from litex_boards.targets import efinix_trion_t120_bga576_dev_kit
Board.init(self, efinix_trion_t120_bga576_dev_kit.BaseSoC, soc_capabilities={

Communication

"serial",
"ethernet",

GPIOs

"leds",
})
I was add "ethernet" option at now trying with this maybe its effected . Normally there no ethernet in communication line just serial

@Beauxrel
Copy link

That is excatly what I was going to say, try to include ethernet and build it without all the other commands ./make.p board= --sys-clk-freq 50e6 --build --load

@fatihakalan
Copy link
Author

Okay I'm trying to directly build but "--load" doesn't work. I'm using OpenFPGALoader to boot .bit file. Do you think any effect ? And I let you know my output.

@Beauxrel
Copy link

Is the bit file being generated?

@fatihakalan
Copy link
Author

Yeah it is being created I'm waitig to finish

@fatihakalan
Copy link
Author

it is succesfully booting .bit file and also linux but there are no ethernet as like eth0 when I run ifconfig command.

@Beauxrel
Copy link

In your efinix_trion_t120_bga576_dev_kit.py file try setting
with_ethernet, with_etherbone and eth_phy

class BaseSoC(SoCCore):
def init(self, sys_clk_freq=75e6,
with_spi_flash = False,
with_ethernet = False, <- true
with_etherbone = False,<- true
eth_phy = 0, <- 1
eth_ip = "192.168.1.50",
with_led_chaser = True,
**kwargs):
platform = efinix_trion_t120_bga576_dev_kit.Platform()

@Beauxrel
Copy link

and running make.py again

@Beauxrel
Copy link

looks like base frequency they use is 75MHz

@fatihakalan
Copy link
Author

yeah base frequency 75 MHz .I'm trying now actually ı remember ı was tried this way but didn't work. I let you know output

@Beauxrel
Copy link

@fatihakalan Im thinking you may only need to set 1 of them to true, the if statement later is only only needs 1. I would choose "with_ethernet"

@fatihakalan
Copy link
Author

okay I'm trying all of true and if it's fail ım gonna try case one of them is true (withethernet). But where is the if statement you mentioned about.

@Beauxrel
Copy link

Beauxrel commented Jul 26, 2023

`Ethernet / Etherbone

    if with_ethernet or with_etherbone:
        self.ethphy = LiteEthPHYRGMII(
            platform           = platform,
            clock_pads         = platform.request("eth_clocks", eth_phy),
            pads               = platform.request("eth", eth_phy),
            with_hw_init_reset = False)
        if with_ethernet:
            self.add_ethernet(phy=self.ethphy, software_debug=False)
        if with_etherbone:
            self.add_etherbone(phy=self.ethphy)

        # FIXME: Avoid this.
        platform.toolchain.excluded_ios.append(platform.lookup_request("eth_clocks").tx)
        platform.toolchain.excluded_ios.append(platform.lookup_request("eth_clocks").rx)
        platform.toolchain.excluded_ios.append(platform.lookup_request("eth").tx_data)
        platform.toolchain.excluded_ios.append(platform.lookup_request("eth").rx_data)
        platform.toolchain.excluded_ios.append(platform.lookup_request("eth").mdio)

`

@fatihakalan
Copy link
Author

Okay, I got it I'm gonna try thanks

@fatihakalan
Copy link
Author

Screenshot 2023-07-26 194219
When I changed

with_ethernet = False, <- true
with_etherbone = False,<- true
eth_phy = 0, <- 1

there are no eth0 @Beauxrel

@fatihakalan
Copy link
Author

I tried this
with_ethernet = true
with_etherbone = False
eth_phy = 0,

but doesn't work. There are no eth0 @Beauxrel

@Beauxrel
Copy link

Beauxrel commented Jul 27, 2023

Looks like there was a push 3 hours ago for your board using PMOD RMII

https://www.waveshare.com/lan8720-eth-board.htm

litex-hub/litex-boards@2d3b81a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants