Page 1 of 1
Game Of Life core
Posted: Thu Jun 03, 2021 10:39 pm
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;
Re: Game Of Life core
Posted: Thu Jun 03, 2021 11:10 pm
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 -_-
Re: Game Of Life core
Posted: Thu Jun 03, 2021 11:28 pm
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
Re: Game Of Life core
Posted: Fri Jun 04, 2021 1:47 pm
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.
Re: Game Of Life core
Posted: Sat Jun 05, 2021 3:46 pm
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;
```
Re: Game Of Life core
Posted: Sat Jun 05, 2021 8:18 pm
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)
Re: Game Of Life core
Posted: Sun Jun 06, 2021 4:15 pm
by Moondandy