Game Of Life core

User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Game Of Life core

Unread post by pgimeno »

Compilation gives me an error here:

Code: Select all

      output_pixel <= status[3] ? r2p2 : (neighbor_count | r2p2) == 4'd3) || ((neighbor_count ^ r2p2) == 4'd6;
And for good reasons, because parentheses are unbalanced. I've fixed it by removing the extraneous ones:

Code: Select all

      output_pixel <= status[3] ? r2p2 : (neighbor_count | r2p2) == 4'd3 || (neighbor_count ^ r2p2) == 4'd6;
User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

Re: Game Of Life core

Unread post by aberu »

Are you going to submit a pull request? If you are uncomfortable using github I could help you with that.

Scratch that, you can't even open the original in Quartus 17.0.x. I'll look over it, it seems like it was designed in something other than Quartus 17, which is probably part of the reason there are problems. What version of Quartus did you open it in?

EDIT: Apparently it was made in Quartus 18.1.0 Lite Edition -_-
birdybro~
User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Game Of Life core

Unread post by pgimeno »

With that fix (and a minor edit to the settings file) I've compiled it, but now HighLife doesn't work as expected, so that fix is probably incorrect. The HighLife patterns I have don't work. I'm looking into that. IIUC the correct line should be:

Code: Select all

      output_pixel <= status[3] ? r2p2 : (neighbor_count | r2p2) == 4'd3 || neighbor_count == 4'd6 & ~r2p2;
(Edited, I was missing another condition; now the patterns work)

I'm not on GitHub, so I can't submit PRs, but I can attach a patch, and I'd appreciate if it was submitted.

By the way, it would be nice if the framework was updated.

Edit: Here's the line that has to be removed or commented out from Life.qsf for it to work in Quartus 17 Lite:

Code: Select all

set_global_assignment -name TIMING_ANALYZER_MULTICORNER_ANALYSIS ON
User avatar
Moondandy
Top Contributor
Posts: 535
Joined: Mon May 25, 2020 2:14 am
Location: Edinburgh, Scotland
Has thanked: 32 times
Been thanked: 102 times

Re: Game Of Life core

Unread post by Moondandy »

If you can write the copy for the ticket then I can add it to GitHub for you, if no Dev is planning to just do the PR themselves.
User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Game Of Life core

Unread post by pgimeno »

Ok, how about:

The line that implements HighLife in Life.sv is giving a syntax error due to unbalanced parentheses.

The correct implementation for HighLife is:

```
output_pixel <= status[3] ? r2p2 : (neighbor_count | r2p2) == 4'd3 || neighbor_count == 4'd6 & ~r2p2;
```
User avatar
ericgus09
Posts: 217
Joined: Mon May 25, 2020 2:47 am
Has thanked: 11 times
Been thanked: 32 times

Re: Game Of Life core

Unread post by ericgus09 »

This core really could use a color enhancement .. maybe color based on cell generation, age etc. or something .. IDK just think it would look really amazing.. (if someone is in there tinkering)
User avatar
Moondandy
Top Contributor
Posts: 535
Joined: Mon May 25, 2020 2:14 am
Location: Edinburgh, Scotland
Has thanked: 32 times
Been thanked: 102 times

Re: Game Of Life core

Unread post by Moondandy »

Post Reply