Live data from Hacker News

Memory Mapping an FPGA from an STM32

serd.es

51–60 of 66 posts

Re: Memory Mapping an FPGA from an STM32

#51
post #27

Earlier quoted context omitted.

It's a good question. A lot of FPGA projects I see (including some real life products I've looked into recently) don't really need an FPGA. One I was asked to evaluate recently could easily have been done with a microcontroller with PWM outputs. The frequencies involved were well under 40MHz. Yes, there were a couple of multiplications going on in the FPGA, but there those could've been easily handled by a micorcontr…

Zynq 7010s are $2.50 and are a hell of a lot more chip than an RP2040. If you already have the design (or copy one of the 50 available), it's a good option when you don't want to fight the chip. PIO has extraordinarily sloppy timing (skew in all categories) compared to the cheapest and smallest FPGAs.

> Zynq 7010

I've always wanted to do an FPGA project but haven't looked seriously into where to start. Can the Zynq 7010 handle something like data transfer from a 4K image sensor to a USB 3 transceiver?

> PIO has extraordinarily sloppy timing

Do you have any data on this? I was under the impression the PIO has fairly precise timing if you set up your clocks right, but maybe I've been misled here.

Re: Memory Mapping an FPGA from an STM32

#52
post #33

Earlier quoted context omitted.

Where are you getting them for $2.50?? The XC7Z010-1CLG225C is $74.83 at Digikey in qty 1. Checking sketchier places Win-Source has the CLG400 package for $22.20 and even the cheapest aliexpress seller wants $4.84 for something marked as a 7Z010 that may or may not be legit. Also "fight the chip" is pretty much the definition of what I did last time I did a zynq project. Just give me a plain FPGA and MCU with no wiza…

https://www.aliexpress.us/item/3256803970893483.html I've ordered trays (and they send the OEM tray) - unique barcodes, legit. > Just give me a plain FPGA and MCU with no wizards or GUIs or automatic code generation. You can pretty much cut out all of their tools and get a pure Yocto/Vivado TCL build for the bitstream for the 7 series Zynqs. Very low touch. Their IO planner (in the Vivado IP integrator) is somewhat n…

How do you assemble your board with BGA packages? Or do you procure the parts and then send them somewhere for assembly?

Re: Memory Mapping an FPGA from an STM32

#53
post #52
post #33

Earlier quoted context omitted.

https://www.aliexpress.us/item/3256803970893483.html I've ordered trays (and they send the OEM tray) - unique barcodes, legit. > Just give me a plain FPGA and MCU with no wizards or GUIs or automatic code generation. You can pretty much cut out all of their tools and get a pure Yocto/Vivado TCL build for the bitstream for the 7 series Zynqs. Very low touch. Their IO planner (in the Vivado IP integrator) is somewhat n…

How do you assemble your board with BGA packages? Or do you procure the parts and then send them somewhere for assembly?

Vapor phase reflow.

Re: Memory Mapping an FPGA from an STM32

#54
post #27

Earlier quoted context omitted.

Zynq 7010s are $2.50 and are a hell of a lot more chip than an RP2040. If you already have the design (or copy one of the 50 available), it's a good option when you don't want to fight the chip. PIO has extraordinarily sloppy timing (skew in all categories) compared to the cheapest and smallest FPGAs.

> Zynq 7010 I've always wanted to do an FPGA project but haven't looked seriously into where to start. Can the Zynq 7010 handle something like data transfer from a 4K image sensor to a USB 3 transceiver? > PIO has extraordinarily sloppy timing Do you have any data on this? I was under the impression the PIO has fairly precise timing if you set up your clocks right, but maybe I've been misled here.

> Can the Zynq 7010 handle something like data transfer from a 4K image sensor to a USB 3 transceiver?

The Zynq 7010 is less-than-ideal for this because you'd have to use some kind of USB3 interface PHY - which would increase cost and be pretty limited functionality-wise.

If you use an FPGA with transceivers (some 7 series Artix chips - https://www.lcsc.com/product-detail/Programmable-Logic-Devic..., most 7 series Virtex/Kintex chips, all US/US+ chips), you can implement USB3 without an external PHY: https://github.com/enjoy-digital/usb3_pipe

The Z7010 probably has the area to do this type of translation but not the transceivers. There are other chips in the 7 series Zynq family with capable transceivers, but they are much more expensive ($15-$35 from CN).

> I was under the impression the PIO has fairly precise timing if you set up your clocks right, but maybe I've been misled here.

No measured data, but when I was once implementing JTAG and SPI at 50MHz+ with an extremely overclocked chip, the edges were very inconsistent in relation to each other and in pulse width - 5-15ns (estimating from memory, they were sloppy.)

PIO is very precise within its specified capabilities, this range is just very low compared to cheap FPGAs.

Re: Memory Mapping an FPGA from an STM32

#55

Earlier quoted context omitted.

Probably not. The dual-core parts are DIE450 (which is shared with some single-core parts like the H750 series!), but STM32H735 is DIE483.

I have a H735 on a retired board slated for decap so we'll find out once I open it up. Do you know if it's fabbed in house, TSMC, or Samsung? I've seen ST silicon from all 3 foundries but the only thing I've seen stated publicly is 40nm. When I get it opened up it should be easy to tell, TSMC and Samsung processes have distinctive features on them that I recognize by sight.

> distinctive features on them that I recognize by sight

Now this would be a cool blog post!

Re: Memory Mapping an FPGA from an STM32

#56
post #54

Earlier quoted context omitted.

> Zynq 7010 I've always wanted to do an FPGA project but haven't looked seriously into where to start. Can the Zynq 7010 handle something like data transfer from a 4K image sensor to a USB 3 transceiver? > PIO has extraordinarily sloppy timing Do you have any data on this? I was under the impression the PIO has fairly precise timing if you set up your clocks right, but maybe I've been misled here.

> Can the Zynq 7010 handle something like data transfer from a 4K image sensor to a USB 3 transceiver? The Zynq 7010 is less-than-ideal for this because you'd have to use some kind of USB3 interface PHY - which would increase cost and be pretty limited functionality-wise. If you use an FPGA with transceivers (some 7 series Artix chips - https://www.lcsc.com/product-detail/Programmable-Logic-Devic... , most 7 series V…

Thanks for the reply and the links! I'm okay with a more expensive FPGA chip if it significantly simplifies the implementation. I'm probably biting off more than I can chew trying to start FPGA dev with something like this, so I'll also look into simpler starter projects.

> PIO is very precise within its specified capabilities, this range is just very low compared to cheap FPGAs.

Good to know, I don't plan on pushing RP2040s to their limit any time soon. They're still excellent for lower speed projects.

Re: Memory Mapping an FPGA from an STM32

#57
post #50

Earlier quoted context omitted.

I was interested to see, or at least what state they're in so I grabbed a couple. Might try to compare them against some genuine ones with CT and destructive inspection. On the chance they're half reasonable, thanks for the link.

Let me know if the barcodes are anything but unique/perfect. This has been the case with many vendors, but these chips are cheap enough that you can try 50 vendors.

Will do. Not too worried about trying low cost parts to gain some minimal confidence in a possible source, they're compelling for weekend side-projects at least.

I've previously struggled to roll the dice for higher end parts as the cost difference isn't as extreme and had some obvious reballed parts a few years ago. If they're OK then their $20 XC7K325T will be at the top of my list...

Re: Memory Mapping an FPGA from an STM32

#58
post #50

Earlier quoted context omitted.

Let me know if the barcodes are anything but unique/perfect. This has been the case with many vendors, but these chips are cheap enough that you can try 50 vendors.

Will do. Not too worried about trying low cost parts to gain some minimal confidence in a possible source, they're compelling for weekend side-projects at least. I've previously struggled to roll the dice for higher end parts as the cost difference isn't as extreme and had some obvious reballed parts a few years ago. If they're OK then their $20 XC7K325T will be at the top of my list...

At $20, just buy from LCSC-

https://www.lcsc.com/product-detail/Programmable-Logic-Devic...

https://www.lcsc.com/product-detail/Microcontroller-Units-MC...

Re: Memory Mapping an FPGA from an STM32

#59

real quite high level sorry, most of your embedded projects going forward are MCU+fpga to do what? I thought a custom router but 284mbps isn't nearly fast for a network.

Embedded projects are never about doing things as fast as computers: we have full scale computers (and routers, and firewalls, and switches) for that. Embedded is about solving problems more physical in nature, as you are physically closer to reality in nearly all aspects. -------- An MCU + FPGA project could implement... say... the VFIR IrDA (Infrared) protocol at 16Mbit. Traditional IrDA is widely supported at SIR…

> Embedded projects are never about doing things as fast as computers: we have full scale computers (and routers, and firewalls, and switches) for that.

That's a bit of an overly broad statement.

I have several times at work done projects that use FPGAs to do things faster than a computer can do, e.g. some specific processing of a full 10Gbps UDP stream, which is much easier to get 100% reliable without packet drop in digital logic than it is in software land.

The FPGA+CPU combo allows you to do a LOT of things. I tend to use just a straight Zynq so I already have my memory buses wired up from processing system to digital logic, but this is an interesting architecture.

Re: Memory Mapping an FPGA from an STM32

#60
While we're talking about this sort of architecture, I'd like to plug Elixir.

For some development hardware, we had Elixir running on the ARM of a Zynq Ultrascale, running in tandem with some digital logic. It required one C code "port" that integrated with UIO to expose the registers to our application and then we had a great programming environment.

Elixir for embedded doesn't get talked about that much, but that is actually the origin story of Erlang (software component of telephony hardware). Basic language features like binary pattern matching work very well, and the concurrency approach makes it very easy to write clean performant real-time software. We had a lot of functionality that did used digital logic and then had the stateful stuff in software and it worked very well.

Plus, I could then do stuff like trivially spin up a Web UI with a graphical display of all the register state, that updated live (Phoenix LiveView). And be happy that that running wasn't going to interfere with the realtime stuff.

We did this using Nerves which is a Linux platform set up to boot the BEAM and nothing else (e.g. no init system, just a special pid 0 binary that boots the BEAM and lets that handle all other processes). It had some plus points like making firmware upgrade trivial and simplifying the system, but not being a "normal" linux platform was a bit irritating sometimes. You could equally well just run Elixir as an application normally.

Post reply on HN