-
Notifications
You must be signed in to change notification settings - Fork 54
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
Consider moving the emu ports to an include file #68
Comments
I like the idea because it will take one step out of the process of updating the framework when the emu module port declarations need to be updated moving forward. If the include were placed in the sys folder, then merely replacing the sys folder removes that extra step. One downside I could see is the ease of access to the information about those ports (whether they are inputs, outputs, what bit width they are, are they a reg or not, etc...) goes down slightly because you would have to open a second file as a reference. Does this have any incompatibilities with simulation tools like verilator/modelsim/ghdl/etc...? I assume it might work with verilator since you use that tool specifically, but am curious about other tools other devs use of course. |
Yes, i'm thinking about it some time already. But because V/SV doesn't accept default values for output ports, it will require to add dummy assigns like |
Currently we get warnings already without adding the dummy assigns. As I have updated the framework on cores, I have had to add lines such as |
didn't i say the same above? ;) |
Ahhh, sorry LOL. I misunderstood you. :) |
You could get rid of the need for default ports if you used
If a core doesn't define jtframe does this with defines like It means any new ports or changes to existing ports would require adding a new define and adding the preprocessor logic to deal with it being enabled or disabled. But sys upgrades would become a lot easier and it would make it possible to make larger changes to the emu interface without having to force painful sys upgrades down the line. |
It's not convenient to add define to many such optional ports. It will get tens of such defines which will require to have many customisations in qsf file which will require to tweak it to each core. So we come to the place where we supposed to leave. Also many defines make code look awful, non readable. And will require to test in each possible set of such defines. |
I have made this change to my framework which you may consider useful for the general MiSTer framework:
It looks like this when you use it:
You can check out the included file here.
From a maintenance point of view, this is very practical because features can be added and fixed more easily for all cores. From the developer point of view, it takes clutter away and removes the need to keep track of new ports added via MISTER_ macros.
It may fit my development tool chain better than yours, but I just wanted to share my two cents. Please close the issue at any time. I am not requesting that you actually implement it, but just sharing some thoughts.
The text was updated successfully, but these errors were encountered: