Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
SnoPuppy
Jun 15, 2005

Poopernickel posted:

Agreed that a page-swapping design doesn't scale well when you have more than two pages - in that case, your approach is the one to use for sure. With exactly two pages, however, the logic requirements are lower because the synthesizer doesn't need to implement a mux on each input and output bit.

edit: also, there's the nice advantage that your outputs are registered as opposed to muxed, which gets a better timing score if the output page has to get processed by some other logic.

You probably get the muxes and logic for free if you're implementing it any modern, reasonable FPGA.
If you're using registers, you're consuming a slice and its LUTs regardless if you use them or not, due to the control sets and routing resources.

This whole discussion is exactly why whenever someone at work does something silly, I always, always, always ask them to draw out the schematic of what they're doing. If you can't figure out how to do roughly what you want with gates and FFs, you shouldn't be doing it.
Even if you do know how to implement it with logic and gates, you should still try to have an understanding of your specific part to make sure that the synthesizer wont do something dumb.

Remember that VHDL and Verilog are Hardware Description Languages - not magic, and you certainly don't write "programs" with them.

Adbot
ADBOT LOVES YOU

SnoPuppy
Jun 15, 2005

Poopernickel posted:

What exactly is magic about the example that I posted?

That was more of a general comment, not directed at you specifically. Mainly for the XOR atrocity that was posted earlier.

I do think double buffering for the game of life would be pretty ridiculous - each element is the result of its neighbors, so you just have N identical copies of the same 9 to 1 boolean function and you only need 1 FF per game tile. I suspect the bigger problem will be routing congestion more than logic or FF use.

Or you could use a RAM and just iterate through each row in the game - it's basically a 3x3 kernel that's passed over the game tiles.

SnoPuppy
Jun 15, 2005

mnd posted:

I don't have much time to comment on this right now, so I'll just drop this here as a placeholder for a future conversation: https://github.com/stacksmith/fpgasm

Seems like he's generating XDL directly, which means he skips ISE's PnR phase (IIRC)...

Related, see also: https://github.com/stacksmith/fpgasm/wiki/What-is-this and http://www.fpgarelated.com/showarticle/39.php

That...doesn't make any sense.
In either VHDL or Verilog you can instantiate any primitive you want, and hook it up however you want.
It's rare with slice/fabric elements though, because that tends to be one of those "if you have to ask, you're not qualified to use it" situations. And it becomes a migration nightmare when you want to move to a different device.

It looks like a (rather poor) solution in search of a problem.

  • Locked thread