-
Notifications
You must be signed in to change notification settings - Fork 16
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
Simplify Portability and Maintenance and unify common VHDL code #41
Comments
…"Simplify Portability and Maintenance and unify common VHDL code" (issue #41)
@MJoergen I am currently knee-deep in making MEGA65 work again with all the changes we made in V1.6 :-) (so I am working on issue #69 right now). While doing so, I made the
Could you please have a look at the changes in |
I'll have time tomorrow to check the generics in Meanwhile, since this issue is about portability and refactoring, I have another issue: I propose that we remove the two mentioned files from the repository, since they get automatically generated every time |
Yes, for example to avoid having to make specific versions of
Very good point. I just did that. My next commit to |
Removing the aforementioned files from the git is a good idea, and I can relate to the problem of Michael with the files in dist_kit which force me once in a while to checkout these files before I can even perform a git pull. Shouldn't we remove those files from the git as well? :-) |
I would oppose removing the files from dist_kit because the whole point of dist_kit is to be our distribution kit, which is completely redundant (also when it comes to the bitstreams there), yet very valuable for doing our QuickStart Guide on the main README.md |
...but the dist_kit is created easily and automatically by running compile_and_distribute etc. Couldn't we, when we have a stable release such as the forthcoming 1.6 create a dist_kit and include it as ZIP-file in the git? This way users who can't create their own dist_kit could unpack the ZIP-file while all others would just follow the build instructions, what do you think? |
You are right: Everybody needs to "go through" the make-toolchain process, because otherwise he would not even have an assembler. So yes, I'll take care of this. |
The answer is: Usage of
This is something we might want to move to the future; right now the IDE based approach is fully OK, so this is out of scope for the issue at hand. |
Move MMCM instantiation to a separate file `clk.vhd`. This improves portability, because the MMCM is Xilinx specific. This new `clk.vhd` file has just a single responsibility: To generate the CPU and VGA clocks. Also refactored the timing constraints, to make them apply more specifically: Basically, any registers wrapped within the lines gen_cdc : if true generate end generate gen_cdc; will be treated as a Clock Domain Crossing. This was done to resolve a Xilinx warning regarding the timing constraints and the new timing generation. See Issue #41.
I've ordered a Terasic DE10-Nano for myself (will get it in a few weeks). Then we can work on porting to that platform too! |
Super cool! 🚀 😃 |
One thing we might want to consider as part of this issue is to rename the CPU bus signals as follows:
The reason for this renaming is that the new signal names (and their semantics, i.e. the bus protocol) then conforms to the "Avalon Memory-Mapped" interface specification. Since Avalon-MM is an industry standard this might make the interface easier to understand/recognize/reuse as well as make it easier to integrate new components later on. The Avalon-MM interface is described in detail in Chapter 3 of this link https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/manual/mnl_avalon_spec.pdf. Note, when it comes to the DATA_DIR and DATA_VALID signals it might be necessary to modify some of the logic in the various I/O devices and/or the CPU, since the semantics of these signals is not completely identical to the read/write signals in the Avalon-MM standard. Figure 7 in the above mentioned document shows the details. However, I consider this a minor change. So the question is, whether this is something we want to bother with? I think it is more of a nice-to-have, but on the other hand I don't really see any down sides to it. |
@MJoergen Absolutely relevant and valid topic. Are we already sure, that Avalon-MM is the way to go? I am no specialist in these industry standards, but I observed that in the Open Source world (e.g. on opencores.org), also WishBone seems to be a common standard? So yes, we should do something here. But let us please move it to V1.8 as V1.7 is having a lot of loose ends currently (also on the MEGA65 side) and given my restricted time budget, I would appreciate V1.8 for that 😃 I will open a new issue and assign it to both of us. |
What is left here to do
|
One of the basic ideas of QNICE-FPGA is, that it is meant to be highly portable. For sure we are not there, yet ;-)
Currently, everything is quite Xilinx specific.
vhdl/hw
as well as thehw/xilinx
,hw/intel
folders might grow in future, making maintenance hard: Particularly due to duplicated and mainly identical files with slight platform specific changesIs there a way to work in VHDL a bit similar than with the C preproccessor? And then add some build system like CMAKE or the GNU build system?
E.g. in the source files as high level as
#ifdef xilinx
and/or as low level as#ifdef enable_hdmi
and then something likemake nexys4
make MEGA65
make DE10
And the build environment is smart enough to grasp: OK, Nexys and MEGA65 are Xilinx, DE10 is intel...
Can we unite the zoo of vhdl files that right now have been doubled just because I did not know better how to do it? Like uniting MEGA65 globals and env1 globals. Uniting
MEGA65_ISE.vhd
withMEGA65_Vivado.vhd
with env1 ISE and Vivado and so on.Having some
vhdl/hw/common
folder where all the common stuff resides and then the TRULY hardware specific stuff, such as HDMI and HyperRAM for MEGA65 then in avhdl/MEGA65
folder.The text was updated successfully, but these errors were encountered: